| 1219 | |
| 1220 | |
| 1221 | int 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 | //============================================================================// |
nothing calls this directly
no test coverage detected