View Full Version : 1D and 2D textures in the same project

12-15-2003, 08:52 AM
i have 2 textures in my project. the first one is a 1D texture that colors the DL depending on the elevation. the second texture is an image that is draped on the DL. now the problem is that if i call the function to generate the 1D texture first, then the 2d texture is messed up along the plane parallel to the y-axis. if i call the function to generate the 2d texture first, then the 1d tex gets messed up. i am disabling all the necessary things. could someone help?
thank u

12-15-2003, 11:28 PM
There can only be one texture bound per physical texture unit.
If you bind two different texture targets to the same texture unit the higher dimensionnal one takes precedence.
If you want to use two textures simultaneaously, you need to have them bound to different texture units (see glActiveTexture) and use two multitexturing texcoords, one for each units.

(PS: I feel this isn't an advanced forum's question and you should give more precise informations on what you're doing and how the problem looks. It's graphics after all.)