Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 1 of 1

Thread: How should I apply 'color texture' and 'shadow mapping' on one model meanwhile?

Hybrid View

  1. #1
    Newbie Newbie
    Join Date
    Jun 2013
    Posts
    1

    Question How should I apply 'color texture' and 'shadow mapping' on one model meanwhile?

    Hi,
    I create a scene, which is composed of one md2 format model and one quad served as a ground. The md2 model has its own color texture, the color texture can be displayed correctly. But when I apply the shadow mapping on the scene, the color texture of the md2 model is displayed incorrectly, the texture coordinate is totally wrong, I feel the issue is in connection with TexGen procedure of shadow mapping, in which the glEnable(GL_TEXTURE_GEN_S/T/R/Q) is called, To my surprised, calling glEnable(GL_TEXTURE_GEN_S/T/R/Q) not only affects the GL_TEXTURE0 (for shadow mapping), but also affects the GL_TEXTURE1, to which the model texture object is bound. I had hoped it is only affect the GL_TEXTURE0.

    Who can tell me how to use them properly meanwhile? Could you please show me some sample code?
    Thanks!
    Last edited by acupoflove; 06-08-2013 at 07:55 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •