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.
altren
Gnome
Posts: 334 Joined: Tue Oct 24, 2006 9:02 am
Location: Moscow, Russa
x 26
Post
by altren » Sat Feb 06, 2021 7:26 pm
I've bisected, that this commit cause troubles creating OpenGL3 render system inside SDL2 window:
use CreateContextAttribs for context ceation https://github.com/OGRECave/ogre/commit ... 800e84b893
Without this commit my
RenderSystem::mDriverVersion is 4.6, and with it it is only 3.0, thus now I'm crashing on this assert (this is old assert):
Code: Select all
OgreAssert(hasMinGLVersion(3, 3), "OpenGL 3.3 is not supported");
Last edited by altren on Sun Feb 07, 2021 3:07 am, edited 1 time in total.
paroj
OGRE Team Member
Posts: 2136 Joined: Sun Mar 30, 2014 2:51 pm
x 1145
Post
by paroj » Sat Feb 06, 2021 9:24 pm
what if you use maxVersion = 4 instead of maxVersion = 5?
altren
Gnome
Posts: 334 Joined: Tue Oct 24, 2006 9:02 am
Location: Moscow, Russa
x 26
Post
by altren » Sun Feb 07, 2021 12:44 am
Changing to `int maxVersion = 4;` fixed the issue. Thank you. I'm too lazy to make a pull request with a single character, though
EDIT: oh wait, this line was removed in latest master.
altren
Gnome
Posts: 334 Joined: Tue Oct 24, 2006 9:02 am
Location: Moscow, Russa
x 26
Post
by altren » Sun Feb 07, 2021 12:55 am
Here is working solution for master. I don't know if this is correct for every uses, so I'm rather post it here.
I've added minorVersion variable that is set to 3 in
default block.
Code: Select all
int majorVersion;
int minorVersion = 0;
switch(mContextProfile) {
case CONTEXT_COMPATIBILITY:
profile = WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB;
majorVersion = 1;
break;
case CONTEXT_ES:
profile = WGL_CONTEXT_ES2_PROFILE_BIT_EXT;
majorVersion = 2;
break;
default:
profile = WGL_CONTEXT_CORE_PROFILE_BIT_ARB;
majorVersion = 3;
minorVersion = 3;
break;
}
int context_attribs[] = {
WGL_CONTEXT_MAJOR_VERSION_ARB, majorVersion,
WGL_CONTEXT_MINOR_VERSION_ARB, minorVersion,
WGL_CONTEXT_PROFILE_MASK_ARB, profile,
0
};
paroj
OGRE Team Member
Posts: 2136 Joined: Sun Mar 30, 2014 2:51 pm
x 1145
Post
by paroj » Sun Feb 07, 2021 1:11 am
does that give you exactly a 3.3 context or larger one (e.g. 4.6 as before)?
altren
Gnome
Posts: 334 Joined: Tue Oct 24, 2006 9:02 am
Location: Moscow, Russa
x 26
Post
by altren » Sun Feb 07, 2021 2:09 am
3.3
altren
Gnome
Posts: 334 Joined: Tue Oct 24, 2006 9:02 am
Location: Moscow, Russa
x 26
Post
by altren » Sun Feb 07, 2021 2:19 am
And just in case, there is exactly same code and same issue in the `GLXGLSupport::createNewContext`. Setting 3.3 there helps as well.
paroj
OGRE Team Member
Posts: 2136 Joined: Sun Mar 30, 2014 2:51 pm
x 1145
Post
by paroj » Sun Feb 07, 2021 2:29 am
fixed in
https://github.com/OGRECave/ogre/pull/1882
being nailed at 3.3 is actually a AMD driver issue, but that should be ok for now.
altren
Gnome
Posts: 334 Joined: Tue Oct 24, 2006 9:02 am
Location: Moscow, Russa
x 26
Post
by altren » Sun Feb 07, 2021 2:47 am
Thank you!