10#include "shaders.gen.h"
29void gl_renderDepthRawH( GLuint depth, const
mat4 *projection,
30 const
mat4 *tex_mat );
31void gl_renderDepthRaw( GLuint depth, uint8_t flags,
double x,
double y,
32 double w,
double h,
double tx,
double ty,
double tw,
33 double th,
double angle );
35void gl_renderTextureDepthRawH( GLuint texture, GLuint depth,
36 const
mat4 *projection, const
mat4 *tex_mat,
38void gl_renderTextureDepthRaw( GLuint texture, GLuint depth, uint8_t flags,
39 double x,
double y,
double w,
double h,
40 double tx,
double ty,
double tw,
double th,
41 const glColour *
c,
double angle );
44 const
mat4 *tex_mat, const glColour *
c );
46 double w,
double h,
double tx,
double ty,
double tw,
47 double th, const glColour *
c,
double angle );
49 double h,
double tx,
double ty,
double tw,
double th,
50 const glColour *
c,
double angle );
52 const
mat4 *projection,
53 const
mat4 *tex_mat, const glColour *
c );
55 double inter,
double x,
double y,
double w,
56 double h,
double tx,
double ty,
double tw,
57 double th, const glColour *
c );
60 int sy, const glColour *
c );
62 double scalew,
double scaleh,
int sx,
int sy,
65 double angle,
int sx,
int sy, const glColour *
c );
67 double scalew,
double scaleh,
double angle,
68 int sx,
int sy, const glColour *
c );
71 double inter,
double bx,
double by,
int sx,
72 int sy, const glColour *
c );
74 double inter,
double bx,
double by,
75 int sx,
int sy, const glColour *
c );
78 double bx,
double by,
double scalew,
79 double scaleh,
int sx,
int sy,
83 double inter,
double bx,
double by,
84 double scalew,
double scaleh,
int sx,
85 int sy, const glColour *
c );
88 int sx,
int sy, const glColour *
c );
91 int sx,
int sy,
double bw,
double bh,
95 double bh, const glColour *
c );
99 double bw,
double bh, const glColour *
c );
104 double h, const glColour *
c,
double angle,
double outline );
106extern gl_vbo *gl_squareVBO;
107extern gl_vbo *gl_circleVBO;
108void gl_beginSolidProgram(
mat4 projection, const glColour *
c );
109void gl_endSolidProgram(
void );
110void gl_beginSmoothProgram(
mat4 projection );
111void gl_endSmoothProgram(
void );
115 const SimpleShader *shd, const glColour *
c,
int center );
117 const glColour *
c,
int center );
125void gl_renderLine(
double x1,
double y1,
double x2,
double y2,
129void gl_renderRect(
double x,
double y,
double w,
double h, const glColour *
c );
139 double length, const glColour *
c );
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.
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.
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.
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.
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.
Abstraction for rendering sprite sheets.