
ARB_geometry_shader4
Posted Sunday, 14 December, 2008 - 16:04 by Inertia| Project: | The Open Toolkit library |
| Version: | 1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | fixed |
Jump to:
http://www.opengl.org/registry/specs/ARB/geometry_shader4.txt
Functions:
C: void ProgramParameteriARB(uint program, enum pname, int value);
Old: void ProgramParameter(UInt32 program, OpenTK.Graphics.All pname, Int32 value)
New: void ProgramParameter(UInt32 program, OpenTK.Graphics.AssemblyProgramParameterArb pname, Int32 value)
C: void FramebufferTextureARB(enum target, enum attachment, uint texture, int level);
C#: void FramebufferTexture(OpenTK.Graphics.FramebufferTarget target, OpenTK.Graphics.FramebufferAttachment attachment, UInt32 texture, Int32 level)
This is correct as is.
C: void FramebufferTextureLayerARB(enum target, enum attachment, uint texture, int level, int layer);
C#: void FramebufferTextureLayer(OpenTK.Graphics.FramebufferTarget target, OpenTK.Graphics.FramebufferAttachment attachment, UInt32 texture, Int32 level, Int32 layer)
This is correct as is.
C: void FramebufferTextureFaceARB(enum target, enum attachment, uint texture, int level, enum face);
C#: void FramebufferTextureFace(OpenTK.Graphics.FramebufferTarget target, OpenTK.Graphics.FramebufferAttachment attachment, UInt32 texture, Int32 level, OpenTK.Graphics.TextureTarget face)
This is correct as is.
Tokens:
Add to enum OpenTK.Graphics.ShaderType
GEOMETRY_SHADER_ARB 0x8DD9
// In practice it can be queried like this: GL.GetShader( a, ShaderParameter.ShaderType, out b ); if ( (ShaderType)b == ShaderType.GeometryShaderArb ) ...
-----------------------
Add to enum OpenTK.Graphics.AssemblyProgramParameterArb
GEOMETRY_VERTICES_OUT_ARB 0x8DDA
GEOMETRY_INPUT_TYPE_ARB 0x8DDB
GEOMETRY_OUTPUT_TYPE_ARB 0x8DDC
------------------------------
Add to enum OpenTK.Graphics.GetPName
MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29
MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD
MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE
MAX_VARYING_COMPONENTS
MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF
MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0
MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1
-------------------------------
Add to enum OpenTK.Graphics.BeginMode
Citation to prove I'm not kidding ... "Accepted by the parameter of Begin, DrawArrays, MultiDrawArrays, DrawElements, MultiDrawElements, and DrawRangeElements"
LINES_ADJACENCY_ARB 0xA
LINE_STRIP_ADJACENCY_ARB 0xB
TRIANGLES_ADJACENCY_ARB 0xC
TRIANGLE_STRIP_ADJACENCY_ARB 0xD
-------------------------
Add to enum OpenTK.Graphics.FramebufferErrorCode
FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8
FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9
Problem:
SVN: public static OpenTK.Graphics.All CheckFramebufferStatus(OpenTK.Graphics.FramebufferTarget target)
Should return OpenTK.Graphics.FramebufferErrorCode instead of All, like it did as Ext
--------------------
Add to enum OpenTK.Graphics.FramebufferParameterName
FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7
FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
Problem: Inconsistency.
Some GetFramebufferAttachmentParameter functions use the All enum, e.g.
public static void GetFramebufferAttachmentParameter(OpenTK.Graphics.FramebufferTarget target, OpenTK.Graphics.FramebufferAttachment attachment, OpenTK.Graphics.All pname, [Out] out Int32 @params)
public static unsafe void GetFramebufferAttachmentParameter(OpenTK.Graphics.FramebufferTarget target, OpenTK.Graphics.FramebufferAttachment attachment, OpenTK.Graphics.All pname, [Out] Int32* @params)
some are correct.
void GetFramebufferAttachmentParameter(OpenTK.Graphics.FramebufferTarget target, OpenTK.Graphics.FramebufferAttachment attachment, OpenTK.Graphics.FramebufferParameterName pname, [Out] Int32[] @params)
Quote:
(Note: FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER is simply an alias for the
FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_ARB token provided in
EXT_framebuffer_object. This extension generalizes the notion of
"" to include layers of an array texture.)
-----------------------------------
Add to enums:
OpenTK.Graphics.EnableCap
OpenTK.Graphics.GetPName
PROGRAM_POINT_SIZE_ARB 0x8642
Quote:
(Note: PROGRAM_POINT_SIZE_ARB is simply an alias for the
VERTEX_PROGRAM_POINT_SIZE token provided in OpenGL 2.0, which is itself an
alias for VERTEX_PROGRAM_POINT_SIZE_ARB provided by
ARB_vertex_program. Program-computed point sizes can be enabled if
geometry shaders are enabled.)
--------------------
The quotes are there to avoid confusion when 2 different named tokens have the same value.


Comments
#1
This has been moved to core in OpenGL 3.2.
#2
This document is still accurate. Tokens neither had their values changed nor were any of them renamed, also no new additions.
The problems related to GL.CheckFramebufferStatus and GL.GetFramebufferAttachmentParameter appear to be fixed on SVN already.
#3
Ok, it seems the only necessary change was the addition of the new tokens.
Landed in rev. 2272.
#4
Closing issues fixed in 0.9.9-3.
#6
C: void ProgramParameteriARB(uint program, enum pname, int value);
New: void ProgramParameter(UInt32 program, AssemblyProgramParameterArb pname, Int32 value)
This is not what is on svn. glGetProgramParameterdvNV uses the this enum (which is wrong), but not glProgramParameteriARB.
This must be fixed in order for issue #2056: [GL 4.1] Get Program Binary and #2057: [GL 4.1] Separate Shader Objects to work correctly.
---
I'd like to suggest a rename. (NOONE has noticed/reported this before me, and it only affects Shaders in assembly) The great thing about type safety is, that it will not compile until you use the correct enum, or manually cast. Like this no hidden bugs will be introduced to users who have worked with this.
We have the enum ProgramParameter for glGetProgram***
We have the enum AssemblyProgramParameterArb for glProgramParameter***
better would be something like:
AssemblyGetProgramParameter
AssemblyProgramParameter
or even remove the Assembly prefix.
#7
This should now be fixed (gl4 branch, r2966).
I did not rename AssemblyProgramParameterArb to AssemblyProgramParameter as that would break compatibility for little gain. This can be done manually via an overload if necessary.