MCPcopy Create free account
hub / github.com/CelestiaProject/Celestia / LoadLuaGraphicsLibrary

Function LoadLuaGraphicsLibrary

src/celestia/celx_gl.cpp:221–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219}
220
221void LoadLuaGraphicsLibrary(lua_State* l)
222{
223 CelxLua celx(l);
224 lua_newtable(l);
225
226 celx.registerMethod("Frustum", gl_Frustum);
227 celx.registerMethod("Ortho", gl_Ortho);
228 celx.registerMethod("Color", gl_Color);
229 celx.registerMethod("LineWidth", gl_LineWidth);
230 celx.registerMethod("TexCoord", gl_TexCoord);
231 celx.registerMethod("TexParameter", gl_TexParameter);
232 celx.registerMethod("Vertex", gl_Vertex);
233 celx.registerMethod("Translate", gl_Translate);
234 celx.registerMethod("BlendFunc", gl_BlendFunc);
235 celx.registerMethod("Begin", gl_Begin);
236 celx.registerMethod("End", gl_End);
237 celx.registerMethod("Enable", gl_Enable);
238 celx.registerMethod("Disable", gl_Disable);
239 celx.registerMethod("MatrixMode", gl_MatrixMode);
240 celx.registerMethod("PopMatrix", gl_PopMatrix);
241 celx.registerMethod("LoadIdentity", gl_LoadIdentity);
242 celx.registerMethod("PushMatrix", gl_PushMatrix);
243
244 celx.registerValue("QUADS", GL_QUADS);
245 celx.registerValue("LIGHTING", GL_LIGHTING);
246 celx.registerValue("POINTS", GL_POINTS);
247 celx.registerValue("LINES", GL_LINES);
248 celx.registerValue("LINE_LOOP", GL_LINE_LOOP);
249 celx.registerValue("LINE_SMOOTH", GL_LINE_SMOOTH);
250 celx.registerValue("POLYGON", GL_POLYGON);
251 celx.registerValue("PROJECTION", GL_PROJECTION);
252 celx.registerValue("MODELVIEW", GL_MODELVIEW);
253 celx.registerValue("BLEND", GL_BLEND);
254 celx.registerValue("TEXTURE_2D", GL_TEXTURE_2D);
255 celx.registerValue("TEXTURE_MAG_FILTER", GL_TEXTURE_MAG_FILTER);
256 celx.registerValue("TEXTURE_MIN_FILTER", GL_TEXTURE_MIN_FILTER);
257 celx.registerValue("LINEAR", GL_LINEAR);
258 celx.registerValue("NEAREST", GL_NEAREST);
259 celx.registerValue("SRC_ALPHA", GL_SRC_ALPHA);
260 celx.registerValue("ONE_MINUS_SRC_ALPHA", GL_ONE_MINUS_SRC_ALPHA);
261 lua_setglobal(l, "gl");
262
263 lua_newtable(l);
264 celx.registerMethod("LookAt", glu_LookAt);
265 celx.registerMethod("Ortho2D", glu_Ortho2D);
266 lua_setglobal(l, "glu");
267}

Callers 1

loadLuaLibsFunction · 0.85

Calls 2

registerMethodMethod · 0.80
registerValueMethod · 0.80

Tested by

no test coverage detected