Hello everyone,
I am trying to use a ProgramPipelineObject and I have not been able to make it work the way I want.
Maybe I am trying something that is not possible.
I have a "basic" example which works, and a "little bit more complexe" example which does not.
This is the example which works :
ProgramObject 1 :
- load vertex shader, compile, set separable true, link
ProgramObject 2 :
- load fragment shader, compile, set separable true, link
ProgramPipeline :
- generate, bind ProgramPipeline
- useStage(ProgramPipeline, Vertex, ProgramObject 1)
- useStage(ProgramPipeline, Fragment, ProgramObject 2)
- unbind ProgramPipeline
Render pass :
- programuniform(ProgramObject 1, "matrix etc...")
- programuniform(ProgramObject 2, "color etc...")
- bind ProgramPipeline
- draw object
- unbind ProgramPipeline
This is the example which doest not work (the only modification is bold) :
ProgramObject 1 :
- load vertex shader, load fragment shader, compile both, set separable true, link (so this is not a simple program with a vertex shader, but a program with a vertex and a fragment shader)
ProgramObject 2 :
- load fragment shader, compile, set separable true, link
ProgramPipeline :
- generate, bind ProgramPipeline
- useStage(ProgramPipeline, Vertex, ProgramObject 1)
- useStage(ProgramPipeline, Fragment, ProgramObject 2)
- unbind ProgramPipeline
Render pass :
- programuniform(ProgramObject 1, "matrix etc...")
- programuniform(ProgramObject 2, "color etc...")
- bind ProgramPipeline
- draw object
- unbind ProgramPipeline
My result is : no object on screen : maybe a uniform problem ?
->Is it possible to create a pipeline taking only one stage of a shaderprogram that contains many stages?
->Do you see any reason that can make it fail ?
Thanks you very much.
PS : I am under linux ubuntu 12.04, nvidia 304 drivers, gtx 480, glew 1.9




