textures
[nexus3d] / src / nexus3d.c
1 #include "nexus3d_impl.h"
2
3 union nex_gfxapi nex_apicfg = {{NEX_OPENGL, 3, 3, 0}};
4 enum nex_gfxflags nex_gfxflags;
5
6
7 void nex_gfxapi_opengl(int vmaj, int vmin, enum nex_apiflags_gl flags)
8 {
9         nex_apicfg.api = NEX_OPENGL;
10         nex_apicfg.gl.ver_major = vmaj;
11         nex_apicfg.gl.ver_minor = vmin;
12         nex_apicfg.gl.flags = flags;
13 }
14
15 struct nex_span nex_span(int x, int len)
16 {
17         struct nex_span s;
18         s.start = x;
19         s.len = len;
20         return s;
21 }
22
23 struct nex_rect nex_rect(int x, int y, int w, int h)
24 {
25         struct nex_rect r;
26         r.x = x;
27         r.y = y;
28         r.width = w;
29         r.height = h;
30         return r;
31 }