On Sat, 21 Jul 2007 20:45:40 +0300, Adam Balogh <
baloghbh@...> wrote:
> hi
>
> i have this:
> IntPtr winz;
> winz.toPointer();
> (should convert to float? but how?)
> ...
> Gl.glReadPixels(mouse_pos.X, mouse_pos.Y, 1, 1, Gl.GL_DEPTH_COMPONENT,
> Gl.GL_FLOAT, winz);
>
> and i dont get the winz value right,
> /i tried with unsafed mode pointer, but dont change. [*ptr]/
> somehow i would like to get the right winz value. (out, ref doesnt work)
>
> anybody, idea?
>
> bye
Hwllo,
have you tried if the following code works?
float winz;
Gl.glReadPixels(mouse_pos.X, mouse_pos.Y, 1, 1, Gl.GL_DEPTH_COMPONENT,
Gl.GL_FLOAT, out winz);
or
float[] winz = new float[1];
Gl.glReadPixels(mouse_pos.X, mouse_pos.Y, 1, 1, Gl.GL_DEPTH_COMPONENT,
Gl.GL_FLOAT, winz);
Is this Tao 1.3 or Tao 2.0? If it is 1.3, try updating to Tao 2.0 (or use
the beta posted at the forums:
http://www.taoframework.com/forum/development/developertalk/231), some
bugs have been fixed there.
Last, on what platform are you running the code? Mono (1.0/1.2)/.Net (1.1
or higher?), Windows/Linux, x86/x64?
Best regards,
- Stephen A
_______________________________________________
Tao-list mailing list
Tao-list@...
http://galactus.ximian.com/mailman/listinfo/tao-list