| 149 | // *********************************************************************** |
| 150 | |
| 151 | int LuaLoadMatrix(lua_State* pLua) { |
| 152 | UserData* pUserData = (UserData*)luaL_checkudata(pLua, 1, "UserData"); |
| 153 | if (pUserData->type != Type::Float32 || pUserData->width != 4 || pUserData->height != 4) { |
| 154 | luaL_error(pLua, "Invalid matrix provided, need to be f32 type 4x4 matrix"); |
| 155 | return 0; |
| 156 | } |
| 157 | Matrixf mat; |
| 158 | memcpy(mat.m, pUserData->pData, 16*sizeof(f32)); |
| 159 | LoadMatrix(mat); |
| 160 | return 0; |
| 161 | } |
| 162 | |
| 163 | // *********************************************************************** |
| 164 |
nothing calls this directly
no test coverage detected