www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - OpenGL rendering issue

reply "Mineko" <uminekorox gmail.com> writes:
Not quite sure how to explain this one, all I know is that a 
triangle won't render and it probably has something to do with 
bufferdata or one of it's inputs, since this is D I had to do 
some roundabout things to get it work with a C library like 
OpenGL so.. Yeah..

https://github.com/MinekoRox/Breaker-3D-Game-Engine

loopIt() in engine.d and render.d are what needs to be looked at, 
I've been attempting to fix this for quite a few hours now but I 
just don't quite get it, maybe someone who knows a bit more about 
D can help me here?

If I'm omitting some information please just ask.

Watch this be happening because I don't understand pointers all 
that well.. >_>"
Nov 23 2013
parent reply "Mikko Ronkainen" <mikoro iki.fi> writes:
Try moving

glGenVertexArrays(1, &vao);
glBindVertexArray(vao);

at the top.
Nov 23 2013
parent "Mineko" <uminekorox gmail.com> writes:
On Saturday, 23 November 2013 at 22:41:41 UTC, Mikko Ronkainen 
wrote:
 Try moving

 glGenVertexArrays(1, &vao);
 glBindVertexArray(vao);

 at the top.
You're my new best friend, no, let's get married. Really though, thanks, this one's been eating at me a bit.
Nov 23 2013