You are not logged in.

#1 2017-05-11 03:15:10

ende55
Member
Registered: 2017-05-11
Posts: 2

[SOLVED] Issues compiling OGRE program with stock OGRE 1.10.4-3

Hi everyone!

I have issues compiling the OGRE sample application found at https://github.com/synasius/ogre-basic-tutorials. which are the full samples for the respective tutorials at http://www.ogre3d.org/tikiwiki/Basic+Tutorials When I execute make, I get:

$ LC_ALL="C" make
[ 16%] Building CXX object CMakeFiles/OgreApp.dir/BaseApplication.cpp.o
In file included from /home/hector/platform/pruebas/ogre-basic-tutorials/BaseApplication.cpp:17:0:
/home/hector/platform/pruebas/ogre-basic-tutorials/BaseApplication.h:34:22: fatal error: SdkTrays.h: No such file or directory
 #include <SdkTrays.h>
                      ^
compilation terminated.
make[2]: *** [CMakeFiles/OgreApp.dir/build.make:63: CMakeFiles/OgreApp.dir/BaseApplication.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/OgreApp.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Note that I had to modify few lines related to OIS (the user input system bundled with OGRE); the diff with respect to the online repository is:

$ git diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3b52fdc..0b1cec5 100644
--- a/CMakeLists.txt
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3b52fdc..0b1cec5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -66,11 +66,11 @@ find_package(OGRE REQUIRED)
 #  message(SEND_ERROR "You need Ogre 1.7 Cthugha to build this.")
 #endif()
  
-find_package(OIS REQUIRED)
+#find_package(OIS REQUIRED)
  
-if(NOT OIS_FOUND)
-       message(SEND_ERROR "Failed to find OIS.")
-endif()
+#if(NOT OIS_FOUND)
+#      message(SEND_ERROR "Failed to find OIS.")
+#endif()
  
 # Find Boost
 if (NOT OGRE_BUILD_PLATFORM_IPHONE)
@@ -111,7 +111,7 @@ set(SRCS
        ./BaseApplication.cpp      
 )
  
-include_directories( ${OIS_INCLUDE_DIRS}
+include_directories( /usr/include/OIS
        ${OGRE_INCLUDE_DIRS}
        ${OGRE_SAMPLES_INCLUDEPATH}
        ${OGRE_Overlay_INCLUDE_DIRS}

This workaround was successful and I corrected all OIS-related errors. But when I looked to the files in the stock package, I found out the SdkTrays.h file is missing.

I think it may be some flag or settings the maintainers changed so this file (or the Trays GUI component) is not built into the stock package, and I cannot get around this. I am still trying.

I think it could be good that the stock OGRE is built with the complete Trays component. I am going to keep trying to solve this, and, if there is something I can do to help, I am ready to.

Another issue I am having with OGRE is about the OgreSampleBrowser program. It has serious display issues. The screenshot is at https://imagebin.ca/v/3M3KUzYAduqi. I do not really know whether this is due to my old GeForce 7200 GPU, which supports up to OpenGL 2.1. The console output is very detailed, the errors it shows I think would ve relevant are:

Error: DeferredShading/Shadows/CasterVP_pCg_sm4's syntax is not supported
Error: DeferredShading/Shadows/CasterFP_pCg_sm4's syntax is not supported
...
Error: InstancingCg's syntax is not supported
Error: InstancingShadowCasterCg's syntax is not supported
Parsing script Hurt.material
Parsing script ParticleGS.material
Error: Ogre/ParticleGS/GenerateGScg's syntax is not supported
Error: Ogre/ParticleGS/DisplayGScg's syntax is not supported
Parsing script Bloom2.material
Parsing script OffsetMapping.material
Error: Examples/OffsetMappingVPShaderModel4's syntax is not supported
Error: Examples/OffsetMappingFPShaderModel4's syntax is not supported
Compiler error: object unsupported by render system in OffsetMapping.material(35): , Shader name: Examples/OffsetMappingPS/Asm
...
Error: Examples/ShowUV_pCg_sm4's syntax is not supported
Error: Examples/ShowUVdir3D_pCg_sm4's syntax is not supported
Error: Examples/ShowTangents_vCg_sm4's syntax is not supported
Error: Examples/ShowNormals_vCg_sm4's syntax is not supported
...
Error: Examples/TextureArrayVScg's syntax is not supported
Compiler error: object unsupported by render system in Examples-Advanced.material(945): , Shader name: Examples/TextureArrayPSasm
...
Error: ssao_vs_pCg_sm4's syntax is not supported
Error: ssao_ps_pCg_sm4's syntax is not supported
Error: ssaoBlurX_ps_pCg_sm4's syntax is not supported
Error: ssaoBlurY_ps_pCg_sm4's syntax is not supported
...

When I let this program run and show this screen, after few seconds it takes all the CPU time of a core (or the two) of my CPU. It does not go beyond the screenshot even after some minutes.

This is really important for me; I want help on this issue, and it may be possible for me to contribute if needed, too. I have good knowleadge on C++ development, graphics concepts, OpenGL and related stuff.

My system:
CPU: AMD Athlon X2 (Dual Core; 3 GHz per core) 64-bit.
Memory: 6 GB, DDR2 (800 MHz)
GPU: nVidia GeForce 7200; OpenGL 2.1
All the disks are conventional hard disks wired through SATA.

Thanks everyone.

Last edited by ende55 (2017-05-18 03:19:52)

Offline

#2 2017-05-12 06:25:57

uberscientist
Member
Registered: 2012-01-27
Posts: 84

Re: [SOLVED] Issues compiling OGRE program with stock OGRE 1.10.4-3

Maybe see if this compiles: https://aur.archlinux.org/packages/ogre-git
There's an ogre package in community already too btw: https://www.archlinux.org/packages/comm … 6_64/ogre/

I'm sure you've already looked at this: http://www.ogre3d.org/forums/viewtopic.php?f=2&t=81320 -- which didn't make much sense to me...

Any progress?

Offline

#3 2017-05-18 03:19:16

ende55
Member
Registered: 2017-05-11
Posts: 2

Re: [SOLVED] Issues compiling OGRE program with stock OGRE 1.10.4-3

I have done some research, and in the end I found out many things have changed in OGRE 1.10. In the end, I have cloned the OGRE 1.10 source from https://bitbucket.org/sinbad/ogre/, as specified in the official site. The sample at https://github.com/synasius/ogre-basic-tutorials is for OGRE 1.9 and refers the header SdkTrays.h, which I think is not available anymore in Ogre 1.10. I have looked for this file in the OGRE 1.10 source and it seems indeed is not there. So, the official Arch package is OK.

A more recent version from the OGRE 1.10 source repository includes a basic sample in full that works almost straightforward. It shows how to set up the scene with cameras and ligths. It only requires to locate the resource files and set up resources.cfg accordingly, and to add a plugins.cfg file, too. This sample is located at the Samples/Bootstrap directory, relative to the source code's root directory.

About the OgreSampleBrowser program, it turns out I can run most samples, it's only that the controls for picking the sample do not show properly until I run at least a sample. But I can use the arrow keys to pick a sample and the sample's name appears. When I view a sample or two, the UI elements start to show better after going back to the sample list. I cannot say for sure whether this is related to my GPU or bugs in OGRE, but it's more likely it's my GPU.

uberscientist, thanks for your interest. I hope this serves for newcomers to OGRE 1.10, because many things have changed from 1.9.

Last edited by ende55 (2017-05-18 03:29:01)

Offline

Board footer

Powered by FluxBB