vertex reading color how to

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!!

(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.

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!!!

So beginners should ask noob questions in the advanced forum and those interested in advanced topics should put up with stupid little gits with faulty keyboards?

i excuse me for my mistakes but i would like to invite you to write italian like i write english… it could be interessant and funny!
Ehi boy u are a V.I.P. but i dont understand why do u have time to answer such dummy question then… leave me to my life and i will leave to yours! I did ask something u and only you wanted to answer. If u dont want to answer to beginners then go ahead but dont tell me wath i have to do in a free place such this. ok! bye and i hope never to ear of you

You are asking about this?

The man pages are at

All the functions should be there.