Inertia's picture

[GL3.3] Vertex Type 2.10.10.10 Reverse

Project:The Open Toolkit library
Version:1.1-2014-01-02
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:closed
Description

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

Add to the following 5 enums:
VertexAttribPointerType
VertexPointerType
NormalPointerType
ColorPointerType
TexCoordPointerType
and also create the new enum CustomDataTypeand add these 2 tokens to it aswell:

UNSIGNED_INT_2_10_10_10_REV 0x8368 (existing core enum)
INT_2_10_10_10_REV 0x8D9F

Functions:

void VertexP2ui(CustomDataType type, uint value);
void VertexP3ui(CustomDataType type, uint value);
void VertexP4ui(CustomDataType type, uint value);
void VertexP2uiv(CustomDataType type, const uint *value);
void VertexP3uiv(CustomDataType type, const uint *value);
void VertexP4uiv(CustomDataType type, const uint *value);
void TexCoordP1ui(CustomDataType type, uint coords);
void TexCoordP2ui(CustomDataType type, uint coords);
void TexCoordP3ui(CustomDataType type, uint coords);
void TexCoordP4ui(CustomDataType type, uint coords);
void TexCoordP1uiv(CustomDataType type, const uint *coords);
void TexCoordP2uiv(CustomDataType type, const uint *coords);
void TexCoordP3uiv(CustomDataType type, const uint *coords);
void TexCoordP4uiv(CustomDataType type, const uint *coords);
void MultiTexCoordP1ui(TextureUnit texture, CustomDataType type, uint coords);
void MultiTexCoordP2ui(TextureUnit texture, CustomDataType type, uint coords);
void MultiTexCoordP3ui(TextureUnit texture, CustomDataType type, uint coords);
void MultiTexCoordP4ui(TextureUnit texture, CustomDataType type, uint coords);
void MultiTexCoordP1uiv(TextureUnit texture, CustomDataType type, const uint *coords);
void MultiTexCoordP2uiv(TextureUnit texture, CustomDataType type, const uint *coords);
void MultiTexCoordP3uiv(TextureUnit texture, CustomDataType type, const uint *coords);
void MultiTexCoordP4uiv(TextureUnit texture, CustomDataType type, const uint *coords);
void NormalP3ui(CustomDataType type, uint coords);
void NormalP3uiv(CustomDataType type, const uint *coords);
void ColorP3ui(CustomDataType type, uint color);
void ColorP4ui(CustomDataType type, uint color);
void ColorP3uiv(CustomDataType type, const uint *color);
void ColorP4uiv(CustomDataType type, const uint *color);
void SecondaryColorP3ui(CustomDataType type, uint color);
void SecondaryColorP3uiv(CustomDataType type, const uint *color);
void VertexAttribP1ui(uint index, CustomDataType type, boolean normalized, uint value);
void VertexAttribP2ui(uint index, CustomDataType type, boolean normalized, uint value);
void VertexAttribP3ui(uint index, CustomDataType type, boolean normalized, uint value);
void VertexAttribP4ui(uint index, CustomDataType type, boolean normalized, uint value);
void VertexAttribP1uiv(uint index, CustomDataType type, boolean normalized, const uint *value);
void VertexAttribP2uiv(uint index, CustomDataType type, boolean normalized, const uint *value);
void VertexAttribP3uiv(uint index, CustomDataType type, boolean normalized, const uint *value);
void VertexAttribP4uiv(uint index, CustomDataType type, boolean normalized, const uint *value);


Comments

Comment viewing options

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

#1

We could add a container type to OpenTK (similar to Half-precision floating-point) which converts and stores data the above functions digest. Not sure if this is worth the effort.

It appears the only kind of vertex attributes this extension is useful for are normals/tangents and possibly colors. We have the Half type for that, which uses 6 byte instead of 4 for the same task, but may contain a much wider range of values compared to 2^10 per component. Time is probably better spent by adding a Quaternionh type (4*2=8 byte) which could be used to replace normal/tangent vertex attribs (would be same memory usage: 2*4=8 byte).

the Fiddler's picture

#2

Status:open» fixed

Fixed in gl4 branch, r2935.

the Fiddler's picture

#3

Version:1.x-dev» 1.1-2014-01-02
Status:fixed» closed

Closing issues fixed in OpenTK 1.1.

If this is still an issue please file a new bug report at https://github.com/opentk/opentk/issues