
[ES 2.0] Cleanup #2
Posted Sunday, 12 July, 2009 - 16:48 by Inertia| Project: | The Open Toolkit library |
| Version: | 1.0-beta-1 |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Remove from enum TextureUnit:
Activetexture = ((int)0X84e0),
SVN: void ActiveTexture( OpenTK.Graphics.GLES20.All texture)
New: void ActiveTexture( TextureUnit texture)
-------------------------------
enum BindTextureTarget
{
Texture2D = ((int)0X0de1),
Texturecubemap = ((int)0X8513),
}
SVN: void BindTexture( OpenTK.Graphics.GLES20.All target, Int32 texture)
New: void BindTexture( BindTextureTarget target, Int32 texture)
SVN: void GenerateMipmap( OpenTK.Graphics.GLES20.All target)
New: void GenerateMipmap( BindTextureTarget target)
-------------------------------
Add to enum TextureMinFilter:
Nearest = ((int)0X2600),
Linear = ((int)0X2601),
SVN: void GetTexParameter( OpenTK.Graphics.GLES20.All target, OpenTK.Graphics.GLES20.All pname, Single* @params)
New: void GetTexParameter( BindTextureTarget target, TextureParameterName pname, Single* @params)
SVN: void TexParameter( OpenTK.Graphics.GLES20.All target, OpenTK.Graphics.GLES20.All pname, Single param)
New: void TexParameter( BindTextureTarget target, TextureParameterName pname, Single param)
-------------------------------
Nuke existing enum TextureTarget (it contains too many wrong tokens, rather start from scratch)
enum TextureTarget
{
Texture2D = ((int)0X0de1),
Texturecubemappositivex = ((int)0X8515),
Texturecubemapnegativex = ((int)0X8516),
Texturecubemappositivey = ((int)0X8517),
Texturecubemapnegativey = ((int)0X8518),
Texturecubemappositivez = ((int)0X8519),
Texturecubemapnegativez = ((int)0X851a),
}
Add to enum PixelType:
Unsignedbyte = ((int)0X1401),
Remove from enum PixelFormat:
Depthcomponent = ((int)0X1902), // according to spec p.60 it's not valid
Duplicate resulting PixelFormat enum and name the copy PixelInternalFormat.
SVN: void TexImage2D( OpenTK.Graphics.GLES20.All target, Int32 level, OpenTK.Graphics.GLES20.All internalformat, Int32 width, Int32 height, Int32 border, OpenTK.Graphics.GLES20.All format, OpenTK.Graphics.GLES20.All type, IntPtr pixels)
New: void TexImage2D( TextureTarget target, Int32 level, PixelInternalFormat internalformat, Int32 width, Int32 height, Int32 border, PixelFormat format, PixelType type, IntPtr pixels)
SVN: void TexSubImage2D( OpenTK.Graphics.GLES20.All target, Int32 level, Int32 xoffset, Int32 yoffset, Int32 width, Int32 height, OpenTK.Graphics.GLES20.All format, OpenTK.Graphics.GLES20.All type, IntPtr pixels)
New: void TexSubImage2D( TextureTarget target, Int32 level, Int32 xoffset, Int32 yoffset, Int32 width, Int32 height, PixelFormat format, PixelType type, IntPtr pixels)
SVN: void CopyTexImage2D( OpenTK.Graphics.GLES20.All target, Int32 level, OpenTK.Graphics.GLES20.All internalformat, Int32 x, Int32 y, Int32 width, Int32 height, Int32 border)
New: void CopyTexImage2D( TextureTarget target, Int32 level, PixelInternalFormat internalformat, Int32 x, Int32 y, Int32 width, Int32 height, Int32 border)
SVN: void CopyTexSubImage2D( OpenTK.Graphics.GLES20.All target, Int32 level, Int32 xoffset, Int32 yoffset, Int32 x, Int32 y, Int32 width, Int32 height)
New: void CopyTexSubImage2D( TextureTarget target, Int32 level, Int32 xoffset, Int32 yoffset, Int32 x, Int32 y, Int32 width, Int32 height)
SVN: void CompressedTexImage2D( OpenTK.Graphics.GLES20.All target, Int32 level, OpenTK.Graphics.GLES20.All internalformat, Int32 width, Int32 height, Int32 border, Int32 imageSize, IntPtr data)
New: void CompressedTexImage2D( TextureTarget target, Int32 level, PixelInternalFormat internalformat, Int32 width, Int32 height, Int32 border, Int32 imageSize, IntPtr data)
SVN: void CompressedTexSubImage2D( OpenTK.Graphics.GLES20.All target, Int32 level, Int32 xoffset, Int32 yoffset, Int32 width, Int32 height, OpenTK.Graphics.GLES20.All format, Int32 imageSize, IntPtr data)
New: void CompressedTexSubImage2D( TextureTarget target, Int32 level, Int32 xoffset, Int32 yoffset, Int32 width, Int32 height, PixelFormat format, Int32 imageSize, IntPtr data)
SVN: void ReadPixels( Int32 x, Int32 y, Int32 width, Int32 height, OpenTK.Graphics.GLES20.All format, OpenTK.Graphics.GLES20.All type, IntPtr pixels)
New: void ReadPixels( Int32 x, Int32 y, Int32 width, Int32 height, PixelFormat format, PixelType type, IntPtr pixels)
-------------------------------
enum FramebufferTarget
{
Framebuffer = ((int)0X8d40),
}
enum FramebufferError
{
Framebuffercomplete = ((int)0X8cd5),
Framebufferincompleteattachment = ((int)0X8cd6),
Framebufferincompletemissingattachment = ((int)0X8cd7),
Framebufferincompletedimensions = ((int)0X8cd9),
Framebufferunsupported = ((int)0X8cdd),
}
SVN: OpenTK.Graphics.GLES20.All CheckFramebufferStatus( OpenTK.Graphics.GLES20.All target)
New: FramebufferError CheckFramebufferStatus( FramebufferTarget target)
SVN: void BindFramebuffer( OpenTK.Graphics.GLES20.All target, Int32 framebuffer)
New: void BindFramebuffer( FramebufferTarget target, Int32 framebuffer)
enum RenderbufferTarget
{
Renderbuffer = ((int)0X8d41),
}
SVN: void BindRenderbuffer( OpenTK.Graphics.GLES20.All target, Int32 renderbuffer)
New: void BindRenderbuffer( RenderbufferTarget target, Int32 renderbuffer)
enum RenderbufferInternalFormat
{
Depthcomponent16 = ((int)0X81a5),
Rgba4 = ((int)0X8056),
Rgb5a1 = ((int)0X8057),
Rgb565 = ((int)0X8d62),
Stencilindex8 = ((int)0X8d48),
}
SVN: void RenderbufferStorage( OpenTK.Graphics.GLES20.All target, OpenTK.Graphics.GLES20.All internalformat, Int32 width, Int32 height)
New: void RenderbufferStorage( RenderbufferTarget target, RenderbufferInternalFormat internalformat, Int32 width, Int32 height)
enum GetRenderbufferPName
{
Renderbufferwidth = ((int)0X8d42),
Renderbufferheight = ((int)0X8d43),
Renderbufferinternalformat = ((int)0X8d44),
Renderbufferredsize = ((int)0X8d50),
Renderbuffergreensize = ((int)0X8d51),
Renderbufferbluesize = ((int)0X8d52),
Renderbufferalphasize = ((int)0X8d53),
Renderbufferdepthsize = ((int)0X8d54),
Renderbufferstencilsize = ((int)0X8d55),
}
SVN: void GetRenderbufferParameter( OpenTK.Graphics.GLES20.All target, OpenTK.Graphics.GLES20.All pname, Int32* @params)
New: void GetRenderbufferParameter( RenderbufferTarget target, GetRenderbufferPName pname, Int32* @params)
enum FramebufferSlot
{
Colorattachment0 = ((int)0X8ce0),
Depthattachment = ((int)0X8d00),
Stencilattachment = ((int)0X8d20),
}
SVN: void FramebufferRenderbuffer( OpenTK.Graphics.GLES20.All target, OpenTK.Graphics.GLES20.All attachment, OpenTK.Graphics.GLES20.All renderbuffertarget, Int32 renderbuffer)
New: void FramebufferRenderbuffer( FramebufferTarget target, FramebufferSlot attachment, RenderbufferTarget renderbuffertarget, Int32 renderbuffer)
SVN: void FramebufferTexture2D( OpenTK.Graphics.GLES20.All target, OpenTK.Graphics.GLES20.All attachment, OpenTK.Graphics.GLES20.All textarget, Int32 texture, Int32 level)
New: void FramebufferTexture2D( FramebufferTarget target, FramebufferSlot attachment, TextureTarget textarget, Int32 texture, Int32 level)
enum FramebufferAttachmentParameter
{
Framebufferattachmentobjecttype = ((int)0X8cd0),
Framebufferattachmentobjectname = ((int)0X8cd1),
Framebufferattachmenttexturelevel = ((int)0X8cd2),
Framebufferattachmenttexturecubemapface = ((int)0X8cd3),
}
SVN: void GetFramebufferAttachmentParameter( OpenTK.Graphics.GLES20.All target, OpenTK.Graphics.GLES20.All attachment, OpenTK.Graphics.GLES20.All pname, Int32* @params)
New: void GetFramebufferAttachmentParameter( FramebufferTarget target, FramebufferSlot attachment, FramebufferAttachmentParameter pname, Int32* @params)
-------------------------------
enum PixelStorePName
{
Unpackalignment = ((int)0X0cf5),
}
enum PixelStoreParameter : int // for overload
{
One = 1,
Two = 2,
Four = 4,
Eight = 8,
}
SVN: void PixelStore( OpenTK.Graphics.GLES20.All pname, Int32 param)
New: void PixelStore( PixelStorePName pname, Int32 param)
Overload: void PixelStore( PixelStorePName pname, PixelStoreParameter param)


Comments
#1
Second part.
TODO:
-RenderbufferInternalformat looks good, but PixelInternalFormat may be flawed.
Done:
Investigate compressed texture formats:
The same mechanic as for ShaderBinary() is used, obtain number of formats by NUM_COMPRESSED_TEXTURE_FORMATS then obtain a list with COMPRESSED_TEXTURE_FORMATS. No references to formats besides DXT1 R5G6B5 and DXT1 RGB5A1 found.
#2
#3
#5
RenderbufferInternalformat looks good, but PixelInternalFormat may be flawed.
Both are correct.
Remaining Issues:
Besides these issues (and probably some missing capital letters) this should work as-is.
#6
Merged into es20 branch, rev. 2374.
#7
#8
Bindings regenerated (rev. 2382).
#9
Closing issues fixed in 1.0 beta-1.