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 :
[ul]
[li]load vertex shader, compile, set separable true, link
[/li][/ul]
ProgramObject 2 :
[ul]
[li]load fragment shader, compile, set separable true, link
[/li][/ul]
ProgramPipeline :
[ul]
[li]generate, bind ProgramPipeline
[/li][li]useStage(ProgramPipeline, Vertex, ProgramObject 1)
[/li][li]useStage(ProgramPipeline, Fragment, ProgramObject 2)
[/li][li]unbind ProgramPipeline
[/li][/ul]
Render pass :
[ul]
[li]programuniform(ProgramObject 1, “matrix etc…”)
[/li][li]programuniform(ProgramObject 2, “color etc…”)
[/li][li]bind ProgramPipeline
[/li][li]draw object
[/li][li]unbind ProgramPipeline
[/li][/ul]
This is the example which doest not work (the only modification is bold) :
ProgramObject 1 :
[ul]
[li]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)
[/li][/ul]
ProgramObject 2 :
[ul]
[li]load fragment shader, compile, set separable true, link
[/li][/ul]
ProgramPipeline :
[ul]
[li]generate, bind ProgramPipeline
[/li][li]useStage(ProgramPipeline, Vertex, ProgramObject 1)
[/li][li]useStage(ProgramPipeline, Fragment, ProgramObject 2)
[/li][li]unbind ProgramPipeline
[/li][/ul]
Render pass :
[ul]
[li]programuniform(ProgramObject 1, “matrix etc…”)
[/li][li]programuniform(ProgramObject 2, “color etc…”)
[/li][li]bind ProgramPipeline
[/li][li]draw object
[/li][li]unbind ProgramPipeline
[/li][/ul]
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