Rendering error after shoggoth upgrade.

Problems building or running the engine, queries about how to use features etc.
Post Reply
Phobius
Halfling
Posts: 63
Joined: Sat Dec 27, 2008 6:51 am

Rendering error after shoggoth upgrade.

Post by Phobius » Fri Jan 02, 2009 5:52 am

After upgrading to shoggoth, my app is no longer working as it should. This includes any of the demos ogre comes with. I've attached a screenshot of the Skybox demo. This is similar to what I get: no textures, screwy overlays. This only happens with the GL renderer. Eihort worked fine. Any ideas?

P.S.

I remember seeing a picture of the same screwy text on the demo FPS counter somewhere on these forums, anyone remember the article?
Attachments
error.JPG
error.JPG (12.45 KiB) Viewed 1103 times
0 x

Phobius
Halfling
Posts: 63
Joined: Sat Dec 27, 2008 6:51 am

Re: Rendering error after shoggoth upgrade.

Post by Phobius » Sat Jan 03, 2009 2:56 am

I would like to bring the reader's attention to this thread: http://www.ogre3d.org/forums/viewtopic. ... gl#p319297. In which a user experiences the exact same problem that I am. This thread comes to a conclusion that it's an ATi linux driver reporting incorrect number of texture units, however my error happens in windows. The machine on which the occurs is running a Mobility Radeon 9100 IGP. Worked fine in Eihort (1.4.8 ), broken in Shoggoth (1.6.0).
0 x

User avatar
CoreDumped
Gremlin
Posts: 177
Joined: Sun Aug 05, 2007 3:55 pm

Re: Rendering error after shoggoth upgrade.

Post by CoreDumped » Sat Jan 03, 2009 1:37 pm

This could be due to the new material script parser introduced in 1.6. make sure your texture names that contain a space are enclosed within quotes
0 x

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19261
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
Contact:

Re: Rendering error after shoggoth upgrade.

Post by sinbad » Sat Jan 03, 2009 7:25 pm

Try the Subversion 'v1-6' branch first, there's a bugfix for old Radeon's in there for GL (bad GL caps reporting from ATI on these cards).
0 x

Phobius
Halfling
Posts: 63
Joined: Sat Dec 27, 2008 6:51 am

Re: Rendering error after shoggoth upgrade.

Post by Phobius » Sat Jan 03, 2009 11:43 pm

I have just tried the ogre trunk, and it now crashes on the SkyBox demo. Here's a thing I didn't say before, because I thought it was irrelevant, but is looking more and more relevant. The first time I tried Shoggoth, I got a crash on _setPointParameters(). I saw that the code was incorrectly allowing the use of glPointParameter[f|fv] on cards that only have it as an ARB/EXT. I patched this myself and got it to render what you see in the image attached to my first post in this thread. Now that I have the shoggoth trunk (or ogre trunk in general), i see that someone has patched what I patched myself in an almost identical fashion, so the rendering error above still stands.

Now I get a crash on glBlendEquation() calls. This has something funky to do with either GLEW not doing things right or the RenderSystem_GL not discovering caps correctly (as you have said yourself). I'm hoping that once the capabilities are discovered correctly, bogus functions won't be called and the thing will render fine again. This is the bit that really puzzles me, though. The glPointParameter thing was indeed a fault, because Ogre was assuming glPointParameter availability if the GL_VERSION == 1.4 || EXT || ARB of this function was available; naturally that's wrong because glPointParameter[f|fv][EXT|ARB] need to be used in case of the latter two. So this bit was patched well. But glBlendEquation() is part of the 1.3 specification, and my card is meant to be fully 1.3 compliant! Screwed drivers? I hope to god not because there's no way in hell ATi will update them for a 5 year old card. GLEW assigns glBlendEquation to a null function pointer, resulting in a call to 0x00(). Fun.

I'm happy to try and patch this myself, because I understand it's hard for you guys to work when you don't have the hardware in front of you. So anyway, I'll take a crack at this tonight and report my investigatory finding here.
0 x

Phobius
Halfling
Posts: 63
Joined: Sat Dec 27, 2008 6:51 am

Re: Rendering error after shoggoth upgrade.

Post by Phobius » Sun Jan 04, 2009 10:59 am

The exact same image renders for me. Identical. I got rid of the glBlendEquation() segfault, here is my patch:

Code: Select all

Index: OgreGLRenderSystem.cpp
===================================================================
--- OgreGLRenderSystem.cpp      (revision 8244)
+++ OgreGLRenderSystem.cpp      (working copy)
@@ -1752,7 +1752,11 @@
                        break;
                }
 
-               glBlendEquation(func);
+               if(GLEW_VERSION_1_4 || GLEW_ARB_imaging) {
+                       glBlendEquation(func);
+               }else if(GLEW_EXT_blend_minmax && (func == GL_MIN || func == GL_MAX)){
+                       glBlendEquationEXT(func);
+               }
        }
        //-----------------------------------------------------------------------------
        void GLRenderSystem::_setSeparateSceneBlending(
@@ -1816,7 +1820,11 @@
                        break;
                }
 
-               glBlendEquationSeparate(func, alphaFunc);
+               if(GLEW_VERSION_2_0) {
+                       glBlendEquationSeparate(func, alphaFunc);
+               }else if(GLEW_EXT_blend_equation_separate) {
+                       glBlendEquationSeparateEXT(func, alphaFunc);
+               }
        }
        //-----------------------------------------------------------------------------
        void GLRenderSystem::_setAlphaRejectSettings(CompareFunction func, unsigned char value, bool alphaToCoverage)
Although this didnt actually happen to me, I foresaw the same thing happening with glBlendEquationSeparate() and patched that while i was there. I am currently downloading some oddball drivers called "Omega" for ATi cards, because I already have the latest ATi ones for this card. I'll report on that soon.
0 x

Phobius
Halfling
Posts: 63
Joined: Sat Dec 27, 2008 6:51 am

Re: Rendering error after shoggoth upgrade.

Post by Phobius » Sun Jan 04, 2009 11:02 am

Ahh yes. One more thing. I have looked at GLEW, and it only assigns glBlendEquation a valid address if it's OpenGL 1.4. The OpenGL specifications say 1.3, but GLEW seems to be correct. When I 'injected' the pointer assignment into the 1.3 initialisation function of GLEW, it got a pointer error. Why is that? The specs are wrong? Who can we trust? =)
0 x

Phobius
Halfling
Posts: 63
Joined: Sat Dec 27, 2008 6:51 am

Re: Rendering error after shoggoth upgrade.

Post by Phobius » Sun Jan 04, 2009 12:05 pm

The Omega drivers did the trick.They are version 3.8.252, the absolute latest that came out with support for this card. Actually, they are the latest for all radeons 9000 - 9250. They are some form of a mod of the ATi Catalyst 6.5 drivers, again, the latest catalysts to support the chipset series. Are we considering this a fix? The drivers are to blame? Is my patch above valid, are those checks a good idea? Sure, I guess we can assume that it's pretty hard to find a card lower than 1.2, but they're kicking around. What do you guys think?
0 x

nairboon
Gnoblar
Posts: 7
Joined: Sun Dec 21, 2008 2:38 am

Re: Rendering error after shoggoth upgrade.

Post by nairboon » Wed Jul 15, 2009 3:58 pm

thanks for this patch, it fixed the crash with 1.7
older macbooks have a GMA X3100 card => OpenGL 1.2, I think Ogre should support these cards because they're common in the mac world.
I'll add the patch to sf.
0 x

Post Reply