From: <no...@so...> - 2001-07-17 17:39:32
|
Bugs item #441859, was opened at 2001-07-16 17:58 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=100003&aid=441859&group_id=3 Category: mesa-core Group: Rendering Error Status: Open Resolution: None Priority: 5 Submitted By: Michael Saunders (rms7326) Assigned to: Nobody/Anonymous (nobody) Summary: glColorMaterial fails with strips Initial Comment: Using glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE) in conjunction with GL_QUAD_STRIP blocks does not always color/light the surface correctly. The first few strips shade well and then suddenly the strip turns black. This occurs only when lighting is used. If we turn lighting off the strips are colored correctly. We noticed that if we deliver a color at each vertex then glColorMaterial seems to track lighting correctly. I should note that this problem occurs on Intel Linux 2.2 machine but not on our Solaris 7 machine. One difference between the two builds is that I compiled the Solaris 7 platform so that it did not use the Sparc ASM code (i.e. USE_SPARC_ASM is commented out in conf.h because it won't compile otherwise). So I suppose it is possible that the problem is in that or other platform specific code (including the graphics card I suppose). Our linux machine has a GForce 2 Ulta. ---------------------------------------------------------------------- >Comment By: Michael Saunders (rms7326) Date: 2001-07-17 10:39 Message: Logged In: YES user_id=217333 After further investigation I discovered that I mistated when I said that Solaris 7 did not exhibit the problem. This is not true and I was able to get Solaris 5 and 7 to fail as well. I tried to reduce the problem to as small as possible. While I was doing this I notied some interesting points. 1) If we turned off drawing of the lines strips that are also in this plot the shading problems went away. Next I ran a larger problem and discoverd that with larger problems it didn't matter if I turned the line strips on or not. 2) When I linked the debug build of our application to the release build of the Mesa 3.5 library the problem did not exhibit itself. However when I linked the release build of our application to the release build of the Mesa 3.5 library the problem did exhibit itself. Initially I had assumed that we must be sending different instructions to Mesa with our debug and release builds. So I turned on our logging feature which outputs the OpenGL statements delivered to Mesa and compared the two. The diffs were identical. This leads me to believe that the problem is an uninitialized variable inside the code that processes strips and tracks the color and lighting (glColorMaterial). I have included the log output as an attachment. The instructions are all executable so if you need to paste it into a c program it should work fine. The log contains all the instructions send to Mesa with their respective arguments. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=100003&aid=441859&group_id=3 |