1. Get Flat 60% Discount on Architectural 3D Rendering, 3D Modeling Animation and Walkthrough
3. Help required: using an image behind 3D rendering
Can anyone help me with a programming problem or point me at a suitable tutorial? I want to use a pixelmap (Windows bitmap) as a background for a 3D rendering. I can render the 3D models without the background, and I can draw the image (using glDrawPixel), but when I try and combine the two I don't get the objects in front of the image. What I've done is write an image that occupies half the window (using glDrawPixel), then render the 3D objects. What I'd hoped for was the image 'behind' the 3D objects. What I get is the image (with no 3D objects visible)in its half of the window, with the 3D objects visible in the half of the window not covered by the image. My guess is that when I do the DrawPixel, the image is transfered to the frame buffer with the depth buffer marked as though it was an object at the front of the display space, so the 3D objects are always behind it (I've tried GL_DEPTH_BIAS to 'move the image back' without effect). Either that or the pipeline is reordering events so the 3D objects are rendered, then the image overwrites them. Either way it doesn't do what I expect. Thanks for any help anyone can provide. Clive Pygott