JuliaGL / ModernGL.jl

OpenGL 3+ bindings for Julia

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

missing some functions of glVertexAttrib* family?

Gnimuc opened this issue · comments

I failed to find these OpenGL APIs in glFunctions.jl.

void glVertexAttrib1f(GLuint index, GLfloat v0);

void glVertexAttrib2f(GLuint index, GLfloat v0, GLfloat v1);

void glVertexAttrib3f(GLuint index, GLfloat v0, GLfloat v1, GLfloat v2);

void glVertexAttrib4f(GLuint index, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);

void glVertexAttrib1fv(GLuint index, const GLfloat *v);

void glVertexAttrib2fv(GLuint index, const GLfloat *v);

void glVertexAttrib3fv(GLuint index, const GLfloat *v);

void glVertexAttrib4fv(GLuint index, const GLfloat *v);

Does ModernGL support these?

commented

I don't think so...
With ModernGL you should rather create VertexArrays and render those.
With GLAbstraction this is pretty simple, as you can do something like this:
https://gist.github.com/SimonDanisch/7e9694b05e00c79f716c#file-triangle-jl

oops, these APIs are OpenGL 2.0 syntax. The function glVertexAttrib4fv is introduced in "OpenGL Superbible, 6th edition". The book is talking about core profile all the time, so I mistakenly thought glVertexAttrib4fv should be a ModernGL API. Sorry for opening an issue arbitrarily without further verification... Thanks for your nice example Simon 👍

commented

No worries =)
I've been very lazy with documentations so feel free to ask anything that pops up ;)