Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/12.0-development' into 12.0-te…
Browse files Browse the repository at this point in the history
…stsuite
  • Loading branch information
ellraiser committed Nov 28, 2023
2 parents cc4b618 + 910533e commit 13c5f7a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/modules/graphics/vertex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,17 +110,17 @@ static const DataFormatInfo dataFormatInfo[]
{ DATA_BASETYPE_FLOAT, false, 3, 0, 0, 4, 12 }, // DATAFORMAT_FLOAT_VEC3
{ DATA_BASETYPE_FLOAT, false, 4, 0, 0, 4, 16 }, // DATAFORMAT_FLOAT_VEC4

{ DATA_BASETYPE_FLOAT, true, 0, 2, 2, 4, 16 }, // DATAFORMAT_FLOAT_MAT2X2
{ DATA_BASETYPE_FLOAT, true, 0, 2, 3, 4, 24 }, // DATAFORMAT_FLOAT_MAT2X3
{ DATA_BASETYPE_FLOAT, true, 0, 2, 4, 4, 32 }, // DATAFORMAT_FLOAT_MAT2X4
{ DATA_BASETYPE_FLOAT, true, 4, 2, 2, 4, 16 }, // DATAFORMAT_FLOAT_MAT2X2
{ DATA_BASETYPE_FLOAT, true, 6, 2, 3, 4, 24 }, // DATAFORMAT_FLOAT_MAT2X3
{ DATA_BASETYPE_FLOAT, true, 8, 2, 4, 4, 32 }, // DATAFORMAT_FLOAT_MAT2X4

{ DATA_BASETYPE_FLOAT, true, 0, 3, 2, 4, 24 }, // DATAFORMAT_FLOAT_MAT3X2
{ DATA_BASETYPE_FLOAT, true, 0, 3, 3, 4, 36 }, // DATAFORMAT_FLOAT_MAT3X3
{ DATA_BASETYPE_FLOAT, true, 0, 3, 4, 4, 48 }, // DATAFORMAT_FLOAT_MAT3X4
{ DATA_BASETYPE_FLOAT, true, 6, 3, 2, 4, 24 }, // DATAFORMAT_FLOAT_MAT3X2
{ DATA_BASETYPE_FLOAT, true, 9, 3, 3, 4, 36 }, // DATAFORMAT_FLOAT_MAT3X3
{ DATA_BASETYPE_FLOAT, true, 12, 3, 4, 4, 48 }, // DATAFORMAT_FLOAT_MAT3X4

{ DATA_BASETYPE_FLOAT, true, 0, 4, 2, 4, 32 }, // DATAFORMAT_FLOAT_MAT4X2
{ DATA_BASETYPE_FLOAT, true, 0, 4, 3, 4, 48 }, // DATAFORMAT_FLOAT_MAT4X3
{ DATA_BASETYPE_FLOAT, true, 0, 4, 4, 4, 64 }, // DATAFORMAT_FLOAT_MAT4X4
{ DATA_BASETYPE_FLOAT, true, 8, 4, 2, 4, 32 }, // DATAFORMAT_FLOAT_MAT4X2
{ DATA_BASETYPE_FLOAT, true, 12, 4, 3, 4, 48 }, // DATAFORMAT_FLOAT_MAT4X3
{ DATA_BASETYPE_FLOAT, true, 16, 4, 4, 4, 64 }, // DATAFORMAT_FLOAT_MAT4X4

{ DATA_BASETYPE_INT, false, 1, 0, 0, 4, 4 }, // DATAFORMAT_INT32
{ DATA_BASETYPE_INT, false, 2, 0, 0, 4, 8 }, // DATAFORMAT_INT32_VEC2
Expand Down
12 changes: 12 additions & 0 deletions src/modules/graphics/wrap_Buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,18 @@ void luax_writebufferdata(lua_State *L, int startidx, DataFormat format, char *d
case DATAFORMAT_FLOAT_VEC3: writeData<float>(L, startidx, 3, data); break;
case DATAFORMAT_FLOAT_VEC4: writeData<float>(L, startidx, 4, data); break;

case DATAFORMAT_FLOAT_MAT2X2: writeData<float>(L, startidx, 4, data); break;
case DATAFORMAT_FLOAT_MAT2X3: writeData<float>(L, startidx, 6, data); break;
case DATAFORMAT_FLOAT_MAT2X4: writeData<float>(L, startidx, 8, data); break;

case DATAFORMAT_FLOAT_MAT3X2: writeData<float>(L, startidx, 6, data); break;
case DATAFORMAT_FLOAT_MAT3X3: writeData<float>(L, startidx, 9, data); break;
case DATAFORMAT_FLOAT_MAT3X4: writeData<float>(L, startidx, 12, data); break;

case DATAFORMAT_FLOAT_MAT4X2: writeData<float>(L, startidx, 8, data); break;
case DATAFORMAT_FLOAT_MAT4X3: writeData<float>(L, startidx, 12, data); break;
case DATAFORMAT_FLOAT_MAT4X4: writeData<float>(L, startidx, 16, data); break;

case DATAFORMAT_INT32: writeData<int32>(L, startidx, 1, data); break;
case DATAFORMAT_INT32_VEC2: writeData<int32>(L, startidx, 2, data); break;
case DATAFORMAT_INT32_VEC3: writeData<int32>(L, startidx, 3, data); break;
Expand Down

0 comments on commit 13c5f7a

Please sign in to comment.