How to draw a triangle with OpenGLRenderer?


#1

I’m trying to get a simple opengl program up and running so I can follow some webgl tutorials and learn with haxe. Trying to draw a triangle from the lime & openfl examples demonstrating using opengl, but can’t get it to work. It doesn’t render the triangle.

Here’s my class, can anyone point me in the right direction?

GLSprite.hx:
https://pastebin.com/WVCB8u6c
Main.hx:
https://pastebin.com/Mi9SDQND


#2

Does renderer.setShader (null) make a difference? I think you may need to do this if you are plugging in your own shader to unbind the attributes used in the default shader. Like this:


#3

Nope that didn’t work either.