[Plib-users] Texture remains enabled after first use
Brought to you by:
sjbaker
From: Daniel S. <djs...@uc...> - 2004-12-30 19:45:06
|
Hi - I have a simple app which draws a textured shape, then draws a non-textured (solid color) shape. Problem is that the non-textured shape uses the same texture that the textured shape did. Full disclosure: My non-textured shape is a custom class derived from ssgaShape. It implements a rectangle in this test phase. If I reverse the order that the shapes are added to the root, the problem disappears. If I explicitly use a state (for the non-textured shape) that calls rect_state -> disable ( GL_TEXTURE_2D ) ; then the problem disappears also. It seems that when a leaf which uses texture is rendered, the GL state GL_TEXTURE_2D remains enabled until it is explicitly disabled. Is this by design? If so, is this true of other enable/disable states? Thanks, Dan |