PDA

View Full Version : How to make a buffer to draw on but not render



Schlogenburg
08-01-2000, 05:07 PM
A selection buffer. I want to put polygons there that have a specific color, being their ID and select polygons finding the color of the polygon under the mouse when clicked. All I need is:

SetDrawingBuffer;

draw my ID polygons

end drawing;
setRenderingBuffer;

Kilam Malik
08-02-2000, 01:15 AM
If you are already in double-buffer mode, you can use your back-buffer for selection, clear it afterwards and then use it to render. So you dont have to switch anything. If you want to choose the buffer you want to render, try:

glDrawBuffer();

Look also at glRenderMode(), which gives you another method to select things (Selection and Feedback).

Regards,

Kilam.