This is preview!
Click on Join Now to Sign Up
I want to get start using OPENGL in P5.
I am not sure how to start it and I can't find any tutorial on the
I want to start drawing a gradiant traingle so I found this for
- //We want to draw triangle in gradient color
- //So setting the color of first vertex as red
- gl.glColor4f(1, 0, 0, 1);
- gl.glVertex2d(100, 100);
- //Setting the color of second vertex as green
- gl.glColor4f(0, 1, 0, 1);
- gl.glVertex2d(100, 200);
- //Setting the color of third vertex as blue
- gl.glColor4f(0, 0, 1, 1);
- gl.glVertex2d(200, 200);
- //Our polygon ends here
but I don't know how to reproduce those line in P5 as I even can't find
a class (I don't know the purpose and difference between PGL, GL,...)
that has the glBegin function.
Can someone give me a hint how to start.
Thanks in advance.