RE: [Plib-devel] SSG bux fixes for untextured .3ds objects
Brought to you by:
sjbaker
From: Ben W. <be...@bg...> - 2000-08-16 16:49:00
|
Did anybody resolve this issue yet. I will take a look at it if you would like. Dan if you can send me your code and the model you are having problems with, I will see what I can do. Later Ben -----Original Message----- From: Dan Gelb [mailto:dg...@hp...] Sent: Monday, August 14, 2000 2:32 PM To: pli...@li... Subject: [Plib-devel] SSG bux fixes for untextured .3ds objects Last week I posted on plib-users about problems I was having with .3ds objects that were not textured. I figured out a couple changes that solved the problems for me, and I'm assuming this is the right place to post them. 1. Non-textured objects show up as white when textured objects drawn before them. I started with the tux ssg example program. One of the textured objects drawn sets the GL_EMISSION material values to 1.0,1.0,1.0. When the .3ds objects are drawn without textures it sets the ambient, diffuse, and specular material properties, but doesn't set the emissive back to 0.0. I added a line to ssgSimpleState::apply to set it to 0.0 if it isn't specified. I don't know if this is the correct place or not. 2. First non-textured object always shows up as white in scene with or without textures I believe this was happening because glDisable(GL_COLOR_MATERIAL) is called AFTER the glMaterial calls in ssgSimpleState::apply. This causes the glMaterial calls to be ignored for the first object, but work for subsequent objects. I think that is what happens. My workaround was to move the ssgDisableTable call to before the glMaterial calls. I don't know if either of these is the proper solution, or if they would break other areas. They seemed to work for me though. Dan _______________________________________________ plib-devel mailing list pli...@li... http://lists.sourceforge.net/mailman/listinfo/plib-devel |