OpenGL 3+ RenderSystem

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
Post Reply
User avatar
bvanevery
Goblin
Posts: 218
Joined: Wed Feb 28, 2007 4:54 am
Location: Asheville, NC

Re: OpenGL 3+ RenderSystem

Post by bvanevery » Wed Mar 27, 2013 2:13 pm

dermont wrote: So if you run SampleBrowser from the install dir you may run into problems.
I've made everything in the source tree say "Media," have installed it to my system, deleted the contents of .ogre in my home directory, and run it from a non-build directory so that my PATH is finding it. Still the same issue. It may be a bug but it's not the bug.
Not sure it's related to Lubuntu, with 290.10 the "50 Hz" issue only occurred when TwinView was enabled and you could disable that from nvidia-settings and create your own xorg.conf file.
I've read about the TwinView issue, and come to think of it, my laptop does have a VGA port for an external monitor. It is possible to configure a 2 monitor display, I've done it on Windows. I do not see any settings for this sort of thing in the "NVIDIA X Server Settings" GUI. Judging by what it says, I think settings are being determined by nvidia-auto-select. It's not the expected practice to have a xorg.conf on Ubuntu nowadays, so if it's possible, I'd like to find a solution that doesn't involve creating one. Asking people to create a xorg.conf, especially when settings are supposed to be auto detected, is a bit of a consumer software disaster.

Now this is weird. I manually edited my /home/bvanevery/.ogre/ogre.cfg, changing the Display Frequency from 50 Hz to 60 Hz. I ran SampleBrowser_d, and "which SampleBrowser_d" reports /usr/local/bin/SampleBrowser_d. It still uses 50 Hz. Maybe it's got its path hardwired to where it was built, instead of where it was installed?

I have now installed the NVIDIA 313.26 driver, the most recent short term release. After doing that I have an /etc/X11/xorg.conf file. Still getting the same SampleBrowser_d error. I tried deleting the xorg.conf to see if my system would still work fine; it does. No change in SampleBrowser_d behavior.

I'm noticing that the error message shows vsync= with a totally blank setting. I wonder if that's relevant. Shouldn't it say =yes =no =maybe =something?

Code: Select all

-------------------------
******************************
*** Starting GLX Subsystem ***
******************************
GL3PlusRenderSystem::_createRenderWindow "OGRE Sample Browser", 1440x900 fullscreen  miscParams: FSAA=0 displayFrequency=50 Hz gamma=No vsync= 
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  153 (GLX)
  Minor opcode of failed request:  34 ()
  Serial number of failed request:  18
  Current serial number in output stream:  19
bvanevery@nomad:~$ 
0 x

User avatar
bvanevery
Goblin
Posts: 218
Joined: Wed Feb 28, 2007 4:54 am
Location: Asheville, NC

Re: OpenGL 3+ RenderSystem

Post by bvanevery » Sun Mar 31, 2013 8:00 pm

Ok, why is OGRE_BUILD_RENDERSYSTEM_GL3PLUS exclusive to OGRE_BUILD_RENDERSYSTEM_GL in CMake? I want to build both, so that I can test both in the same installation with no additional variables to consider. This is useful for debugging. I've got an old laptop and build times are really long. Also I'm on Linux and if one's doing an install, there's only one default convenient place to install to. I'd rather not have to set up special shells and paths to test special installs. So, is this build exclusion there for some important technical reason, or is it just an oversight in the CMakeLists.txt scripting?
0 x

User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
Contact:

Re: OpenGL 3+ RenderSystem

Post by masterfalcon » Sun Mar 31, 2013 8:06 pm

This is due to there being symbol conflicts on some platforms that haven't been taken care of yet.

How about this though, have two copies of the source code. One GL, one GL3+?
0 x

User avatar
bvanevery
Goblin
Posts: 218
Joined: Wed Feb 28, 2007 4:54 am
Location: Asheville, NC

Re: OpenGL 3+ RenderSystem

Post by bvanevery » Sun Mar 31, 2013 8:17 pm

masterfalcon wrote: How about this though, have two copies of the source code. One GL, one GL3+?
You mean 2 different build destination directories. There's no reason whatsoever to have 2 different copies of source in a CMake build. If I wasn't clear above: that will nearly double my build times, as I'll have to do once for the GL renderer, and once for the GL3PLUS renderer. I won't necessarily have to do that all the time, so it's not quite double in the real world. But as long as I'm debugging what's wrong with GL3PLUS when plain GL is working fine, it's double build time. Builds are currently taking an hour with make -k -j 4. Haven't tried the unity build yet.

Also, if I want to test the installation, not just the builds, I'll have to keep reinstalling one over the other into the system directories. That's annoying, especially if iterating between GL3PLUS and GL for debugging purposes.

Are the symbol conflicts trivial or involved?
0 x

dermont
Orc Shaman
Posts: 782
Joined: Thu Dec 09, 2004 2:51 am
x 9

Re: OpenGL 3+ RenderSystem

Post by dermont » Sun Mar 31, 2013 9:40 pm

bvanevery wrote: Haven't tried the unity build yet.
Then try it you will notice a difference in build times.
bvanevery wrote: Also, if I want to test the installation, not just the builds, I'll have to keep reinstalling one over the other into the system directories. That's annoying, especially if iterating between GL3PLUS and GL for debugging purposes.
You don't have to install to a system directory, just install to two different local dirs making sure that you enable OGRE_FULL_RPATH from the gui.
bvanevery wrote: I have now installed the NVIDIA 313.26 driver, the most recent short term release. After doing that I have an /etc/X11/xorg.conf file. Still getting the same SampleBrowser_d error. I tried deleting the xorg.conf to see if my system would still work fine; it does. No change in SampleBrowser_d behavior.

I'm noticing that the error message shows vsync= with a totally blank setting. I wonder if that's relevant. Shouldn't it say =yes =no =maybe =something?

Code: Select all

-------------------------
******************************
*** Starting GLX Subsystem ***
******************************
GL3PlusRenderSystem::_createRenderWindow "OGRE Sample Browser", 1440x900 fullscreen  miscParams: FSAA=0 displayFrequency=50 Hz gamma=No vsync= 
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  153 (GLX)
  Minor opcode of failed request:  34 ()
  Serial number of failed request:  18
  Current serial number in output stream:  19
bvanevery@nomad:~$ 
Well as I already mentioned to you previously I posted a short term fix that works for me. You don't seem interested in trying that so you will have to track down your particular problem yourself.
0 x

User avatar
bvanevery
Goblin
Posts: 218
Joined: Wed Feb 28, 2007 4:54 am
Location: Asheville, NC

Re: OpenGL 3+ RenderSystem

Post by bvanevery » Sun Mar 31, 2013 11:09 pm

dermont wrote:
bvanevery wrote: Haven't tried the unity build yet.
Then try it you will notice a difference in build times.
Somewhat shorter but no miracle. Maybe 30 minutes instead of 1 hour, and it choked my desktop responsiveness badly enough that I switched to a different machine to type this forum post. That machine is owned by someone else and not always available to me. That build was with "make -k -j 4". Next time I'll try just "make -k" and see if it leaves my system multi-taskable.
bvanevery wrote: Also, if I want to test the installation, not just the builds, I'll have to keep reinstalling one over the other into the system directories. That's annoying, especially if iterating between GL3PLUS and GL for debugging purposes.
You don't have to install to a system directory, just install to two different local dirs making sure that you enable OGRE_FULL_RPATH from the gui.
You mean I get to configure CMake and build again? :D I really wish CMake didn't have a full programming model, because any change in the entire CMakeLists.txt implies that the configuration could now be invalid, due to some minor act of full programming tomfoolery.

Anyways, the plain GL renderer works just fine on my system. ./SampleBrowser loads without complaint. Perhaps refactoring that code into a common base for both GL and GL3PLUS would be useful. Which implies resolving the symbol conflicts.
Well as I already mentioned to you previously I posted a short term fix that works for me. You don't seem interested in trying that so you will have to track down your particular problem yourself.
Hey that's not fair. It's not like you've posted a patch or set up a Mercurial repository, to make it easier for others to take advantage of your work, like I suggested. So if you're saying I'm lazy, well, back at ya. I don't even know that you solved the problem "the right way." I have been investigating what's really going on, where the 50 Hz vs. 60 Hz is actually coming from. Also if you really have solved the problem "the right way" instead of patching around it, you could be making a pull request for your fix, right?
0 x

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
Contact:

Re: OpenGL 3+ RenderSystem

Post by CABAListic » Sun Mar 31, 2013 11:35 pm

You mean I get to configure CMake and build again? I really wish CMake didn't have a full programming model, because any change in the entire CMakeLists.txt implies that the configuration could now be invalid, due to some minor act of full programming tomfoolery.
From my experience, CMake is as smart as it can be when determining if something needs to be rebuilt. Of course, it chooses to err on the side of caution, but enabling the RPATH setting will not require you to rebuild the project. CMake will just relink the executables upon installing to the chosen path.
0 x

User avatar
bvanevery
Goblin
Posts: 218
Joined: Wed Feb 28, 2007 4:54 am
Location: Asheville, NC

Re: OpenGL 3+ RenderSystem

Post by bvanevery » Sun Mar 31, 2013 11:59 pm

CABAListic wrote:but enabling the RPATH setting will not require you to rebuild the project.
Hey presto, OGRE_FULL_RPATH didn't require a rebuild. Neither did changing CMAKE_INSTALL_PREFIX. But... the installed /home/bvanevery/devel/install/bin/SampleBrowser crashed while trying to read a .zip archive. Which says to me that retargeting the installation "just anywhere" may not be all it's cracked up to be. Either it's bugged because it stands alone, or because I've got another ogre installation in my system path, or... who knows. I don't really want to know, to be honest. Hm, weird, it's trying to read a lowercase /media directory and I swear I patched my sources to be /Media everywhere. Maybe the latest pull broke that somehow, but it should have broken the earlier system install as well, and it didn't. Chasing that down feels like busywork.

To wit: it would be good to resolve those symbols and have 1 engine capable of using multiple renderers, if it's not a difficult problem. Is it?
0 x

User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
Contact:

Re: OpenGL 3+ RenderSystem

Post by masterfalcon » Mon Apr 01, 2013 12:38 am

It probably isn't. But I've just had much more important things to work on. I also figured that this was the kind of issue that could wait until around the time that I was ready to no longer mark it as experimental
0 x

User avatar
bvanevery
Goblin
Posts: 218
Joined: Wed Feb 28, 2007 4:54 am
Location: Asheville, NC

Re: OpenGL 3+ RenderSystem

Post by bvanevery » Mon Apr 01, 2013 1:19 am

Well by the time I've completely learned this GL3PLUS codebase, and ClanLib's version of the same, and the tradeoffs between Ogre and ClanLib's APIs, and why NVIDIA cards on Linux give funny unexpected values that don't show up on other platforms, and I decide Ogre is the engine to choose rather than ClanLib or (shudder) writing my own... then maybe I'll beat those symbols into shape if you haven't already. :D But that's a lot of prereqs.

This is a bit frustrating because I've been blocked on this 1 bug for my own priorities for 2+ weeks. It's probably a "Linux on old 3.x only NVIDIA HW" bug. Ogre started out with a more solid build on Linux than ClanLib, save this one bug. In that intervening time, I've tracked down, filed, and seen fixed several ClanLib bugs. For some reason they've had easier bugs.

Irrlicht is out of the running. They have nothing for 3.x right now, just a compatibility profile that uses a fixed function pipeline.
0 x

User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
Contact:

Re: OpenGL 3+ RenderSystem

Post by masterfalcon » Mon Apr 01, 2013 5:17 am

I just committed a fix for this. Let me know how it works for you.
0 x

User avatar
bvanevery
Goblin
Posts: 218
Joined: Wed Feb 28, 2007 4:54 am
Location: Asheville, NC

Re: OpenGL 3+ RenderSystem

Post by bvanevery » Mon Apr 01, 2013 11:38 am

Hrm, it fails with many errors. This is a fresh clone of the repository. Decided my futzing with /Media vs. /media was causing me to have to deal with merges too much, so I nuked those changes.

Code: Select all

Scanning dependencies of target RenderSystem_GL3Plus
[  7%] Building CXX object RenderSystems/GL3Plus/CMakeFiles/RenderSystem_GL3Plus.dir/__/__/RenderSystem_GL3Plus/compile_RenderSystem_GL3Plus_0.cpp.o
In file included from /home/bvanevery/devel/build/ogre/RenderSystem_GL3Plus/compile_RenderSystem_GL3Plus_0.cpp:3:0:
/home/bvanevery/devel/ogre/RenderSystems/GL3Plus/src/OgreGL3PlusDepthBuffer.cpp: In constructor ‘Ogre::GL3PlusDepthBuffer::GL3PlusDepthBuffer(Ogre::uint16, Ogre::GL3PlusRenderSystem*, Ogre::GL3PlusContext*, Ogre::GL3PlusRenderBuffer*, Ogre::GL3PlusRenderBuffer*, Ogre::uint32, Ogre::uint32, Ogre::uint32, Ogre::uint32, bool)’:
/home/bvanevery/devel/ogre/RenderSystems/GL3Plus/src/OgreGL3PlusDepthBuffer.cpp:38:24: warning: declaration of ‘isManual’ shadows a member of 'this' [-Wshadow]
In file included from /home/bvanevery/devel/build/ogre/RenderSystem_GL3Plus/compile_RenderSystem_GL3Plus_0.cpp:14:0:
/home/bvanevery/devel/ogre/RenderSystems/GL3Plus/src/OgreGL3PlusHardwarePixelBuffer.cpp: In member function ‘void Ogre::GL3PlusTextureBuffer::blitFromTexture(Ogre::GL3PlusTextureBuffer*, const Box&, const Box&)’:
/home/bvanevery/devel/ogre/RenderSystems/GL3Plus/src/OgreGL3PlusHardwarePixelBuffer.cpp:678:20: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
In file included from /home/bvanevery/devel/ogre/RenderSystems/GL3Plus/src/OgreGL3PlusPixelFormat.cpp:32:0,
                 from /home/bvanevery/devel/build/ogre/RenderSystem_GL3Plus/compile_RenderSystem_GL3Plus_0.cpp:17:
/home/bvanevery/devel/ogre/OgreMain/include/OgreBitwise.h: In static member function ‘static unsigned int Ogre::Bitwise::intRead(const void*, int)’:
/home/bvanevery/devel/ogre/OgreMain/include/OgreBitwise.h:200:37: warning: cast from type ‘const void*’ to type ‘Ogre::uint8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
/home/bvanevery/devel/ogre/OgreMain/include/OgreBitwise.h:202:38: warning: cast from type ‘const void*’ to type ‘Ogre::uint16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
/home/bvanevery/devel/ogre/OgreMain/include/OgreBitwise.h:209:46: warning: cast from type ‘const void*’ to type ‘Ogre::uint8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
/home/bvanevery/devel/ogre/OgreMain/include/OgreBitwise.h:210:47: warning: cast from type ‘const void*’ to type ‘Ogre::uint8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
/home/bvanevery/devel/ogre/OgreMain/include/OgreBitwise.h:211:47: warning: cast from type ‘const void*’ to type ‘Ogre::uint8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
/home/bvanevery/devel/ogre/OgreMain/include/OgreBitwise.h:214:38: warning: cast from type ‘const void*’ to type ‘Ogre::uint32* {aka unsigned int*}’ casts away qualifiers [-Wcast-qual]
In file included from /home/bvanevery/devel/build/ogre/RenderSystem_GL3Plus/compile_RenderSystem_GL3Plus_0.cpp:19:0:
/home/bvanevery/devel/ogre/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp: In member function ‘virtual void Ogre::GL3PlusRenderSystem::_setPointParameters(Ogre::Real, bool, Ogre::Real, Ogre::Real, Ogre::Real, Ogre::Real, Ogre::Real)’:
/home/bvanevery/devel/ogre/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp:841:9: warning: variable ‘val’ set but not used [-Wunused-but-set-variable]
In file included from /home/bvanevery/devel/ogre/RenderSystems/GL3Plus/src/GLX/OgreGLXContext.cpp:31:0,
                 from /home/bvanevery/devel/build/ogre/RenderSystem_GL3Plus/compile_RenderSystem_GL3Plus_0.cpp:38:
/home/bvanevery/devel/ogre/RenderSystems/GL3Plus/include/GLX/OgreGLXContext.h: In constructor ‘Ogre::GLXContext::GLXContext(Ogre::GLXGLSupport*, GLXFBConfig, GLXDrawable, GLXContext)’:
/home/bvanevery/devel/ogre/RenderSystems/GL3Plus/include/GLX/OgreGLXContext.h:57:18: warning: ‘Ogre::GLXContext::mGLSupport’ will be initialized after [-Wreorder]
/home/bvanevery/devel/ogre/RenderSystems/GL3Plus/include/GLX/OgreGLXContext.h:52:18: warning:   ‘GLXDrawable Ogre::GLXContext::mDrawable’ [-Wreorder]
In file included from /home/bvanevery/devel/build/ogre/RenderSystem_GL3Plus/compile_RenderSystem_GL3Plus_0.cpp:38:0:
/home/bvanevery/devel/ogre/RenderSystems/GL3Plus/src/GLX/OgreGLXContext.cpp:37:2: warning:   when initialized here [-Wreorder]
In file included from /usr/include/X11/extensions/Xrandr.h:33:0,
                 from /home/bvanevery/devel/ogre/RenderSystems/GL3Plus/src/GLX/OgreGLXGLSupport.cpp:39,
                 from /home/bvanevery/devel/build/ogre/RenderSystem_GL3Plus/compile_RenderSystem_GL3Plus_0.cpp:39:
/usr/include/X11/extensions/Xrender.h: At global scope:
/usr/include/X11/extensions/Xrender.h:205:1: error: ‘Status’ does not name a type
/usr/include/X11/extensions/Xrender.h:209:1: error: ‘Status’ does not name a type
/usr/include/X11/extensions/Xrender.h:470:1: error: ‘Status’ does not name a type
In file included from /home/bvanevery/devel/ogre/RenderSystems/GL3Plus/src/GLX/OgreGLXGLSupport.cpp:39:0,
                 from /home/bvanevery/devel/build/ogre/RenderSystem_GL3Plus/compile_RenderSystem_GL3Plus_0.cpp:39:
/usr/include/X11/extensions/Xrandr.h:163:1: error: ‘Status’ does not name a type
/usr/include/X11/extensions/Xrandr.h:179:1: error: ‘Status’ does not name a type
/usr/include/X11/extensions/Xrandr.h:187:1: error: ‘Status’ does not name a type
/usr/include/X11/extensions/Xrandr.h:237:1: error: ‘Status’ does not name a type
/usr/include/X11/extensions/Xrandr.h:380:1: error: ‘Status’ does not name a type
/usr/include/X11/extensions/Xrandr.h:441:1: error: ‘Status’ does not name a type
/usr/include/X11/extensions/Xrandr.h:475:1: error: ‘Status’ does not name a type
In file included from /home/bvanevery/devel/build/ogre/RenderSystem_GL3Plus/compile_RenderSystem_GL3Plus_0.cpp:39:0:
/home/bvanevery/devel/ogre/RenderSystems/GL3Plus/src/GLX/OgreGLXGLSupport.cpp: In member function ‘void Ogre::GLXGLSupport::switchMode(Ogre::uint&, Ogre::uint&, short int&)’:
/home/bvanevery/devel/ogre/RenderSystems/GL3Plus/src/GLX/OgreGLXGLSupport.cpp:907:140: error: ‘XRRSetScreenConfigAndRate’ was not declared in this scope
In file included from /home/bvanevery/devel/build/ogre/RenderSystem_GL3Plus/compile_RenderSystem_GL3Plus_0.cpp:40:0:
/home/bvanevery/devel/ogre/RenderSystems/GL3Plus/src/GLX/OgreGLXWindow.cpp: In member function ‘virtual void Ogre::GLXWindow::create(const String&, Ogre::uint, Ogre::uint, bool, const NameValuePairList*)’:
/home/bvanevery/devel/ogre/RenderSystems/GL3Plus/src/GLX/OgreGLXWindow.cpp:293:4: warning: narrowing conversion of ‘samples’ from ‘Ogre::uint {aka unsigned int}’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/bvanevery/devel/ogre/RenderSystems/GL3Plus/src/GLX/OgreGLXWindow.cpp: In member function ‘virtual void Ogre::GLXWindow::copyContentsToMemory(const Ogre::PixelBox&, Ogre::RenderTarget::FrameBuffer)’:
/home/bvanevery/devel/ogre/RenderSystems/GL3Plus/src/GLX/OgreGLXWindow.cpp:709:19: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
/home/bvanevery/devel/ogre/RenderSystems/GL3Plus/src/GLX/OgreGLXWindow.cpp:710:15: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
In file included from /home/bvanevery/devel/build/ogre/RenderSystem_GL3Plus/compile_RenderSystem_GL3Plus_0.cpp:14:0:
/home/bvanevery/devel/ogre/RenderSystems/GL3Plus/src/OgreGL3PlusHardwarePixelBuffer.cpp: At global scope:
/home/bvanevery/devel/ogre/RenderSystems/GL3Plus/src/OgreGL3PlusHardwarePixelBuffer.cpp:41:12: warning: ‘int computeLog(GLuint)’ defined but not used [-Wunused-function]
make[2]: *** [RenderSystems/GL3Plus/CMakeFiles/RenderSystem_GL3Plus.dir/__/__/RenderSystem_GL3Plus/compile_RenderSystem_GL3Plus_0.cpp.o] Error 1
make[1]: *** [RenderSystems/GL3Plus/CMakeFiles/RenderSystem_GL3Plus.dir/all] Error 2
make: *** [all] Error 2
*** Failed ***
0 x

Syniurge
Halfling
Posts: 40
Joined: Thu Aug 30, 2012 1:43 pm
Location: France

Re: OpenGL 3+ RenderSystem

Post by Syniurge » Mon Apr 01, 2013 12:29 pm

Code: Select all

In file included from /home/bvanevery/devel/ogre/RenderSystems/GL3Plus/src/GLX/OgreGLXGLSupport.cpp:39:0,
                 from /home/bvanevery/devel/build/ogre/RenderSystem_GL3Plus/compile_RenderSystem_GL3Plus_0.cpp:39:
/usr/include/X11/extensions/Xrandr.h:163:1: error: ‘Status’ does not name a type
/usr/include/X11/extensions/Xrandr.h:179:1: error: ‘Status’ does not name a type
/usr/include/X11/extensions/Xrandr.h:187:1: error: ‘Status’ does not name a type
/usr/include/X11/extensions/Xrandr.h:237:1: error: ‘Status’ does not name a type
/usr/include/X11/extensions/Xrandr.h:380:1: error: ‘Status’ does not name a type
/usr/include/X11/extensions/Xrandr.h:441:1: error: ‘Status’ does not name a type
/usr/include/X11/extensions/Xrandr.h:475:1: error: ‘Status’ does not name a type
In file included from /home/bvanevery/devel/build/ogre/RenderSystem_GL3Plus/compile_RenderSystem_GL3Plus_0.cpp:39:0:
/home/bvanevery/devel/ogre/RenderSystems/GL3Plus/src/GLX/OgreGLXGLSupport.cpp: In member function ‘void Ogre::GLXGLSupport::switchMode(Ogre::uint&, Ogre::uint&, short int&)’:
/home/bvanevery/devel/ogre/RenderSystems/GL3Plus/src/GLX/OgreGLXGLSupport.cpp:907:140: error: ‘XRRSetScreenConfigAndRate’ was not declared in this scope
Weird because Xrandr.h includes Xlib.h and Xlib.h has

Code: Select all

#define Status int
0 x

Syniurge
Halfling
Posts: 40
Joined: Thu Aug 30, 2012 1:43 pm
Location: France

Re: OpenGL 3+ RenderSystem

Post by Syniurge » Mon Apr 01, 2013 1:02 pm

Just tried, the 1.9 branch with RenderSystem_GL3Plus builds fine on Ubuntu 12.10.

edit: and it works quite well! :D
Image
bugs here and there in the samples but it seems pretty stable. Thanks masterfalcon!
0 x

User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
Contact:

Re: OpenGL 3+ RenderSystem

Post by masterfalcon » Mon Apr 01, 2013 4:25 pm

I think you guys may be missing some of the XRandR dev packages. It builds fine for me on Ubuntu.
0 x

dermont
Orc Shaman
Posts: 782
Joined: Thu Dec 09, 2004 2:51 am
x 9

Re: OpenGL 3+ RenderSystem

Post by dermont » Mon Apr 01, 2013 4:44 pm

masterfalcon wrote:I think you guys may be missing some of the XRandR dev packages. It builds fine for me on Ubuntu.
Not sure the error: ‘Status’ is related to missing XRandR dev libraries. The error only occurs on Unity builds and I think is related to the following from OgreResourceGroupManager.cpp and the order in which the headers are pulled in (????).

Code: Select all

// If X11/Xlib.h gets included before this header (for example it happens when
// including wxWidgets and FLTK), Status is defined as an int which we don't
// want as we have an enum named Status.
#ifdef Status
#undef Status
#endif
For me redefining Status in OgreGLXGLSupport.cpp, allows the build to complete but I'm not sure what issues this will cause.

Code: Select all

...
#include "OgreGLXWindow.h"

#ifndef Status
#define Status int
#endif

#include <X11/extensions/Xrandr.h>
...
0 x

User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
Contact:

Re: OpenGL 3+ RenderSystem

Post by masterfalcon » Mon Apr 01, 2013 4:51 pm

Ah, the unity builds. I haven't used those in a long time. That makes more sense though. I wouldn't think that redefining Status would cause any problems.
0 x

User avatar
bvanevery
Goblin
Posts: 218
Joined: Wed Feb 28, 2007 4:54 am
Location: Asheville, NC

Re: OpenGL 3+ RenderSystem

Post by bvanevery » Mon Apr 01, 2013 8:00 pm

I had Xrandr.h. Sounds like the unity build is behaving like I thought it would, which is why I avoided it for quite awhile. It's not the default build option, so it's not going to get tested as much. Well, at least someone did notice the problem this time, but if bug chasing has to come back to "first, turn off your unity build," that's going to waste people's time.

I've got the latest greatest as of this moment:

Code: Select all

bvanevery@nomad:~/devel/ogre$ hg tip
changeset:   4488:94e06bf2ed48
branch:      v1-9
tag:         tip
user:        wolfmanfx@gmail.com
date:        Mon Apr 01 09:35:13 2013 +0200
summary:     JNI: Add missing imports
I can't select both OGRE_BUILD_RENDERSYSTEM_GL and OGRE_BUILD_RENDERSYSTEM_GL3PLUS in the CMake configuration. I coulda sworn I was able to do it last night, but maybe I wasn't careful. Maybe it's a regression; anyway, it's bugged.
0 x

User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
Contact:

Re: OpenGL 3+ RenderSystem

Post by masterfalcon » Mon Apr 01, 2013 8:12 pm

Nope, works fine.

Please be patient. Remember that we are working in our free time and sometimes you need to be understanding for some of the lesser tested features. We'll get to it. I understand that it's frustrating.
0 x

User avatar
bvanevery
Goblin
Posts: 218
Joined: Wed Feb 28, 2007 4:54 am
Location: Asheville, NC

Re: OpenGL 3+ RenderSystem

Post by bvanevery » Mon Apr 01, 2013 8:23 pm

masterfalcon wrote:Nope, works fine.
Doesn't work fine here. Completely deleted the CMake cache and the out-of-source build directory. I'm doing a from scratch build, so I think your build isn't clean. Either that or it's a platform difference.
Please be patient. Remember that we are working in our free time and sometimes you need to be understanding for some of the lesser tested features. We'll get to it. I understand that it's frustrating.
I'm working in my free time as well. My point is that unity builds aren't worth the time.
0 x

User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
Contact:

Re: OpenGL 3+ RenderSystem

Post by masterfalcon » Mon Apr 01, 2013 8:34 pm

What exactly is the problem that you're encountering? GL3+ isn't enabled by default. But enabling it allows both to be built. Check that you don't have any changes in the CMake files that may have prevented updating from working.
0 x

User avatar
bvanevery
Goblin
Posts: 218
Joined: Wed Feb 28, 2007 4:54 am
Location: Asheville, NC

Re: OpenGL 3+ RenderSystem

Post by bvanevery » Mon Apr 01, 2013 8:36 pm

Well as it turns out it's really very simple. ogre/CMakeLists.txt in https://bitbucket.org/sinbad/ogre/ hasn't been modified in 20 days and has this code:

Code: Select all

if(OGRE_BUILD_RENDERSYSTEM_GL3PLUS)
  set(OGRE_BUILD_RENDERSYSTEM_GL FALSE)
endif()
I tentatively conclude your changes to this file didn't get pushed out.

OOPS not so fast I'm staring at a default branch on that server. Hold on...

WTF. v1-9 is fine, doesn't have those lines. Why is my local repository saying it's v1-9 but doesn't have correct code? Sigh. SOB, can't rely on "hg tip" to tell me what branch I'm using. Must use "hg branch". Improving my hg skills. Hrm, that was annoying. "hg branch" talks about using hg update to change branches. But "hg update" talks about revisions, not branches. "hg update -r v1-9" produced the desired effect though. Now I can build both renderers. Normal build started with "make -j 2" at ~4PM, will see how long it takes.
Last edited by bvanevery on Mon Apr 01, 2013 8:58 pm, edited 3 times in total.
0 x

User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
Contact:

Re: OpenGL 3+ RenderSystem

Post by masterfalcon » Mon Apr 01, 2013 8:40 pm

Nope. https://bitbucket.org/sinbad/ogre/commi ... eLists.txt.

What branch are you working out of? You should be using v1-9 if you want to use GL3+ at this time.
0 x

User avatar
bvanevery
Goblin
Posts: 218
Joined: Wed Feb 28, 2007 4:54 am
Location: Asheville, NC

Re: OpenGL 3+ RenderSystem

Post by bvanevery » Mon Apr 01, 2013 10:18 pm

Build and selection of GL or GL3PLUS renderers works! Thanks David (masterfalcon). That will ease debugging.

The error with the GL3PLUS renderer on my NVIDIA GeForce 8600M GT driver 310.40 is still present. Syniurge, I bet you're not using old HW like that. Plain GL renderer works fine.

Build time was ~45 minutes. Might go faster because I accidentally had my laptop set to "Power Saving" for 60% of the time. Switching to "Maximum Performance" unthrottles the CPU.
0 x

User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
Contact:

Re: OpenGL 3+ RenderSystem

Post by masterfalcon » Mon Apr 01, 2013 10:30 pm

It's been a little while in this thread, would you mind refreshing my memory on that error?
0 x

Post Reply