View Full Version : glSelectBuffer
05-31-2001, 12:59 PM
I want to paint different patterns on the surface of my figure in OpenGL. One of you guys told me that I could use glSelectBuffer to do that. In the docs for glSelectBuffer
they say that one can use that for determining which primitives
are drawn in some regions of a window. That is how far I understand Well, I´m quiet new to OpenGL so I guess it´s because of that.
But can somebody give me a hint how it works?? Is there any nice examples I can look at??
05-31-2001, 01:46 PM
glSelectBuffer is for picking and selection procedures, You need paint patterns interactively?
[This message has been edited by Boresight (edited 05-31-2001).]
05-31-2001, 02:17 PM
I´d like to paint when I create the figure ( or after), but I´m planning to make a "video" if it works fine. So in that case I don´t want to create my object over and over again, just paint over the old "paint".
06-01-2001, 06:39 AM
Picking and selecting can identify a particular polygon at the mouse coordinates. Then you can do something with that polygon ( change its color? ). All my polys are saved in a vector and when one is picked I go to that particular one ( the position equals its name ) and do something. Both the Red book and the Superbible cover picking and at least the Red book is online.
06-01-2001, 07:56 AM
I don't know how glSelectBuffer can help you about drawing patterns on surfaces.
What do you want to do?
Maybe we can help you.
06-01-2001, 08:17 AM
Ok. First thanks for your help so far. Maybe I can use the glSelectBuffer... But I´ll explain it as good as I can...
The goal is to display a pattern, over a figure of a head, that shows the intensity over the head. (EEG-signals) I have ~20 points that I´d like to assign different colour depending on the intensity and then mix this colours over the head to get a nice picture...
First, this will just be done when I create the head and nothing will be changed. But I plan to make a "video" out of it when it runs good, so I´d like to be able to change the pattern without re-create the head...
06-01-2001, 08:25 AM
About the glSelectBuffer:
If I can detect which polygon I hit with the mouse I should be able to use it for detecting in which polygon of my head a specific coordinate is placed???
06-03-2001, 08:29 PM
glSelectBuffer returns the name, and highest z and lowest z values for the polygons.
It will of course return the name of the polygon.
Check out picksquare inside the read book.
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.