• Advertisement
Sign in to follow this  

glColorPointer C#

This topic is 4472 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Tring to get something easy to work, but can't seem to please the compiler. Any ideas of what I need to do to get this to work? Here is where I got my OpenGl Library: http://csgl.sourceforge.net/ OpenGL Function: public static extern void glColorPointer( int size, uint type, int stride, float[,] pointer ); Array: private float[] colors = {1.0f, 0.2f, 0.2f, 0.2f, 0.2f, 1.0f, 0.8f, 1.0f, 0.2f, 0.75f, 0.75f, 0.75f, 0.35f, 0.35f, 0.35f, 0.5f, 0.5f, 0.5f }; Using of function that doesn't compile: GL.glColorPointer(3, GL.GL_FLOAT, 0, colors);

Share this post


Link to post
Share on other sites
Advertisement
figured it out:
private float[,] vertices = {{-1.0f, -1.0f, -1.0f},
{ 1.0f, -1.0f, -1.0f},
{ 1.0f, 1.0f, -1.0f},
{ -1.0f, 1.0f, -1.0f},
{-1.0f, -1.0f, 1.0f},
{ 1.0f, -1.0f, 1.0f},
{ 1.0f, 1.0f, 1.0f},
{ -1.0f, 1.0f, 1.0f}};

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement