Sign in to follow this  

glColorPointer C#

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: 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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this