Inertia's picture

Enums: Shader Objects (Version20) [done!]

http://www.opengl.org/registry/specs/ARB/shader_objects.txt

Affected Functions:
*
old: GL.CreateShader( Version20 type );
new: GL.CreateShader( ShaderObjectType type );
*
old: GL.Arb.CreateShaderObject( ArbShaderObjects shaderType );
new: GL.Arb.CreateShaderObject( ShaderObjectType 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 );
*
old: GL.GetActiveUniform( XX, XX, XX, XX, XX, out Version20 type, XX );
new: GL.GetActiveUniform( XX, XX, XX, XX, XX, out ActiveUniformType type, XX );

        public enum ShaderObjectType : int
        {
            VertexShader = ( (int) 0x8b31 ),
            FragmentShader = ( (int) 0x8b30 ),
            GeometryShader = ExtGeometryShader4.GeometryShaderExt,
        }
 
        public enum ShaderObjectHandle : int
        {
            ProgramObject = (int) ArbShaderObjects.ProgramObjectArb,
        }
 
        public enum ObjectParameterName : int // whole enum added, wasn't given in Version20/1
        {
            ObjectType = (int) ArbShaderObjects.ObjectTypeArb,
            ObjectSubType = (int) ArbShaderObjects.ObjectSubtypeArb,
            ObjectDeleteStatus = (int) ArbShaderObjects.ObjectDeleteStatusArb,
            ObjectCompileStatus = (int) ArbShaderObjects.ObjectCompileStatusArb,
            ObjectLinkStatus = (int) ArbShaderObjects.ObjectLinkStatusArb,
            ObjectValidateStatus = (int) ArbShaderObjects.ObjectValidateStatusArb,
            ObjectInfoLogLength = (int) ArbShaderObjects.ObjectInfoLogLengthArb,
            ObjectAttachedObjects = (int) ArbShaderObjects.ObjectAttachedObjectsArb,
            ObjectActiveUniforms = (int) ArbShaderObjects.ObjectActiveUniformsArb,
            ObjectActiveUniformMaxLength = (int) ArbShaderObjects.ObjectActiveUniformMaxLengthArb,
            ObjectShaderSourceLength = (int) ArbShaderObjects.ObjectShaderSourceLengthArb,
        }
 
        public enum ActiveUniformType : int
        {
            Float = All.Float, // was missing
            FloatVec2 = ( (int) 0x8b50 ),
            FloatVec3 = ( (int) 0x8b51 ),
            FloatVec4 = ( (int) 0x8b52 ),
            Int = (int) All.Int, // was missing
            IntVec2 = ( (int) 0x8b53 ),
            IntVec3 = ( (int) 0x8b54 ),
            IntVec4 = ( (int) 0x8b55 ),
            Bool = ( (int) 0x8b56 ),
            BoolVec2 = ( (int) 0x8b57 ),
            BoolVec3 = ( (int) 0x8b58 ),
            BoolVec4 = ( (int) 0x8b59 ),
            FloatMat2 = ( (int) 0x8b5a ),
            FloatMat3 = ( (int) 0x8b5b ),
            FloatMat4 = ( (int) 0x8b5c ),
            Sampler1d = ( (int) 0x8b5d ),
            Sampler2d = ( (int) 0x8b5e ),
            Sampler3d = ( (int) 0x8b5f ),
            SamplerCube = ( (int) 0x8b60 ),
            Sampler1dShadow = ( (int) 0x8b61 ),
            Sampler2dShadow = ( (int) 0x8b62 ),
            Sampler2dRect = All.Sampler2dRectArb, // was missing
            Sampler2dRectShadow = All.Sampler2dRectShadowArb, // was missing
        }

Comments

Comment viewing options

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

I'm leaving the ARB stuff as is for now - since they are extensions, not core, we shoudln't drop the "Arb" prefix. The same goes for EXT_geometry_shader4: while this extensions updates the definition of CreateShader to accept the GEOMETRY_SHADER token, this is an extension to GL2.1 targeted by OpenTK.

the Fiddler's picture