Is it possible to draw in OpenGL 4+ just using glVertexAttrib3f calls? The following works in legacy OpenGL mode but when I switch to OpenGL 4 nothing gets rendered.
glBegin(GL_TRIANGLES);
glVertexAttrib3f(1, 0, 0, -1);
glVertexAttrib3f(0, -0.5, -0.5, -0.5 );
glVertexAttrib3f(0, -0.5, 0.5, -0.5 );
glVertexAttrib3f(0, 0.5, 0.5, -0.5 );
glVertexAttrib3f(1, 0, 0, 1);
glVertexAttrib3f(0, 0.5, -0.5, 0.5 );
glVertexAttrib3f(0, 0.5, 0.5, 0.5 );
glVertexAttrib3f(0, -0.5, 0.5, 0.5 );
....
glEnd();
I suppose I should get rid of those glBegin() glEnd() functions and maybe call glDrawArrays() but haven't got it to work.
glBegin
andglEnd
do not exist in OpenGL 4. – user253751