Browse Source

Add Mesh:getVertexBuffer.

Alex Szpakowski 5 years ago
parent
commit
834cddc34c
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/modules/graphics/wrap_Mesh.cpp

+ 8 - 0
src/modules/graphics/wrap_Mesh.cpp

@@ -358,6 +358,13 @@ int w_Mesh_getAttachedAttributes(lua_State *L)
 	return 1;
 	return 1;
 }
 }
 
 
+int w_Mesh_getVertexBuffer(lua_State *L)
+{
+	Mesh *t = luax_checkmesh(L, 1);
+	luax_pushtype(L, t->getVertexBuffer());
+	return 1;
+}
+
 int w_Mesh_flush(lua_State *L)
 int w_Mesh_flush(lua_State *L)
 {
 {
 	Mesh *t = luax_checkmesh(L, 1);
 	Mesh *t = luax_checkmesh(L, 1);
@@ -562,6 +569,7 @@ static const luaL_Reg w_Mesh_functions[] =
 	{ "attachAttribute", w_Mesh_attachAttribute },
 	{ "attachAttribute", w_Mesh_attachAttribute },
 	{ "detachAttribute", w_Mesh_detachAttribute },
 	{ "detachAttribute", w_Mesh_detachAttribute },
 	{ "getAttachedAttributes", w_Mesh_getAttachedAttributes },
 	{ "getAttachedAttributes", w_Mesh_getAttachedAttributes },
+	{ "getVertexBuffer", w_Mesh_getVertexBuffer },
 	{ "flush", w_Mesh_flush },
 	{ "flush", w_Mesh_flush },
 	{ "setVertexMap", w_Mesh_setVertexMap },
 	{ "setVertexMap", w_Mesh_setVertexMap },
 	{ "getVertexMap", w_Mesh_getVertexMap },
 	{ "getVertexMap", w_Mesh_getVertexMap },