mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Meshes expose vertex buffers, part 1
(compiles, but is currently half-implemented and broken)
This commit is contained in:
@@ -320,8 +320,7 @@ struct BufferBindings
|
||||
struct VertexAttributeInfo
|
||||
{
|
||||
uint8 bufferIndex;
|
||||
DataType type : 4;
|
||||
uint8 components : 4;
|
||||
DataFormat format : 8;
|
||||
uint16 offsetFromVertex;
|
||||
};
|
||||
|
||||
@@ -346,13 +345,12 @@ struct VertexAttributes
|
||||
setCommonFormat(format, bufferindex);
|
||||
}
|
||||
|
||||
void set(uint32 index, DataType type, uint8 components, uint16 offsetfromvertex, uint8 bufferindex)
|
||||
void set(uint32 index, DataFormat format, uint16 offsetfromvertex, uint8 bufferindex)
|
||||
{
|
||||
enableBits |= (1u << index);
|
||||
|
||||
attribs[index].bufferIndex = bufferindex;
|
||||
attribs[index].type = type;
|
||||
attribs[index].components = components;
|
||||
attribs[index].format = format;
|
||||
attribs[index].offsetFromVertex = offsetfromvertex;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user