View Full Version : Texturing problem

11-02-2002, 10:20 AM
I have a strange problem with OpenGL. I just can't bring my polygons to be textured. Here are the steps I take:

Init a float array with red values.
glTexImage1D() pointing to that array.
Drawing the polygon using glTexCoord*() and glVertex*() for every vertex.

The polygon appears with the color set by glColor*(). Can anyone help?

11-02-2002, 12:47 PM
Are you binding the texture before you draw?
Look at glBindTexture if you're not...

Hope that helps.

Old GLman
11-02-2002, 03:14 PM
If your trying to texture polygons, you will probably want to use glTexImage2D rather than 1D because 1D textures have a height or width of 1. 1D textures are single pixel high or wide, so thats probably why your not seeing it.

Old GLman

11-03-2002, 12:58 AM
I've solved my problem, thanks. I was using one-dimensional textures just to see, if it works, since they are much simpler to code.