MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / GetOpenGLNumbers

Method GetOpenGLNumbers

src/bzflag/HubLua.cpp:1221–1235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1219
1220
1221int HubLink::GetOpenGLNumbers(lua_State* L) {
1222 const int pname = luaL_checkint(L, 1);
1223 const int count = luaL_optint(L, 2, 1);
1224 GLdouble buf[256];
1225 if ((count < 0) || (count > 256)) {
1226 lua_pushnil(L);
1227 return 1;
1228 }
1229 glGetDoublev(pname, buf);
1230 lua_checkstack(L, count);
1231 for (int i = 0; i < count; i++) {
1232 LuaDouble::PushDouble(L, buf[i]);
1233 }
1234 return count;
1235}
1236
1237
1238//============================================================================//

Callers

nothing calls this directly

Calls 2

lua_pushnilFunction · 0.50
lua_checkstackFunction · 0.50

Tested by

no test coverage detected