Contributor posted 07-13-2003 06:07 AM
Hi opengl people!! thank you fisrt of all for ur interess in my question.
I will try to be more understandable.
I have a cursor that i can move on a window of opengl. That cursor draw a red path along the way he “walk”. My problem is that i want to make impossible for the “player” to move the cursor on a path segment he still “walked”, like it was a wall. Now i m understanding i have to recognize where the wall is. My question is can i read from the colour of the pixel in the window if there is a wall or not. In few words i would like to read the colour of a pixel in the opengl window without save in a array each pixel i have drawn before. I know there is a buffer as the depth buffer from where u can read the information of a pixel with a function (i think glReadPixel but i didnt it before and the tutorials i did read are too difficult for me. If u were so gently to wrote me a little example that were beautifull!!!
I would need something like
colorofxypixel = glreadthecolorofxypixel
but i dont know how to dooooo
i use glut and opengl libraries i did study a little c and c++ but not win32 or such things like mfc and co…
(my target were to program a little wolfied game because in that i have i cannot save my play…)
So thank u all and good programming day!!
Frequent Contributor posted 07-13-2003 07:29 PM
(a) This is a beginner question and not appropriate for this forum.
(b) Do a search on the web for glReadPixel and you’ll find all the information you need on how to use it.
Contributor posted 07-14-2003 12:52 AM
dear rgpcfogkals i have to learn something to you!
In the past i have always thunk that beginners doesnt need very eccellent material or professors because they dont need 100% of precision, they are only beginners…
But now that i ma a little older i can surely tell you that that was a wrong idea i had!
If a beginner learn from a beginner and he does all the thing with 60-80% precision, after a couple of years it will be impossible for him to really return at the perfect methodology of work he wanted at the start from professionally professors. I simply dont want to get stupid habit. But now i did see wath for a technician are u…
That is stupid you wirte to me an answer (i was so happy there was one…) in wich u tell me u are profi and i m only a ****… so uselessy… U are sure profi with opengl but please try to be more modest in your life!!!