Porting to 2.x using GL3+

Problems building or running the engine, queries about how to use features etc.
Post Reply
caduceus
Goblin
Posts: 224
Joined: Tue May 08, 2012 6:39 am

Porting to 2.x using GL3+

Post by caduceus »

Hi,

I was using Ogre 1.8 version and i was using opengl render system and everything was working for me. Recently I decided to move to Ogre 2.x and to use GL3+ render system and I followed the forums and sample browser code to set up RTSS. As of now after porting to Ogre 2.x I am able to use opengl render system successfully but when I tried to use GL3+ i am not getting anything on screen.

I can see that RTSS is successfully generating the shaders for my material but somehow I am getting blank output. Looking at the the ogre.log file I see following:

Code: Select all

03:37:20: OpenGL:message(ÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌmessage) 131185: Buffer detailed info: Buffer object 7 (bound to GL_PIXEL_PACK_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use VIDEO memory as the source for buffer object operations.
03:37:20: OpenGL:message(ÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌmessage) 131185: Buffer detailed info: Buffer object 7 (bound to GL_PIXEL_PACK_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use VIDEO memory as the source for buffer object operations.
03:37:20: OpenGL:performance(medium) 131186: Buffer performance warning: Buffer object 7 (bound to GL_PIXEL_PACK_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) is being copied/moved from VIDEO memory to DMA CACHED memory.
03:37:20: OpenGL:performance(medium) 131154: Pixel-path performance warning: Pixel transfer is synchronized with 3D rendering.
03:37:20: OpenGL:message(ÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌmessage) 131185: Buffer detailed info: Buffer object 7 (bound to GL_PIXEL_PACK_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use DMA CACHED memory as the source for buffer object operations.
03:37:20: OpenGL:message(ÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌmessage) 131185: Buffer detailed info: Buffer object 7 (bound to GL_PIXEL_PACK_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use DMA CACHED memory as the source for buffer object operations.
03:37:20: OpenGL:message(ÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌmessage) 131185: Buffer detailed info: Buffer object 7 (bound to GL_PIXEL_PACK_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use VIDEO memory as the source for buffer object operations.
03:37:20: OpenGL:message(ÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌmessage) 131185: Buffer detailed info: Buffer object 7 (bound to GL_PIXEL_PACK_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use VIDEO memory as the source for buffer object operations.
03:37:20: OpenGL:performance(medium) 131186: Buffer performance warning: Buffer object 7 (bound to GL_PIXEL_PACK_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) is being copied/moved from VIDEO memory to DMA CACHED memory.
03:37:20: OpenGL:performance(medium) 131154: Pixel-path performance warning: Pixel transfer is synchronized with 3D rendering.
03:37:20: OpenGL:message(ÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌmessage) 131185: Buffer detailed info: Buffer object 7 (bound to GL_PIXEL_PACK_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use DMA CACHED memory as the source for buffer object operations.
03:37:20: OpenGL:message(ÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌmessage) 131185: Buffer detailed info: Buffer object 7 (bound to GL_PIXEL_PACK_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use DMA CACHED memory as the source for buffer object operations.
03:37:20: OpenGL:message(ÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌmessage) 131185: Buffer detailed info: Buffer object 7 (bound to GL_PIXEL_PACK_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use VIDEO memory as the source for buffer object operations.
03:37:20: OpenGL:message(ÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌmessage) 131185: Buffer detailed info: Buffer object 7 (bound to GL_PIXEL_PACK_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use VIDEO memory as the source for buffer object operations.
03:37:20: OpenGL:performance(medium) 131186: Buffer performance warning: Buffer object 7 (bound to GL_PIXEL_PACK_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) is being copied/moved from VIDEO memory to DMA CACHED memory.
03:37:20: OpenGL:performance(medium) 131154: Pixel-path performance warning: Pixel transfer is synchronized with 3D rendering.
03:37:20: OpenGL:message(ÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌmessage) 131185: Buffer detailed info: Buffer object 7 (bound to GL_PIXEL_PACK_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use DMA CACHED memory as the source for buffer object operations.
03:37:20: OpenGL:message(ÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌmessage) 131185: Buffer detailed info: Buffer object 7 (bound to GL_PIXEL_PACK_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use DMA CACHED memory as the source for buffer object operations.
Am I missing something while using GL3+. Can someone please help me fix this issue.

Thanks,
al2950
OGRE Expert User
OGRE Expert User
Posts: 1227
Joined: Thu Dec 11, 2008 7:56 pm
Location: Bristol, UK
x 157

Re: Porting to 2.x using GL3+

Post by al2950 »

RTSS does not work with Ogre 2.x, you should be using HLMS. Furthermore if you are following a tutorial for RTSS, it will be for Ogre 1.x and most certainly work with 2.x.

I would start a very simple scene with Ogre 2.x, no complex shaders and no complex rendering chain, just so you get to know how it works. You need to carefully look through the samples that come with Ogre 2.1, and understand the compositor system and then HLMS. There is a lot of info in the forums, and the samples are also very clear, also make sure you have a read of the porting manual;
https://bitbucket.org/sinbad/ogre/src/d ... dt?at=v2-1
xrgo
OGRE Expert User
OGRE Expert User
Posts: 1148
Joined: Sat Jul 06, 2013 10:59 pm
Location: Chile
x 168

Re: Porting to 2.x using GL3+

Post by xrgo »

exactly, this is a very confusing era in Ogre, because very different versions of Ogre coexists. Most of the documentation is for 1.X, everything that is different is documented in the porting manual, 2.1 introduced significant changes, mainly the use of HLMS, and 2.0 is somewhere in between.
Last edited by xrgo on Mon May 04, 2015 4:27 pm, edited 1 time in total.
al2950
OGRE Expert User
OGRE Expert User
Posts: 1227
Joined: Thu Dec 11, 2008 7:56 pm
Location: Bristol, UK
x 157

Re: Porting to 2.x using GL3+

Post by al2950 »

This is very true, however Ogre 2.x has not been officially released, and with all projects, open source or not, documentation and tutorials tend to be done last! The Ogre team could keep Ogre 2.x private until its finished including tutorials written for it in the wiki, but no one wants that!!
caduceus
Goblin
Posts: 224
Joined: Tue May 08, 2012 6:39 am

Re: Porting to 2.x using GL3+

Post by caduceus »

The initial issue is fixed and thank you all for your inputs. I am now stuck at initialization of overlay system. I read in forums and followed the given code in samples and in forums but still getting crash at following line

Code: Select all

	mRoot = OGRE_NEW Ogre::Root( mPluginsCfg, ogreCfgPath, ogreLogPath);
	mOverlaySystem = OGRE_NEW Ogre::OverlaySystem();   // CRAAAAAAASH
Please let me know in case I am doing anything wrong.
scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
x 216

Re: Porting to 2.x using GL3+

Post by scrawl »

Have you tried calling Root::initialise before creating the OverlaySystem?
caduceus
Goblin
Posts: 224
Joined: Tue May 08, 2012 6:39 am

Re: Porting to 2.x using GL3+

Post by caduceus »

Yes I tried it and it still is crashing. I also tried to debug it so that I can step into ogre code from vs2010 but somehow its not stepping into the code even though i placed pdb files in my project directory
caduceus
Goblin
Posts: 224
Joined: Tue May 08, 2012 6:39 am

Re: Porting to 2.x using GL3+

Post by caduceus »

On further debugging I found that its crashing at following lines in OgreOverlaySystem constructor

Code: Select all

mOverlayManager->addOverlayElementFactory(OGRE_NEW Ogre::PanelOverlayElementFactory());
mOverlayManager->addOverlayElementFactory(OGRE_NEW Ogre::BorderPanelOverlayElementFactory());
mOverlayManager->addOverlayElementFactory(OGRE_NEW Ogre::TextAreaOverlayElementFactory());
Any ideas?
Post Reply