mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 06:08:30 +09:00
[Feat] (MG_State/VertexArrayState): Add IsInteger in attribute.
This commit is contained in:
@@ -31,7 +31,7 @@ namespace MobileGL {
|
||||
}
|
||||
|
||||
void VertexArrayObject::SetAttributeFormat(Uint index, int size, DataType type,
|
||||
bool normalized, int stride, SizeT offset) {
|
||||
bool normalized, int stride, SizeT offset, bool isInteger) {
|
||||
if (index >= MAX_VERTEX_ATTRIBS) return;
|
||||
|
||||
if (size < 1 || size > 4) {
|
||||
@@ -44,6 +44,7 @@ namespace MobileGL {
|
||||
attr.Normalized = normalized;
|
||||
attr.Stride = stride;
|
||||
attr.Offset = offset;
|
||||
attr.IsInteger = isInteger;
|
||||
}
|
||||
|
||||
void VertexArrayObject::BindAttributeBuffer(Uint index,
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace MobileGL {
|
||||
bool Normalized = false;
|
||||
int Stride = 0;
|
||||
SizeT Offset = 0;
|
||||
bool IsInteger = false;
|
||||
SharedPtr<BufferObject> Buffer;
|
||||
};
|
||||
|
||||
@@ -23,7 +24,7 @@ namespace MobileGL {
|
||||
void DisableAttribute(Uint index);
|
||||
bool IsAttributeEnabled(Uint index) const;
|
||||
|
||||
void SetAttributeFormat(Uint index, int size, DataType type, bool normalized, int stride, SizeT offset);
|
||||
void SetAttributeFormat(Uint index, int size, DataType type, bool normalized, int stride, SizeT offset, bool isInteger);
|
||||
|
||||
void BindAttributeBuffer(Uint index, const SharedPtr<BufferObject>& buffer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user