From: Brian P. <bri...@tu...> - 2005-02-02 19:16:23
|
Peter Jay Salzman wrote: > I've been going through the Red Book to teach myself OpenGL, but I think > something is very wrong with OpenGL on this system. > > > System specifics: > ----------------- > My system is a dual Celeron 333 with Debian/testing and a Voodoo 5 card. > Installed Mesa packages: > > mesademos 6.2.1-1 Example programs for Mesa (and OpenGL in gen > xlibmesa-dev 4.3.0.dfsg.1-1 XFree86 Mesa development libraries dummy pac > xlibmesa-dri 4.3.0.dfsg.1-1 Mesa 3D graphics library modules [XFree86] > xlibmesa-gl 4.3.0.dfsg.1-1 Mesa 3D graphics library [XFree86] > xlibmesa-gl-de 4.3.0.dfsg.1-1 Mesa 3D graphics library development files [ > xlibmesa-glu 4.3.0.dfsg.1-1 Mesa OpenGL utility library [XFree86] > xlibmesa-glu-d 4.3.0.dfsg.1-1 Mesa OpenGL utility library development file > xlibosmesa-dev 4.3.0.dfsg.1-1 Mesa off-screen rendering library developmen > xlibosmesa3 4.2.1-12.1 Mesa off-screen rendering library [XFree86] > xlibosmesa4 4.3.0.dfsg.1-1 Mesa off-screen rendering library [XFree86] > > My wife's system is an Athlon 1.4 with Debian/testing and a Voodoo 3 card. > Everything appears to work on her system. > > > > The errors: > ----------- > I didn't think anything was wrong before writing my own OpenGL stuff; > sdlquake2 on my system runs great using the SDL OpenGL rendering option. > But there appears to be two things wrong. Maybe they're related. > > First, this code: > > glGetFloatv( GL_ALIASED_LINE_WIDTH_RANGE, lineInfo ); > glGetFloatv( GL_ALIASED_POINT_SIZE_RANGE, pointInfo ); > > printf("line min: %f, max: %f\n", lineInfo[0], lineInfo[1]); > printf("point min: %f, max: %f\n", pointInfo[0], pointInfo[1]); > > on my system produces: > > cpu vendor: GenuineIntel > MMX cpu detected. > libGL: using Glide library libglide3.so.3 > line min: 1.000000, max: 1.000000 > point min: 1.000000, max: 1.000000 > > Only 1 width for lines and 1 size for points: that can't be right. It's allowed by the OpenGL spec. Glide probably doesn't allow wider lines/points. > On my > wife's system, the same executable (I scp'ed it over) produced what I was > expecting it to produce: > > line min: 1.000000, max: 10.000000 > point min: 1.000000, max: 10.000000 Are you sure you're using the hardware driver on this system, and not software rendering? glxinfo should tell you. > The second error: I drew two square polygons: > > > void RenderScene(void) > { > glClear (GL_COLOR_BUFFER_BIT); > glColor3f( 1.0, 1.0, 1.0 ); > > glBegin( GL_POLYGON ); > // CCW on the left will be filled > glVertex2f( 50.0f, 100.0f ); > glVertex2f( 300.0f, 100.0f ); > glVertex2f( 300.0f, 300.0f ); > glVertex2f( 50.0f, 300.0f ); > glEnd(); > > glBegin( GL_POLYGON ); > // CW on the right will be wireframe > glVertex2f( 450.0f, 100.0f ); > glVertex2f( 450.0f, 300.0f ); > glVertex2f( 700.0f, 300.0f ); > glVertex2f( 700.0f, 100.0f ); > glEnd(); > > glFlush(); > } > > > int main(int argc, char *argv[]) > { > // Glut Init stuff snipped > > glClearColor(0.0, 0.0, 0.0, 0.0); > glShadeModel (GL_FLAT); > glPolygonMode( GL_FRONT, GL_FILL ); > glPolygonMode( GL_BACK, GL_LINE ); > > // Glut MainLoop and return 0 snipped > } > > > On my system, the filled square on the left is as expected. However, the > wireframe square on the right only has a single side drawn. The top, right, > and bottom lines appear to be be misssing. So this is what I see: > > xxxxxxxx x > xxxxxxxx x > xxxxxxxx x > xxxxxxxx x > xxxxxxxx x > > On my wife's system, it renders the way I was expecting it to: > > xxxxxxxx xxxxxxxx > xxxxxxxx xxxxxxxx > xxxxxxxx xxxxxxxx > xxxxxxxx xxxxxxxx > xxxxxxxx xxxxxxxx > > Setting MESA_DEBUG=1 didn't reveal any information. I really, really want > to get whatever is wrong fixed; it's ironic that my wife's system seems to > be OK and my system is having these OpenGL problems. > > Both machines run Debian testing and have the same packages. The only > difference is the video cards and monitors. My system has a Voodoo 5 and a > Philips flat screen monitor. Her system has a Voodoo 3 and a run of the > mill monitor. > > Does anyone have any idea what could be going on with my system, and more > importantly, how to fix it? I don't think anyone's worked on the tdfx DRI driver in years. There could certainly be some substantial bugs in it. If you're just doing basic things and learning OpenGL, software rendering with Mesa should suffice. -Brian |