naev 0.12.5
nlua_canvas.h
1/*
2 * See Licensing and Copyright notice in naev.h
3 */
4#pragma once
5
6#include "nlua.h"
7
8#include "opengl.h"
9
10#define CANVAS_METATABLE "canvas"
11
15typedef struct LuaCanvas_s {
16 GLuint fbo;
18 GLuint depth;
20
21/*
22 * Library loading
23 */
24int nlua_loadCanvas( nlua_env env );
25
26/* Basic operations. */
27LuaCanvas_t *lua_tocanvas( lua_State *L, int ind );
28LuaCanvas_t *luaL_checkcanvas( lua_State *L, int ind );
29LuaCanvas_t *lua_pushcanvas( lua_State *L, LuaCanvas_t canvas );
30int lua_iscanvas( lua_State *L, int ind );
31
32/*
33 * Misc helpers.
34 */
35int canvas_new( LuaCanvas_t *lc, int w, int h );
36void canvas_reset( void );
Wrapper to canvass.
Definition nlua_canvas.h:15
glTexture * tex
Definition nlua_canvas.h:17
GLuint depth
Definition nlua_canvas.h:18
Abstraction for rendering sprite sheets.
Definition opengl_tex.h:43