2 Deep Runner - 6dof shooter game for the SGI O2.
3 Copyright (C) 2023 John Tsiombikas <nuclear@mutantstargoat.com>
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>.
18 #ifndef GRAPHICS_API_WRAPPER_H_
19 #define GRAPHICS_API_WRAPPER_H_
79 GAW_ONE_MINUS_SRC_ALPHA
99 void gaw_viewport(int x, int y, int w, int h);
101 void gaw_matrix_mode(int mode);
102 void gaw_load_identity(void);
103 void gaw_load_matrix(const float *m);
104 void gaw_mult_matrix(const float *m);
105 void gaw_push_matrix(void);
106 void gaw_pop_matrix(void);
107 void gaw_get_modelview(float *m);
108 void gaw_get_projection(float *m);
110 void gaw_translate(float x, float y, float z);
111 void gaw_rotate(float angle, float x, float y, float z);
112 void gaw_scale(float sx, float sy, float sz);
113 void gaw_ortho(float l, float r, float b, float t, float n, float f);
114 void gaw_frustum(float l, float r, float b, float t, float n, float f);
115 void gaw_perspective(float vfov, float aspect, float znear, float zfar);
118 void gaw_restore(void);
119 void gaw_enable(int st);
120 void gaw_disable(int st);
122 void gaw_depth_func(int func);
123 void gaw_blend_func(int src, int dest);
124 void gaw_alpha_func(int func, float ref);
126 void gaw_clear_color(float r, float g, float b, float a);
127 void gaw_clear(unsigned int flags);
128 void gaw_depth_mask(int mask);
130 void gaw_vertex_array(int nelem, int stride, const void *ptr);
131 void gaw_normal_array(int stride, const void *ptr);
132 void gaw_texcoord_array(int nelem, int stride, const void *ptr);
133 void gaw_color_array(int nelem, int stride, const void *ptr);
134 void gaw_draw(int prim, int nverts);
135 void gaw_draw_indexed(int prim, const unsigned int *idxarr, int nidx);
137 void gaw_begin(int prim);
139 void gaw_color3f(float r, float g, float b);
140 void gaw_color4f(float r, float g, float b, float a);
141 void gaw_color3ub(int r, int g, int b);
142 void gaw_normal(float x, float y, float z);
143 void gaw_texcoord1f(float u);
144 void gaw_texcoord2f(float u, float v);
145 void gaw_vertex2f(float x, float y);
146 void gaw_vertex3f(float x, float y, float z);
148 void gaw_rect(float x1, float y1, float x2, float y2);
150 void gaw_pointsize(float sz);
151 void gaw_linewidth(float w);
153 int gaw_compile_begin(void);
154 void gaw_compile_end(void);
155 void gaw_draw_compiled(int id);
156 void gaw_free_compiled(int id);
158 void gaw_mtl_diffuse(float r, float g, float b, float a);
159 void gaw_mtl_specular(float r, float g, float b, float shin);
160 void gaw_mtl_emission(float r, float g, float b);
161 void gaw_texenv_sphmap(int enable);
163 unsigned int gaw_create_tex1d(int texfilter);
164 unsigned int gaw_create_tex2d(int texfilter);
165 void gaw_destroy_tex(unsigned int tex);
167 void gaw_bind_tex1d(int tex);
168 void gaw_bind_tex2d(int tex);
170 void gaw_texfilter1d(int texfilter);
171 void gaw_texfilter2d(int texfilter);
173 void gaw_texwrap1d(int wrap);
174 void gaw_texwrap2d(int uwrap, int vwrap);
176 void gaw_tex1d(int ifmt, int xsz, int fmt, void *pix);
177 void gaw_tex2d(int ifmt, int xsz, int ysz, int fmt, void *pix);
178 void gaw_subtex2d(int lvl, int x, int y, int xsz, int ysz, int fmt, void *pix);
180 void gaw_set_tex1d(unsigned int texid);
181 void gaw_set_tex2d(unsigned int texid);
183 void gaw_ambient(float r, float g, float b);
184 void gaw_light_dir(int idx, float x, float y, float z);
185 void gaw_light_color(int idx, float r, float g, float b, float s);
186 void gaw_lighting_fast(void);
188 void gaw_fog_color(float r, float g, float b);
189 void gaw_fog_linear(float z0, float z1);
190 void gaw_fog_fast(void);
192 void gaw_poly_wire(void);
193 void gaw_poly_flat(void);
194 void gaw_poly_gouraud(void);
196 #endif /* GRAPHICS_API_WRAPPER_H_ */