Inertia's picture

Asm&GLSL Shader Functions (part 1/2) [done!]

Part 2/2 of this topic is located at http://www.opentk.com/node/191

http://www.opengl.org/registry/specs/ARB/shader_objects.txt
http://www.opengl.org/registry/specs/ARB/fragment_shader.txt
http://www.opengl.org/registry/specs/ARB/vertex_shader.txt
http://www.opengl.org/registry/specs/ARB/fragment_program.txt
http://www.opengl.org/registry/specs/ARB/vertex_program.txt

Assembly Program Functions. class GL.Arb

old: GL.Arb.ProgramString( ArbVertexProgram target, ArbVertexProgram format, XX, XX );
new: GL.Arb.ProgramString( AsmProgramTarget target, AsmProgramFormat format, XX, XX );
*
old: GL.Arb.BindProgram( ArbVertexProgram target, XX );
new: GL.Arb.BindProgram( AsmProgramTarget target, XX );
*
old: GL.Arb.ProgramEnvParameter4( ArbVertexProgram target, XX, XX );
new: GL.Arb.ProgramEnvParameter4( AsmProgramTarget target, XX, XX );
*
old: GL.Arb.ProgramLocalParameter4( ArbVertexProgram target, XX, XX );
new: GL.Arb.ProgramLocalParameter4( AsmProgramTarget target, XX, XX );
*
old: GL.Arb.GetProgramEnvParameter( ArbVertexProgram target, XX, XX );
new: GL.Arb.GetProgramEnvParameter( AsmProgramTarget target, XX, XX );
*
old: GL.Arb.GetProgramLocalParameter( ArbVertexProgram target, XX, XX );
new: GL.Arb.GetProgramLocalParameter( AsmProgramTarget target, XX, XX );
*
old: GL.Arb.GetProgram( ArbVertexProgram target, ArbVertexProgram pname, XX );
new: GL.Arb.GetProgram( AsmProgramTarget target, GetAsmProgramParameters pname, XX );
*
old: GL.Arb.GetProgramString( ArbVertexProgram target, ArbVertexProgram pname, XX );
new: GL.Arb.GetProgramString( AsmProgramTarget target, GetAsmProgramString pname, XX );
*
// This is appears correct, Asm programs are created using GL.Arb.BindProgram()
old: GL.Arb.CreateShaderObject( ArbShaderObjects shaderType );
new: GL.Arb.CreateShaderObject( ShaderType shaderType );
*
old: GL.Arb.GetHandle( ArbShaderObjects pname );
new: GL.Arb.GetHandle( ShaderObjectHandle pname );
*
old: GL.Arb.GetObjectParameter( XX, ArbShaderObjects pname, XX );
new: GL.Arb.GetObjectParameter( XX, ObjectParameterName pname, XX );

GLSL Shader Program Functions. class GL

old: GL.CreateShader( Version20 type );
new: GL.CreateShader( ShaderType type );
*
old: GL.GetActiveUniform( XX, XX, XX, XX, XX, out Version20 type, XX );
new: GL.GetActiveUniform( XX, XX, XX, XX, XX, out ActiveUniformType type, XX );
*
old: GL.GetActiveAttrib( XX, XX, XX, XX, XX, out Version20 type, XX );
new: GL.GetActiveAttrib( XX, XX, XX, XX, XX, out ActiveAttribType type, XX );
*
// I had already posted regarding GL.VertexAttribPointer in the forums. See http://www.opentk.com/node/130?page=2 Number 8.
old: GL.VertexAttribPointer( XX, XX, Version20 type, XX, XX, XX );
new: GL.VertexAttribPointer( XX, XX, ColorPointerType type, XX, XX, XX );
*
old: GL.GetVertexAttrib( XX, Version20 pname, XX );
new: GL.GetVertexAttrib( XX, GetAttribParameter pname, XX );
*
old: GL.GetVertexAttribPointer( XX, Version20 pname, xx );
new: GL.GetVertexAttribPointer( XX, GetAttribPointerParameter pname, xx );


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

Used a slightly different name scheme for parameters in (Get)VertexAttrib* functions, to better match the default naming scheme:

VertexAttribPointerType instead of ColorPointerType
VertexAttribParameter instead of GetAttribParameter
VertexAttribPointerParameter instead of GetAttribPointerParameter

These match the default ones which looked like VertexAttribPropertyARB (dropped ARB since it's core, Parameter is used instead of Property in core functions).

Inertia's picture

Sure, I just named them in a way so it's obvious to me which belongs to what. (It was a huge mountain when I started with it ;) )