30#include "opengl_render.h"
36#define OPENGL_RENDER_VBO_SIZE 256
39gl_vbo *gl_squareVBO = 0;
40static gl_vbo *gl_squareEmptyVBO = 0;
41gl_vbo *gl_circleVBO = 0;
42static gl_vbo *gl_lineVBO = 0;
43static gl_vbo *gl_triangleVBO = 0;
47void gl_beginSolidProgram(
mat4 projection,
const glColour *
c )
49 glUseProgram( shaders.solid.program );
50 glEnableVertexAttribArray( shaders.solid.vertex );
51 gl_uniformColour( shaders.solid.colour,
c );
52 gl_uniformMat4( shaders.solid.projection, &projection );
55void gl_endSolidProgram(
void )
57 glDisableVertexAttribArray( shaders.solid.vertex );
62void gl_beginSmoothProgram(
mat4 projection )
64 glUseProgram( shaders.smooth.program );
65 glEnableVertexAttribArray( shaders.smooth.vertex );
66 glEnableVertexAttribArray( shaders.smooth.vertex_colour );
67 gl_uniformMat4( shaders.smooth.projection, &projection );
70void gl_endSmoothProgram()
72 glDisableVertexAttribArray( shaders.smooth.vertex );
73 glDisableVertexAttribArray( shaders.smooth.vertex_colour );
87void gl_renderRect(
double x,
double y,
double w,
double h,
const glColour *
c )
90 mat4 projection = gl_view_matrix;
91 mat4_translate_scale_xy( &projection, x, y, w, h );
108 mat4 projection = gl_view_matrix;
109 mat4_translate_scale_xy( &projection, x, y, w, h );
123 gl_beginSolidProgram( *H,
c );
127 glDrawArrays( GL_TRIANGLE_STRIP, 0, 4 );
131 glDrawArrays( GL_LINE_STRIP, 0, 5 );
133 gl_endSolidProgram();
146 glUseProgram( shaders.crosshairs.program );
147 glUniform1f( shaders.crosshairs.paramf, 1. );
163 double length,
const glColour *
c )
165 mat4 projection = gl_view_matrix;
166 mat4_translate_xy( &projection, x, y );
169 mat4_scale_xy( &projection, s * length, s );
171 gl_beginSolidProgram( projection,
c );
174 glDrawArrays( GL_LINE_STRIP, 0, 4 );
175 gl_endSolidProgram();
178void gl_renderDepthRawH( GLuint depth,
const mat4 *projection,
179 const mat4 *tex_mat )
182 glEnable( GL_DEPTH_TEST );
183 glDepthFunc( GL_ALWAYS );
184 glColorMask( GL_FALSE, GL_FALSE, GL_FALSE,
187 glUseProgram( shaders.texture_depth_only.program );
190 glBindTexture( GL_TEXTURE_2D, depth );
193 glEnableVertexAttribArray( shaders.texture_depth_only.vertex );
198 gl_uniformMat4( shaders.texture_depth_only.projection, projection );
199 gl_uniformMat4( shaders.texture_depth_only.tex_mat, tex_mat );
202 glDrawArrays( GL_TRIANGLE_STRIP, 0, 4 );
205 glDisableVertexAttribArray( shaders.texture_depth_only.vertex );
206 glColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE );
207 glDepthFunc( GL_LESS );
208 glDisable( GL_DEPTH_TEST );
216void gl_renderDepthRaw( GLuint depth, uint8_t flags,
double x,
double y,
217 double w,
double h,
double tx,
double ty,
double tw,
218 double th,
double angle )
220 mat4 projection, tex_mat;
223 projection = gl_view_matrix;
225 mat4_translate_scale_xy( &projection, x, y, w, h );
229 mat4_translate_xy( &projection, x + hw, y + hh );
231 mat4_translate_scale_xy( &projection, -hw, -hh, w, h );
235 tex_mat = ( flags & OPENGL_TEX_VFLIP )
238 mat4_translate_scale_xy( &tex_mat, tx, ty, tw, th );
240 gl_renderDepthRawH( depth, &projection, &tex_mat );
243void gl_renderTextureDepthRawH( GLuint texture, GLuint depth,
244 const mat4 *projection,
const mat4 *tex_mat,
248 glEnable( GL_DEPTH_TEST );
249 glDepthFunc( GL_ALWAYS );
251 glUseProgram( shaders.texture_depth.program );
254 glActiveTexture( GL_TEXTURE1 );
255 glBindTexture( GL_TEXTURE_2D, depth );
256 glActiveTexture( GL_TEXTURE0 );
257 glBindTexture( GL_TEXTURE_2D, texture );
264 glEnableVertexAttribArray( shaders.texture_depth.vertex );
269 gl_uniformColour( shaders.texture_depth.colour,
c );
270 gl_uniformMat4( shaders.texture_depth.projection, projection );
271 gl_uniformMat4( shaders.texture_depth.tex_mat, tex_mat );
272 glUniform1i( shaders.texture_depth.depth, 1 );
275 glDrawArrays( GL_TRIANGLE_STRIP, 0, 4 );
278 glDisableVertexAttribArray( shaders.texture_depth.vertex );
279 glDepthFunc( GL_LESS );
280 glDisable( GL_DEPTH_TEST );
288void gl_renderTextureDepthRaw( GLuint texture, GLuint depth, uint8_t flags,
289 double x,
double y,
double w,
double h,
290 double tx,
double ty,
double tw,
double th,
291 const glColour *
c,
double angle )
293 mat4 projection, tex_mat;
296 projection = gl_view_matrix;
298 mat4_translate_scale_xy( &projection, x, y, w, h );
302 mat4_translate_xy( &projection, x + hw, y + hh );
304 mat4_translate_scale_xy( &projection, -hw, -hh, w, h );
308 tex_mat = ( flags & OPENGL_TEX_VFLIP )
311 mat4_translate_scale_xy( &tex_mat, tx, ty, tw, th );
313 gl_renderTextureDepthRawH( texture, depth, &projection, &tex_mat,
c );
325 const mat4 *tex_mat,
const glColour *
c )
327 glUseProgram( shaders.texture.program );
330 glBindTexture( GL_TEXTURE_2D, texture );
337 glEnableVertexAttribArray( shaders.texture.vertex );
342 gl_uniformColour( shaders.texture.colour,
c );
343 gl_uniformMat4( shaders.texture.projection, projection );
344 gl_uniformMat4( shaders.texture.tex_mat, tex_mat );
347 glDrawArrays( GL_TRIANGLE_STRIP, 0, 4 );
350 glDisableVertexAttribArray( shaders.texture.vertex );
375 double w,
double h,
double tx,
double ty,
double tw,
376 double th,
const glColour *
c,
double angle )
378 mat4 projection, tex_mat;
381 projection = gl_view_matrix;
383 mat4_translate_scale_xy( &projection, x, y, w, h );
388 mat4_translate_xy( &projection, x + hw, y + hh );
390 mat4_translate_scale_xy( &projection, -hw, -hh, w, h );
394 tex_mat = ( flags & OPENGL_TEX_VFLIP )
397 mat4_translate_scale_xy( &tex_mat, tx, ty, tw, th );
418 double h,
double tx,
double ty,
double tw,
double th,
419 const glColour *
c,
double angle )
438 double h,
const glColour *
c,
double angle,
double outline )
443 mat4 projection, tex_mat;
445 glUseProgram( shaders.texturesdf.program );
448 glBindTexture( GL_TEXTURE_2D, texture->texture );
458 projection = gl_view_matrix;
460 mat4_translate_scale_xy( &projection, x + hw, y + hh, hw, hh );
462 mat4_translate_xy( &projection, x + hw, y + hh );
464 mat4_scale_xy( &projection, hw, hh );
466 glEnableVertexAttribArray( shaders.texturesdf.vertex );
475 tex_mat = ( texture->flags & OPENGL_TEX_VFLIP )
478 mat4_scale_xy( &tex_mat, texture->srw + 2. * sw, texture->srh + 2. * sh );
479 mat4_translate_xy( &tex_mat, -sw, -sh );
482 gl_uniformColour( shaders.texturesdf.colour,
c );
483 gl_uniformMat4( shaders.texturesdf.projection, &projection );
484 gl_uniformMat4( shaders.texturesdf.tex_mat, &tex_mat );
485 glUniform1f( shaders.texturesdf.m,
486 ( 2.0 * texture->vmax * ( w + 2. ) / texture->w ) );
489 glDrawArrays( GL_TRIANGLE_STRIP, 0, 4 );
492 glDisableVertexAttribArray( shaders.texturesdf.vertex );
511 const mat4 *projection,
512 const mat4 *tex_mat,
const glColour *
c )
517 else if ( inter <= 0. )
524 glUseProgram( shaders.texture_interpolate.program );
527 glActiveTexture( GL_TEXTURE1 );
528 glBindTexture( GL_TEXTURE_2D, tb );
529 glActiveTexture( GL_TEXTURE0 );
530 glBindTexture( GL_TEXTURE_2D, ta );
534 glEnableVertexAttribArray( shaders.texture_interpolate.vertex );
539 glUniform1i( shaders.texture_interpolate.sampler1, 0 );
540 glUniform1i( shaders.texture_interpolate.sampler2, 1 );
541 gl_uniformColour( shaders.texture_interpolate.colour,
c );
542 glUniform1f( shaders.texture_interpolate.inter, inter );
543 gl_uniformMat4( shaders.texture_interpolate.projection, projection );
544 gl_uniformMat4( shaders.texture_interpolate.tex_mat, tex_mat );
547 glDrawArrays( GL_TRIANGLE_STRIP, 0, 4 );
550 glDisableVertexAttribArray( shaders.texture_interpolate.vertex );
577 double inter,
double x,
double y,
double w,
578 double h,
double tx,
double ty,
double tw,
579 double th,
const glColour *
c )
581 mat4 projection, tex_mat;
585 return gl_renderTexture( ta, x, y, w, h, tx, ty, tw, th,
c, 0. );
586 else if ( ta == NULL )
587 return gl_renderTexture( tb, x, y, w, h, tx, ty, tw, th,
c, 0. );
589 projection = gl_view_matrix;
590 mat4_translate_scale_xy( &projection, x, y, w, h );
591 tex_mat = ( ta->
flags & OPENGL_TEX_VFLIP )
594 mat4_translate_scale_xy( &tex_mat, tx, ty, tw, th );
597 &projection, &tex_mat,
c );
610 double cx, cy, gx, gy, z;
618 *nx = ( bx - cx ) * z + gx + SCREEN_W * 0.5;
619 *ny = ( by - cy ) * z + gy + SCREEN_H * 0.5;
630 double cx, cy, gx, gy, z;
631 mat4 projection = lhs;
638 mat4_translate_scale_xy( &projection, gx + SCREEN_W * 0.5,
639 gy + SCREEN_H * 0.5, z, z );
640 mat4_translate_xy( &projection, -cx, cy );
654 double cx, cy, gx, gy, z;
662 *nx = ( bx - SCREEN_W * 0.5 - gx ) / z + cx;
663 *ny = ( by - SCREEN_H * 0.5 - gy ) / z + cy;
680 int sy,
const glColour *
c )
682 double x, y, w, h, tx, ty, z;
687 by - sprite->
sh * 0.5 );
694 if ( ( x < -w ) || ( x > SCREEN_W + w ) || ( y < -h ) ||
695 ( y > SCREEN_H + h ) )
699 tx = sprite->
sw * (double)( sx ) / sprite->
w;
700 ty = sprite->
sh * ( sprite->
sy - (double)sy - 1 ) / sprite->
h;
702 gl_renderTexture( sprite, x, y, w, h, tx, ty, sprite->
srw, sprite->
srh,
c,
722 double scalew,
double scaleh,
int sx,
int sy,
725 double x, y, w, h, tx, ty, z;
730 by - sprite->
sh * 0.5 );
733 w = sprite->
sw * z * scalew;
734 h = sprite->
sh * z * scaleh;
737 if ( ( x < -w ) || ( x > SCREEN_W + w ) || ( y < -h ) ||
738 ( y > SCREEN_H + h ) )
742 tx = sprite->
sw * (double)( sx ) / sprite->
w;
743 ty = sprite->
sh * ( sprite->
sy - (double)sy - 1 ) / sprite->
h;
745 gl_renderTexture( sprite, x, y, w, h, tx, ty, sprite->
srw, sprite->
srh,
c,
764 double angle,
int sx,
int sy,
const glColour *
c )
766 double x, y, w, h, tx, ty, z;
771 by - sprite->
sh * 0.5 );
778 if ( ( x < -w ) || ( x > SCREEN_W + w ) || ( y < -h ) ||
779 ( y > SCREEN_H + h ) )
783 tx = sprite->
sw * (double)( sx ) / sprite->
w;
784 ty = sprite->
sh * ( sprite->
sy - (double)sy - 1 ) / sprite->
h;
786 gl_renderTexture( sprite, x, y, w, h, tx, ty, sprite->
srw, sprite->
srh,
c,
808 double scalew,
double scaleh,
double angle,
809 int sx,
int sy,
const glColour *
c )
811 double x, y, w, h, tx, ty, z;
816 by - sprite->
sh * 0.5 );
819 w = sprite->
sw * z * scalew;
820 h = sprite->
sh * z * scaleh;
823 if ( ( x < -w ) || ( x > SCREEN_W + w ) || ( y < -h ) ||
824 ( y > SCREEN_H + h ) )
828 tx = sprite->
sw * (double)( sx ) / sprite->
w;
829 ty = sprite->
sh * ( sprite->
sy - (double)sy - 1 ) / sprite->
h;
831 gl_renderTexture( sprite, x, y, w, h, tx, ty, sprite->
srw, sprite->
srh,
c,
853 double inter,
double bx,
double by,
int sx,
854 int sy,
const glColour *
c )
879 double inter,
double bx,
double by,
880 double scalew,
double scaleh,
int sx,
881 int sy,
const glColour *
c )
883 double x, y, w, h, tx, ty, z;
887 by - scaleh * sa->
sh * 0.5 );
891 w = sa->
sw * z * scalew;
892 h = sa->
sh * z * scaleh;
895 if ( ( x < -w ) || ( x > SCREEN_W + w ) || ( y < -h ) ||
896 ( y > SCREEN_H + h ) )
900 tx = sa->
sw * (double)( sx ) / sa->
w;
901 ty = sa->
sh * ( sa->
sy - (double)sy - 1 ) / sa->
h;
903 gl_renderTextureInterpolate( sa, sb, inter, x, y, w, h, tx, ty, sa->
srw,
918 int sx,
int sy,
const glColour *
c )
926 tx = sprite->
sw * (double)( sx ) / sprite->
w;
927 ty = sprite->
sh * ( sprite->
sy - (double)sy - 1 ) / sprite->
h;
931 sprite->
srh,
c, 0. );
952 double inter,
double bx,
double by,
953 int sx,
int sy,
const glColour *
c )
980 double bx,
double by,
double scalew,
981 double scaleh,
int sx,
int sy,
984 double x, y, w, h, tx, ty;
994 if ( ( x < -w ) || ( x > SCREEN_W + w ) || ( y < -h ) ||
995 ( y > SCREEN_H + h ) )
999 tx = sa->
sw * (double)( sx ) / sa->
w;
1000 ty = sa->
sh * ( sa->
sy - (double)sy - 1 ) / sa->
h;
1002 gl_renderTextureInterpolate( sa, sb, inter, x, y, w, h, tx, ty, sa->
srw,
1019 int sx,
int sy,
double bw,
double bh,
1022 double x, y, tx, ty;
1028 tx = sprite->
sw * (double)( sx ) / sprite->
w;
1029 ty = sprite->
sh * ( sprite->
sy - (double)sy - 1 ) / sprite->
h;
1032 gl_renderTexture( sprite, x, y, bw, bh, tx, ty, sprite->
srw, sprite->
srh,
c,
1047 double bh,
const glColour *
c )
1049 double x, y, tx, ty;
1059 gl_renderTexture( texture, x, y, bw, bh, tx, ty, texture->srw, texture->srh,
1075 double bw,
double bh,
const glColour *
c )
1080 scale =
MIN( bw / texture->w, bh / texture->h );
1082 nw = scale * texture->w;
1083 nh = scale * texture->h;
1085 bx += ( bw - nw ) * 0.5;
1086 by += ( bh - nh ) * 0.5;
1110 texture->srw, texture->srh,
c, 0. );
1127 const SimpleShader *shd,
const glColour *
c,
int center )
1129 mat4 projection = gl_view_matrix;
1130 mat4_translate_xy( &projection, x, y );
1133 mat4_scale_xy( &projection, w, h );
1134 glUniform2f( shd->dimensions, w, h );
1148 const glColour *
c,
int center )
1150 glEnableVertexAttribArray( shd->vertex );
1152 shd->vertex, 0, 2, GL_FLOAT, 0 );
1155 gl_uniformColour( shd->colour,
c );
1157 gl_uniformMat4( shd->projection, H );
1159 glDrawArrays( GL_TRIANGLE_STRIP, 0, 4 );
1161 glDisableVertexAttribArray( shd->vertex );
1179 mat4 projection = gl_view_matrix;
1180 mat4_translate_scale_xy( &projection, cx, cy, r, r );
1196 GLfloat r = H->m[0][0] / gl_view_matrix.m[0][0];
1198 glUseProgram( shaders.circle.program );
1199 glUniform2f( shaders.circle.dimensions, r, r );
1200 glUniform1i( shaders.circle.parami, filled );
1216 double a = atan2( y2 - y1, x2 - x1 );
1217 double s = hypotf( x2 - x1, y2 - y1 );
1219 glUseProgram( shaders.sdfsolid.program );
1220 glUniform1f( shaders.sdfsolid.paramf, 1. );
1221 gl_renderShader( ( x1 + x2 ) * 0.5, ( y1 + y2 ) * 0.5, s * 0.5 + 0.5, 1.0, a,
1222 &shaders.sdfsolid,
c, 1 );
1235 double rx, ry, rw, rh;
1240 glScissor( rx, ry, rw, rh );
1241 glEnable( GL_SCISSOR_TEST );
1249 glDisable( GL_SCISSOR_TEST );
1307 vertex[0] = 0.5 * cos( 4. * M_PI / 3. );
1308 vertex[1] = 0.5 * sin( 4. * M_PI / 3. );
1309 vertex[2] = 0.5 * cos( 0. );
1310 vertex[3] = 0.5 * sin( 0. );
1311 vertex[4] = 0.5 * cos( 2. * M_PI / 3. );
1312 vertex[5] = 0.5 * sin( 2. * M_PI / 3. );
1313 vertex[6] = vertex[0];
1314 vertex[7] = vertex[1];
void cam_getPos(double *x, double *y)
Gets the camera position.
double cam_getZoom(void)
Gets the camera zoom.
void gui_getOffset(double *x, double *y)
Gets the GUI offset.
mat4 mat4_identity(void)
Creates an identity matrix.
mat4 mat4_ortho(double left, double right, double bottom, double top, double nearVal, double farVal)
Creates an orthographic projection matrix.
void mat4_rotate2d(mat4 *m, double angle)
Rotates an angle, in radians, around the z axis.
Header file with generic functions and naev-specifics.
void gl_exitRender(void)
Cleans up the OpenGL rendering routines.
void gl_renderShader(double x, double y, double w, double h, double r, const SimpleShader *shd, const glColour *c, int center)
Renders a simple shader.
void gl_renderShaderH(const SimpleShader *shd, const mat4 *H, const glColour *c, int center)
Renders a simple shader with a transformation.
static int gl_renderVBOcolOffset
void gl_renderRect(double x, double y, double w, double h, const glColour *c)
Renders a rectangle.
void gl_renderLine(double x1, double y1, double x2, double y2, const glColour *c)
Draws a line.
void gl_gameToScreenCoords(double *nx, double *ny, double bx, double by)
Converts in-game coordinates to screen coordinates.
#define OPENGL_RENDER_VBO_SIZE
void gl_renderSpriteInterpolate(const glTexture *sa, const glTexture *sb, double inter, double bx, double by, int sx, int sy, const glColour *c)
Blits a sprite interpolating, position is relative to the player.
int gl_initRender(void)
Initializes the OpenGL rendering routines.
void gl_renderCircleH(const mat4 *H, const glColour *c, int filled)
Draws a circle.
void gl_renderTexture(const glTexture *texture, double x, double y, double w, double h, double tx, double ty, double tw, double th, const glColour *c, double angle)
Texture blitting backend.
void gl_renderTriangleEmpty(double x, double y, double a, double s, double length, const glColour *c)
Renders a triangle at a given position.
void gl_unclipRect(void)
Clears the 2d clipping planes.
static int gl_renderVBOtexOffset
void gl_renderSpriteScale(const glTexture *sprite, double bx, double by, double scalew, double scaleh, int sx, int sy, const glColour *c)
Blits a sprite, position is relative to the player.
void gl_renderSpriteScaleRotate(const glTexture *sprite, double bx, double by, double scalew, double scaleh, double angle, int sx, int sy, const glColour *c)
Blits a sprite, position is relative to the player with scaling and rotation.
void gl_renderStatic(const glTexture *texture, double bx, double by, const glColour *c)
Blits a texture to a position.
void gl_renderSDF(const glTexture *texture, double x, double y, double w, double h, const glColour *c, double angle, double outline)
SDF Texture blitting backend.
void gl_renderScale(const glTexture *texture, double bx, double by, double bw, double bh, const glColour *c)
Blits a texture scaling it.
void gl_renderScaleSprite(const glTexture *sprite, double bx, double by, int sx, int sy, double bw, double bh, const glColour *c)
Blits a scaled sprite, position is in absolute screen coordinates.
void gl_renderTextureInterpolate(const glTexture *ta, const glTexture *tb, double inter, double x, double y, double w, double h, double tx, double ty, double tw, double th, const glColour *c)
Texture blitting backend for interpolated texture.
void gl_renderScaleAspect(const glTexture *texture, double bx, double by, double bw, double bh, const glColour *c)
Blits a texture scaling it to fit a rectangle, but conserves aspect ratio.
void gl_renderTextureRaw(GLuint texture, uint8_t flags, double x, double y, double w, double h, double tx, double ty, double tw, double th, const glColour *c, double angle)
Texture blitting backend.
void gl_renderSprite(const glTexture *sprite, double bx, double by, int sx, int sy, const glColour *c)
Blits a sprite, position is relative to the player.
void gl_renderStaticSpriteInterpolate(const glTexture *sa, const glTexture *sb, double inter, double bx, double by, int sx, int sy, const glColour *c)
Blits a sprite interpolating, position is relative to the player.
void gl_screenToGameCoords(double *nx, double *ny, int bx, int by)
Converts screen coordinates to in-game coordinates.
void gl_renderStaticSprite(const glTexture *sprite, double bx, double by, int sx, int sy, const glColour *c)
Blits a sprite, position is in absolute screen coordinates.
void gl_renderTextureRawH(GLuint texture, const mat4 *projection, const mat4 *tex_mat, const glColour *c)
Texture blitting backend.
static gl_vbo * gl_renderVBO
void gl_renderRectEmpty(double x, double y, double w, double h, const glColour *c)
Renders a rectangle.
void gl_renderCross(double x, double y, double r, const glColour *c)
Renders a cross at a given position.
void gl_renderSpriteRotate(const glTexture *sprite, double bx, double by, double angle, int sx, int sy, const glColour *c)
Blits a sprite, position is relative to the player with rotation.
void gl_renderTextureInterpolateRawH(GLuint ta, GLuint tb, double inter, const mat4 *projection, const mat4 *tex_mat, const glColour *c)
Texture blitting backend for interpolated texture.
void gl_renderStaticSpriteInterpolateScale(const glTexture *sa, const glTexture *sb, double inter, double bx, double by, double scalew, double scaleh, int sx, int sy, const glColour *c)
Blits a sprite interpolating, position is relative to the player.
void gl_renderSpriteInterpolateScale(const glTexture *sa, const glTexture *sb, double inter, double bx, double by, double scalew, double scaleh, int sx, int sy, const glColour *c)
Blits a sprite interpolating, position is relative to the player.
void gl_renderRectH(const mat4 *H, const glColour *c, int filled)
Renders a rectangle.
mat4 gl_gameToScreenMatrix(mat4 lhs)
Return a transformation which converts in-game coordinates to screen coordinates.
void gl_clipRect(int x, int y, int w, int h)
Sets up 2d clipping planes around a rectangle.
void gl_renderCircle(double cx, double cy, double r, const glColour *c, int filled)
Draws a circle.
void gl_vboDestroy(gl_vbo *vbo)
Destroys a VBO.
gl_vbo * gl_vboCreateStream(GLsizei size, const void *data)
Creates a stream vbo.
void gl_vboActivateAttribOffset(gl_vbo *vbo, GLuint index, GLuint offset, GLint size, GLenum type, GLsizei stride)
Activates a VBO's offset.
gl_vbo * gl_vboCreateStatic(GLsizei size, const void *data)
Creates a stream vbo.
Abstraction for rendering sprite sheets.