Advertisement

C#: problems with gluPickMatrix()

Started by
1 comment, last by Amro_ 18 years, 11 months ago
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...
:)
follow the yellow brick road
Advertisement
Thanks, I changed the import function def to accept an array and it works fine now.

This topic is closed to new replies.

Advertisement