MCPcopy Create free account
hub / github.com/DavidColson/Polybox / LuaBeginObject2D

Function LuaBeginObject2D

source/bind_graphics.cpp:6–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4// ***********************************************************************
5
6int LuaBeginObject2D(lua_State* pLua) {
7 const char* primitiveType = luaL_checkstring(pLua, 1);
8
9 EPrimitiveType type;
10 if (strcmp(primitiveType, "Points") == 0)
11 type = EPrimitiveType::Points;
12 else if (strcmp(primitiveType, "Triangles") == 0)
13 type = EPrimitiveType::Triangles;
14 else if (strcmp(primitiveType, "Lines") == 0)
15 type = EPrimitiveType::Lines;
16 else if (strcmp(primitiveType, "LineStrip") == 0)
17 type = EPrimitiveType::LineStrip;
18 BeginObject2D(type);
19 return 0;
20}
21
22// ***********************************************************************
23

Callers

nothing calls this directly

Calls 1

BeginObject2DFunction · 0.85

Tested by

no test coverage detected