Inertia's picture

ARB_framebuffer_object

Project:The Open Toolkit library
Version:0.9.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:closed
Description

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

Since this is huge, I'll keep this post small by ignoring everything that we already dealt with during EXT_fbo cleanup, and which is already correct on svn. That should limit the dimension alot.

Remember to remove all *Ext from tokens.

Functions:

Old: void GetRenderbufferParameter(OpenTK.Graphics.RenderbufferTarget target, OpenTK.Graphics.All pname, [Out] Int32[] @params)
New: void GetRenderbufferParameter(OpenTK.Graphics.RenderbufferTarget target, OpenTK.Graphics.RenderbufferParameterName pname, [Out] Int32[] @params)

Old: void GetFramebufferAttachmentParameter(OpenTK.Graphics.FramebufferTarget target, OpenTK.Graphics.FramebufferAttachment attachment, OpenTK.Graphics.All pname, [Out] Int32[] @params)
New: void GetFramebufferAttachmentParameter(OpenTK.Graphics.FramebufferTarget target, OpenTK.Graphics.FramebufferAttachment attachment, OpenTK.Graphics.FramebufferParameterName pname, [Out] Int32[] @params)

Old: OpenTK.Graphics.All CheckFramebufferStatus(OpenTK.Graphics.FramebufferTarget target)
New: OpenTK.Graphics.FramebufferErrorCode CheckFramebufferStatus(OpenTK.Graphics.FramebufferTarget target)

These functions all need their 3rd parameter changed from OpenTK.Graphics.All to OpenTK.Graphics.TextureTarget
void FramebufferTexture1D(enum target, enum attachment, enum textarget, uint texture, int level);
void FramebufferTexture2D(enum target, enum attachment, enum textarget, uint texture, int level);
void FramebufferTexture3D(enum target, enum attachment, enum textarget, uint texture, int level, int layer);

Old: void GenerateMipmap(OpenTK.Graphics.All target)
New: void GenerateMipmap(OpenTK.Graphics.GenerateMipmapTarget target)

Old: void RenderbufferStorage(OpenTK.Graphics.RenderbufferTarget target, OpenTK.Graphics.All internalformat, Int32 width, Int32 height)
New: void RenderbufferStorage(OpenTK.Graphics.RenderbufferTarget target, OpenTK.Graphics.RenderbufferStorage internalformat, Int32 width, Int32 height)

C: void RenderbufferStorageMultisample(enum target, sizei samples, enum internalformat, sizei width, sizei height);
Old: void RenderbufferStorageMultisample(OpenTK.Graphics.All target, Int32 samples, OpenTK.Graphics.All internalformat, Int32 width, Int32 height)
New: void RenderbufferStorageMultisample(OpenTK.Graphics.RenderbufferTarget target, Int32 samples, >b>OpenTK.Graphics.RenderbufferStorage internalformat, Int32 width, Int32 height)

C: void BlitFramebuffer(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, bitfield mask, enum filter);
Old: void BlitFramebuffer(Int32 srcX0, Int32 srcY0, Int32 srcX1, Int32 srcY1, Int32 dstX0, Int32 dstY0, Int32 dstX1, Int32 dstY1, OpenTK.Graphics.ClearBufferMask mask, OpenTK.Graphics.All filter)
New: void BlitFramebuffer(Int32 srcX0, Int32 srcY0, Int32 srcX1, Int32 srcY1, Int32 dstX0, Int32 dstY0, Int32 dstX1, Int32 dstY1, OpenTK.Graphics.ClearBufferMask mask, OpenTK.Graphics.BlitFramebufferFilter filter)
Note: ClearBufferMask isn't 100% accurate because AccumBufferBit is not a valid parameter, but the other 3 are correct.

Tokens:

enum BlitFramebufferFilter
{
Linear
Nearest
}

Add to OpenTK.Graphics.FramebufferTarget

READ_FRAMEBUFFER 0x8CA8
DRAW_FRAMEBUFFER 0x8CA9

Add to OpenTK.Graphics.RenderbufferParameterName

RENDERBUFFER_SAMPLES 0x8CAB

Add to OpenTK.Graphics.FramebufferParameterName

FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210
FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211
FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212
FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213
FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214
FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215
FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216
FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217

Add to OpenTK.Graphics.FramebufferAttachment

DEPTH_STENCIL_ATTACHMENT 0x821A

Add to OpenTK.Graphics.GetPName

MAX_SAMPLES 0x8D57
FRAMEBUFFER_BINDING 0x8CA6 // alias DRAW_FRAMEBUFFER_BINDING
DRAW_FRAMEBUFFER_BINDING 0x8CA6
READ_FRAMEBUFFER_BINDING 0x8CAA
RENDERBUFFER_BINDING 0x8CA7
MAX_COLOR_ATTACHMENTS 0x8CDF
MAX_RENDERBUFFER_SIZE 0x84E8

Add to OpenTK.Graphics.FramebufferErrorCode

FRAMEBUFFER_UNSUPPORTED 0x8CDD
FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
FRAMEBUFFER_UNDEFINED 0x8219

Add to OpenTK.Graphics.ErrorCode

INVALID_FRAMEBUFFER_OPERATION 0x0506

Add to the enums:
OpenTK.Graphics.PixelInternalFormat
OpenTK.Graphics.PixelFormat

DEPTH_STENCIL 0x84F9

Add to OpenTK.Graphics.PixelType

UNSIGNED_INT_24_8 0x84FA

Add to the enums:
OpenTK.Graphics.PixelInternalFormat
OpenTK.Graphics.RenderbufferStorage

DEPTH24_STENCIL8 0x88F0

Add to OpenTK.Graphics.GetTextureParameter

TEXTURE_STENCIL_SIZE 0x88F1


Comments

Comment viewing options

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

#1

Problem: OpenTK.Graphics.RenderbufferStorage should contain tons of formats (pretty much the same as PixelInternalFormat plus renderbuffer specific additions). The spec mentions a table of color, depth and stencil formats which is neither in the spec nor the manual. -.-

the Fiddler's picture

#2

I can't seem to find the link to the Khronos bug tracker. Maybe a post to the opengl.org forums will help sort this out.

Inertia's picture

#3

That is a last resort, my google-fu is strong and I will figure it out.

Inertia's picture

#4

// color formats
ALPHA4
ALPHA8
ALPHA12
ALPHA16
R8
R16
RG8
RG16
R3 G3 B2
RGB4
RGB5
RGB8
RGB10
RGB12
RGB16
RGBA2
RGBA4
RGB5 A1
RGBA8
RGB10 A2
RGBA12
RGBA16
SRGB8
SRGB8 ALPHA8
R16F
RG16F
RGB16F
RGBA16F
R32F
RG32F
RGB32F
RGBA32F
R11F G11F B10F
RGB9 E5
R8I
R8UI
R16I
R16UI
R32I
R32UI
RG8I
RG8UI
RG16I
RG16UI
RG32I
RG32UI
RGB8I
RGB8UI
RGB16I
RGB16UI
RGB32I
RGB32UI
RGBA8I
RGBA8UI
RGBA16I
RGBA16UI
RGBA32I
RGBA32UI

// depth&stencil formats
DEPTH COMPONENT16
DEPTH COMPONENT24
DEPTH COMPONENT32
DEPTH COMPONENT32F
DEPTH24 STENCIL8
DEPTH32F STENCIL8

// pure stencil formats are already in the enum

the Fiddler's picture

#5

Status:open» fixed

This was the biggest single change in GL3.0!

Committed now, with several additions (EXT tokens that are now core).

the Fiddler's picture

#6

Status:fixed» closed

Closing bugs issues in 0.9.4.