C#: problems with gluPickMatrix()
Tried using the Picking using NeHeGL C#, and it's not working right. This
GLU.gluPickMatrix((double) e.X, (double) (viewport[3]-e.Y), 1.0f, 1.0f, viewport);
won't compile because it says it cannot convert from int[] to int.
This
GLU.gluPickMatrix((double) e.X, (double) (viewport[3]-e.Y), 1.0f, 1.0f, viewport[0]);
throws NullObjectReference exception.
Any ideas?
the thing is that a viewport HAS to be an array of integers.. here's part of my c# working code:
int [] viewport=new int[4];
GL.glGetIntegerv(GL.GL_VIEWPORT,viewport);
GLU.gluPickMatrix(mouse_x,(double)(viewport[3]-mouse_y),1.0,1.0,viewport);
hope to have helped...
:)
int [] viewport=new int[4];
GL.glGetIntegerv(GL.GL_VIEWPORT,viewport);
GLU.gluPickMatrix(mouse_x,(double)(viewport[3]-mouse_y),1.0,1.0,viewport);
hope to have helped...
:)
follow the yellow brick road
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement