View Full Version : A picture in a wall, without create a new object

01-13-2001, 09:03 AM
Hello. I need to know if there is a function that allow me to put an image in a face of an object, but not as a texture. I want to put an image with dimensions that arenīt power of 2 in a face of an object, like a picture in a wall. So, I need a fuction that paste this image in the object as a bitmap, not as a texture. Anybody can help me?
Thank you.

01-13-2001, 01:28 PM
it is using a texture but its the obvious example
no need to be powers of 2

01-13-2001, 02:28 PM
I knew the function glTexSubImage2D(..), but this isnīt what I need, because it only can paste an image replacing a part of a texture, but in the range of the originally defined texture array. My problem is that I take a small array of texture and I repeat this texture for cover all the face of an object. Then, when I have cover all the face repeating the texture, I need to paste an image in a determined place of the face. With glTexSubImage2D(..), I can paste this image in the original small array of texture. Then, when I repeat this texture, the image is repeating too.
Thank you, in any case.

01-13-2001, 09:06 PM
use 2 images one for the wall and the other for the picture position the picture in front of the wall or u could position it at the same z distance but make sure u use eg glDepthFunc(GL_LEQUAL).
make the parts of the pictures textures u dont wanna see have zero alpha values and enable alpha testing