I am having some trouble reading what is in the stencil buffer.
Here is a small section of my code:
mpoint is set with a mouseclick
pixwidth is 100
The damn thing crashes every time.
Does anyone have an example of reading what is in the stencil buffer and outputting it into a file?
You say that you only posted part of your code, so you may already be doing the following things.
[li]You didn’t allocate any memory in your example, glReadPixels fills the array pointed to by the last parameter, so if is an illegal pointer that may be your problem[/li]
[li]Don’t read stencil bits as floats, it may not be a problem, but they make no sense as floats so…[/li][/ol]
I hope that helped you
Thnx for the reply…
I thought that pixels would be filled by the function call…guess not. I will try allocating memory beforehand…