triton problem about the glsl files

classic Classic list List threaded Threaded
2 messages Options
cxh860315 cxh860315
Reply | Threaded
Open this post in threaded view
|

triton problem about the glsl files

Dear everyone´╝îI try to integrate osgearth and triton into QT.When i  use the GLSL files coming from osgearthTrtion folder go in the Triton "Resources" folder,run the programs,I get the errors information.
I try to add #version 140 at the beginning of the user-vert-functions.glsl, new errors information come out. I use osg3.6.5, osgearth 2.10-2 version,qt5.6.0version ,triton4.3.7version .visual studio 2013.
hope for everyone guidance, thanks.
 
The error Infromation.
QOpenGLContext::swapBuffers() called with non-exposed window, behavior is undefined
TRITON: (INFO) UBOs Available, and Using Them.
TRITON: GLSL error detected in: user-vert-functions.glsl
TRITON: 0(47) : error C7532: global function inverse requires "#version 140" or later
0(47) : error C0000: ... or #extension GL_ARB_gpu_shader5 : enable

TRITON: Failed to link shader program for OpenGL.
TRITON: Vertex info
-----------
0(47) : error C7532: global function inverse requires "#version 140" or later
0(47) : error C0000: ... or #extension GL_ARB_gpu_shader5 : enable
(0) : error C2003: incompatible options for link

TRITON: (INFO) Failed to load the TritonCUDA dll.


add #version 140 line,the new errors information.

TRITON: (INFO) UBOs Available, and Using Them.
TRITON: GLSL error detected in: user-vert-functions.glsl
TRITON: 0(6) : error C0204: version directive must be first statement and may not be repeated
0(48) : error C7532: global function inverse requires "#version 140" or later
0(48) : error C0000: ... or #extension GL_ARB_gpu_shader5 : enable

TRITON: Failed to link shader program for OpenGL.
TRITON: Vertex info
-----------
0(6) : error C0204: version directive must be first statement and may not be repeated
0(48) : error C7532: global function inverse requires "#version 140" or later
0(48) : error C0000: ... or #extension GL_ARB_gpu_shader5 : enable
(0) : error C2003: incompatible options for link


gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: triton problem about the glsl files

I am not a Triton expert, but I suspect the "user-vert-functions.glsl" file does not stand on its own, but rather is injected into another shader. As such you cannot put a #version directive in it.
Glenn Waldron / Pelican Mapping