Inertia's picture

ARB_uniform_ buffer_object

Project:The Open Toolkit library
Version:0.9.7
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:closed
Description

This is OpenGL 3.1 functionality.

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

This extension contains a couple of functions and tokens which appear to be correct on SVN and thus are not repeated here.

Functions:

C: void BindBufferRange(enum target, uint index, uint buffer, intptr offset, sizeiptr size);
SVN: void BindBufferRange(OpenTK.Graphics.Version30 target, UInt32 index, UInt32 buffer, IntPtr offset, IntPtr size)
New: void BindBufferRange(OpenTK.Graphics.BufferTarget target, UInt32 index, UInt32 buffer, IntPtr offset, IntPtr size)

C: void BindBufferBase(enum target, uint index, uint buffer);
SVN: void BindBufferBase(OpenTK.Graphics.Version30 target, UInt32 index, UInt32 buffer)
New: void BindBufferBase(OpenTK.Graphics.BufferTarget target, UInt32 index, UInt32 buffer)

C: void GetIntegeri_v(enum target, uint index, int* data);
SVN: void GetIntegeri_(OpenTK.Graphics.Version30 target, UInt32 index, [Out] Int32[] data)
New: void GetIntegeri_(enum X target, UInt32 index, [Out] Int32[] data)

Tokens:

Add to enum OpenTK.Graphics.BufferTarget:

UNIFORM_BUFFER 0x8A11

Add to enum OpenTK.Graphics.GetPName:
Create enum X and add token:
UNIFORM_BUFFER_BINDING 0x8A28

Add to enum X:

UNIFORM_BUFFER_START 0x8A29
UNIFORM_BUFFER_SIZE 0x8A2A

Add to enum OpenTK.Graphics.GetPName:

MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B
MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C
MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D
MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E
MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F
MAX_UNIFORM_BLOCK_SIZE 0x8A30
MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31
MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32
MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33
UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34

Add to enum OpenTK.Graphics.AssemblyProgramParameterArb

ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35
ACTIVE_UNIFORM_BLOCKS 0x8A36


Comments

Comment viewing options

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

#1

Note: The above has been edited and the creation of an extra enum for glGetIntegeri_v has been removed due to this quote:

"spec" wrote:

(data) is a pointer to a scalar or array of the indicated type in which to place the returned data.

So UNIFORM_BUFFER_START and UNIFORM_BUFFER_SIZE should also work with glGetIntegeri, because the returned information is a scalar.

the Fiddler's picture

#2

I'm not sure that's right. There are two categories of 'get' functions:

  1. Simple state (GetIntegerv, GetBooleanv, etc)
  2. Indexed simple state (GetIntegerI_v, GetBooleani_v)

Both functions use pointers, but I *think* the UNIFORM_BUFFER_START and UNIFORM_BUFFER_SIZE tokens are supposed to be used with the indexed functions.

This means the separate enum is still needed (something like GetIndexedPName). Will have to cross-reference that with the specs, though.

Edit: Ok, page 231 of the 3.1 specs indicates that UNIFORM_BUFFER_BINDING/START/SIZE are to be used with the indexed functions.

the Fiddler's picture

#3

Status:open» fixed

Committed changes to rev. 1683.

Inertia's picture

#4

Status:fixed» open

Reverted the initial post to create a new enum.

Edit: Nevermind :P

Inertia's picture

#5

Status:open» fixed
the Fiddler's picture

#6

Status:fixed» in progress

Hm, this is missing some tokens for ProgramParameter: ACTIVE UNIFORM BLOCK MAX NAME LENGTH and ACTIVE UNIFORM BLOCKS.

Inertia's picture

#7

"Inertia" wrote:

Add to enum OpenTK.Graphics.AssemblyProgramParameterArb

ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35
ACTIVE_UNIFORM_BLOCKS 0x8A36

Maybe take a look at the link I sent in pm to relax a little, you've been working on this like a machine O.o

the Fiddler's picture

#8

Status:in progress» fixed

Just wanted to trim the remaining OpenGL issues and change the focus for future relaeses.

the Fiddler's picture

#9

Version:0.9.x-dev» 0.9.7
Status:fixed» closed

Closing issues fixed in 0.9.7.