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 2 of 2

Thread: Texture on selected polys

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2012
    Posts
    8

    Texture on selected polys

    Using display lists, I'm trying to put texture on some, but not all of an object's polys. For example, I have a monitor object. I want to map a texture to just the monitor screen, and just color the rest of the object. And this works fine on my dev computer. But NOT on any other computer, so far. I get the texture where I want it, but the color of all other polys is affected by the texture. I'm guessing that it takes the color of the pixel at 0,0 and applies that.

    I've tried and retried many combinations of glEnable(GL_TEXTURE_2D) and glDisable(GL_TEXTURE_2D), glBindTexture( GL_TEXTURE_2D, texture ) and glBindTexture( GL_TEXTURE_2D, 0 ), inside and outside of the display list. No luck.

    I'm starting to contemplate breaking up the display list into textured and non-textured polys. Or putting a dot of the desired color in the texture. But I thought I'd check here first.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    1,098
    I'm starting to contemplate breaking up the display list into textured and non-textured polys
    This is the normal way.

    You can try using clipping planes or more simply set the texture coordinates for triangles you don't want textured to 0,0 on all vertices

Posting Permissions

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