mirror of
https://github.com/love2d/love.git
synced 2026-08-12 16:40:57 +02:00
Add new mesh data formats: int32, uint32, [u]int8, [u]int16, snorm8, and snorm16.
Integer formats for vertex attributes are only supported in glsl3 shaders. They use ivec/uvec types in glsl. --HG-- branch : minor
This commit is contained in:
@@ -1529,7 +1529,9 @@ static Mesh *newCustomMesh(lua_State *L)
|
||||
format.name = luaL_checkstring(L, -3);
|
||||
|
||||
const char *tname = luaL_checkstring(L, -2);
|
||||
if (!vertex::getConstant(tname, format.type))
|
||||
if (strcmp(tname, "byte") == 0) // Legacy name.
|
||||
format.type = vertex::DATA_UNORM8;
|
||||
else if (!vertex::getConstant(tname, format.type))
|
||||
{
|
||||
luax_enumerror(L, "Mesh vertex data type name", vertex::getConstants(format.type), tname);
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user