OpengGL Shader Program fails
-
He He ,very resembles Russian which I know :) .Is it wrapped with Qt? Thanks a lot .I will check it out!
-
Also you can use it for learning basic usage of VBO. :)
-
I can see you didn't define the format and it actually works ?Another question ,are those inclosed GLEW headers and sources used in your program?
-
[quote author="sasmaster" date="1316340394"]I can see you didn't define the format and it actually works ?Another question ,are those inclosed GLEW headers and sources used in your program? [/quote]
By format you mean 'window framebuffer pixel format'?
Yes, it's using GLEW, since there are glGenBuffers, glBindBuffers, glBufferData, glVertexAttribPointer etc.
-
But why haven't you used the Qt version of those methods?
By Format I mean the QGLFormat. -
[quote author="sasmaster" date="1316343899"]But why haven't you used the Qt version of those methods?[/quote]
You mean QGLBuffer. Well at that time there was no QGLBuffer.
[quote]By Format I mean the QGLFormat.[/quote]
It uses default format. I don't see why would I need a fancy format for that code. :)
-
What's the motivation to use QGLShaderProgram anyway instead of standard OpenGL for portability?
-
An idea (maybe wrong...) : Implementation of openGL is platform (hardware) dependent. So I guess it could permit an universal call through various platforms or OpenGL revision (and avoid use of OGL extension which I used to add on mac OS platform for exemple).
Nervertheless I prefer use pure OpenGL functions call as long as OGL 4.0 (and so OGL ES 2.0) will not be supported anywhere... -
minimoog77 .Getting can't open the shader files errors when running your demo.Do you know what can be the problem?
@
QGLShader: Unable to open file "/vert1.vert"
""
QGLShader: Unable to open file "simple.frag"@
-
Well ,currently can get it working with inline string typed shaders.shader files somehow don't get loaded.Also I see that the best thing is to use native (non Gt wrappers) OpenGL libs