Hey folks!
My team and I are trying to render text to a 3D surface in OGRE 2.1. It seems we are having trouble properly calling datablock.setTexture()
. I've typed up my situation in a gist if you'd like more information. https://gist.github.com/DavidYKay/2c70522f42a98d4672dc384b338cb7ac
Many thanks for any help you may be able to offer.
Just got a response on the forums: https://forums.ogre3d.org/viewtopic.php?f=25&t=96100
Will implement and update if need be. Thanks very much!
macoy
, in case that helps
void main()
{
// float ambientStrength = 0.1;
vec3 ambient = ambientStrength * lightColor;
vec3 result = ambient * objectColor;
FragColor = vec4(result, 1.0);
}
Has anyone managed to successfully link ogre libraries after building it statically on Windows?
I successfully built both 1.12.10 from source and also tried this with 1.12.9 from vcpkg. I'm working on a crossplatform solution so using CMake/writing CMakeLists rather than visual studio tooling. I'm trying to compile the same code as from the bootstrap tutorial, so I'm doingfind_package(OGRE REQUIRED COMPONENTS Bites RTShaderSystem)
and latertarget_link_libraries(0_Bootstrap OgreBites OgreRTShaderSystem)
Trying to run this gets me lots of errors similar to Target "0_Bootstrap" links to target "SDL2::SDL2" but the target was not
found.
, indicating the dependencies are not linked correctly. (SDL2, ZLib, and Imgui are some of the libs in question that error)
if I manually resolve them by doing a find_package(SDL2) and all the other missing packages, it still errors upon compilation. the command that fails is C:\...link.exe ...stuff... obj /out:src\0_Bootstrap.exe ...various.lib_files_being_linked... freetype.lib ...other.lib_files...
which naturally isn't surprising because the linker has no idea where freetype.lib is. This seems odd though, seeing as how the find_package(OGRE) stuff should've handled all the includes and libraries for me. I spent a while hacking at doing it without find_package and copying what the generated OgreTargets.cmake file did, but it was tedious and sifting through the undefined references was painful.
Is this a bug or am I missing something glaringly simple?
AttributeError: module 'cv2.cv2' has no attribute 'ovis
. I have opencv-contrib-python
installed, so I thought I am good to go? In the article it says that ovis
is an OpenCV module.
I'm also trying to get this tutorial to work: https://www.ogre3d.org/2020/12/24/augmented-reality-made-simple-with-ogre-and-opencv
I'm trying to use docker for it. I first build opencv from source on ubuntu:20.04, to get ovis enabled I added:apt install libogre-1.12 libogre-1.12-dev
, ARG OGRE_DIR=/usr/share/OGRE/cmake/modules/
, touch /usr/lib/x86_64-linux-gnu/libOgreGLSupport.a
. It builds fine, I can access it in opencv.
However when I run: owin = cv2.ovis.createWindow("VR", (800,600))
, I got a bunch of errors about missing zip files in /usr/share/OGRE/Media/packs/
, so I downloaded all the missing files for the packs folder. Now I'm getting errors:
owin = cv2.ovis.createWindow("VR", (800,600))
libGL error: MESA-LOADER: failed to retrieve device information
libGL error: Version 4 or later of flush extension not found
libGL error: failed to load driver: i915
libGL error: failed to open /dev/dri/card0: No such file or directory
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to retrieve device information
libGL error: Version 4 or later of flush extension not found
libGL error: failed to load driver: i915
libGL error: failed to open /dev/dri/card0: No such file or directory
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to retrieve device information
libGL error: Version 4 or later of flush extension not found
libGL error: failed to load driver: i915
libGL error: failed to open /dev/dri/card0: No such file or directory
libGL error: failed to load driver: iris
---------------------------------------------------------------------------
error Traceback (most recent call last)
<ipython-input-1-347dc5cb1e73> in <module>
1 import cv2
----> 2 owin = cv2.ovis.createWindow("VR", (800,600))
error: InternalErrorException: Unable to open zip file '/usr/share/OGRE/Media/volumeTerrain/volumeTerrainBig.zip' in load at /build/ogre-1.12-VXqDQG/ogre-1.12-1.12.4+dfsg1/OgreMain/src/OgreZip.cpp (line 221)
Is OpenGL required? I've tried downloading the content that goes in /usr/share/OGRE/Media/volumeTerrain/
, but it still can't load the zip even though I can see it. Do I need to use an older version of libogre?