in the last few days I tried to get cegui running. After some initial problems to compile cegui, I'm now able to draw my first window, at least as long as i dont use glEnableVertexAttribArray in my custom render logic. glDisableVertexAttribArray wont help. Calling one of these functions is enough that i wont see my window anymore.
Code: Select all
void bindHelper(int target, int data, int loc, int dataSize, int datatype,int stride, int offset){
glBindBuffer(target, data);
glVertexAttribPointer((loc), dataSize, datatype, false, stride, (int* )offset);
glEnableVertexAttribArrayARB((loc));
}
is my helper function to bind my attribute arrays. loc I'm getting via glGetAttribLocation.
after the call to glDrawElements i call glDisableVertexAttribArray so in my opinion it should work or do I miss something?
I'm sure that it's not a missing call to glBindBuffer(0), glActiveTexture(GL_TEXTURE0) or anything else GL related. The window disappears the second i call glEnableVertexAttribArray (with or without ARB).
One additional remark: I tried to use OpenGLRenderer instead of OpenGL3Renderer, but for whatever reason my linker didnt find the corresponding symbol. (I'm using visual studio 2013 prof, and compiling the Opengl lib didnt showed any errors). but i think thats unrelated but I wanted to mention it, maybe there are some compile errors or something else I'm totally unware since everything compiled just fine and not sure how this is even possible.
EDIT: remark solved. forgot/didnt set flag in cmake for openglrenderer