Hello.
I would like to offer a new , more global , more robust API fit for a programmable pipeline.
The API shall concentrate on two sections:
1. Declarations of shader programs.
2. Creation of Pipeline.
1. In order to declare/use shaders there will be only one command. For instance , should I like to create a vertex shader I would call : SetShader(int nShader,int nProgID). Which means, set a shader to be the active shader, nShader will be an enum (1= Hull Sgader [see dx11 to understand],2= Domain Shader, 3= VS, 4 = GS, 5 = PS[Fragment Shader in GL]) This method will add the flexibility of further shader additions to the pipe. A Point to think about.
2. Totally new innovision - Have the user change the pipe functionality with chaining the units. A command to push shaders down the pipe so that the pipe will be built in the most flexible way one could ever want : for instance : Pipe.Push(VS); Pipe.Push(GS); Pipe.Push(PS) will set a drawing pipe of VS->GS->PS. If, at any other stage of time , other uints (Today it is hull and domain, and who knows what shall be next), shall be added to the pipe - all the API will need is a change in the enumeration of units. The management of the pipe can be vector like (See STL::vector) for that and one may create pipes to fit his/her own needs (with and without shaders) and toggle between them in a command like SetActivePipe (PipeID).



For 99% of 3d graphics, current pipeline is jut ok. Don't forget that each stage operates on a different level, with primitive setup, rasterization in between.
