-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scene Manager unexpected behavior, returns NULL instead of new node ptr, no warnings/errors #427
Comments
Hi! I cannot reproduce. Your example worked out of the box. Your README says:
But since there was no install-ogre-next.sh I just did the following: Place OgreNext into diff --git a/CMakeLists.txt b/CMakeLists.txt
index 86508d0..d74c596 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,7 +23,9 @@ endif (LINUX)
-find_package(OGRE 2.3.3 REQUIRED COMPONENTS Bites RTShaderSystem)
+#find_package(OGRE 2.3.3 REQUIRED COMPONENTS Bites RTShaderSystem)
+set(OGRE_INCLUDE_DIRS "/home/matias/hello-ogre-next/third_party/ogre-next/OgreMain/include" "/home/matias/hello-ogre-next/third_party/ogre-next/build/Debug/include")
+set(OGRE_LIBRARIES "/home/matias/hello-ogre-next/third_party/ogre-next/build/Debug/lib/libOgreMain_d.so")
target_include_directories(${PROJECT_NAME} PRIVATE ${OGRE_INCLUDE_DIRS})
message(OGRE_LIBRARIES = ${OGRE_LIBRARIES})
target_link_libraries(${PROJECT_NAME} ${OGRE_LIBRARIES}) And it worked. It presented a black screen because you were missing the following line in C++: compositorManager->addWorkspace( gSceneManager, gOgreWindow->getTexture(), camera, workspaceName,
true ); |
My bad.
Problem code was in devel branch. Already added to branch main. |
I do next steps:
On step 8 got null-pointer. |
Hi! The problem is in your CMakeLists.txt setup: You have the following: if (CMAKE_BUILD_TYPE STREQUAL "Debug")
message("Debug mode")
add_compile_definitions(OGRE_DEBUG_MODE)
endif (CMAKE_BUILD_TYPE STREQUAL "Debug") Which should be (as suggested by OgrePlatform.h): if (CMAKE_BUILD_TYPE STREQUAL "Debug")
message("Debug mode")
add_compile_definitions(DEBUG)
endif (CMAKE_BUILD_TYPE STREQUAL "Debug") Otherwise you cause ABI incompatibilities. If you step inside the debugger in createChildSceneNode() call it ends up calling OgreNext 3.0 will come with ABI check tool to early-detect this type of errors. |
Our CMake bootstrap script uses CMAKE_CXX_FLAGS_DEBUG instead. You can check it for reference if you want. (See manual for more info on the EmptyProject template). |
Yeah, it's working now. Thanks for help! For me it was a real entry threshold =) But, before I modified CmakeList file I found "workaround" - I change this
to this
and app start without null-pointers. Did not check with debugger, don't know details. |
System Information
Detailled description
Scene Manager on createChildSceneNode returns NULL.
https://github.com/goforbroke1006/hello-ogre-next/blob/devel/main.cpp
Row 123
Ogre.log
Callstack
The text was updated successfully, but these errors were encountered: