mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-13 03:29:11 +00:00
PortableVertexFormat: add a struct which hold all needed information for every vertex and use this for position
atm, position attribute is hardcoded both in VertexLoader and in backends. v2: fix coding style + cleanup lookup table
This commit is contained in:
parent
02d1d8e6a0
commit
210f4f3e55
4 changed files with 58 additions and 33 deletions
|
@ -72,10 +72,21 @@ enum VarType
|
|||
VAR_FLOAT, // GX_F32 = 4
|
||||
};
|
||||
|
||||
struct AttributeFormat
|
||||
{
|
||||
VarType type;
|
||||
int components;
|
||||
int offset;
|
||||
bool enable;
|
||||
bool integer;
|
||||
};
|
||||
|
||||
struct PortableVertexDeclaration
|
||||
{
|
||||
int stride;
|
||||
|
||||
AttributeFormat position;
|
||||
|
||||
int num_normals;
|
||||
int normal_offset[3];
|
||||
VarType normal_gl_type;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue