Skip to main content
gamedev.net
🔒 Locked

glColorPointer C#

Started by godkane Oct 23, 2005 at 1:52 AM 0 replies 1.1k views
Original Post
godkane
godkane
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);
godkane
godkane
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}};

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.