1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#pragma once
#include "gl.h"
extern GL_SHADER_PROGRAM* gl_2d_init( GL_DATA* gl, VEC2 screensize, const char* shadername );
void gl_polygon( GL_SHADER_PROGRAM* gl2d, VERTEX* vertices, U32 vertices_count );
void gl_textured_polygon(
GL_SHADER_PROGRAM* gl2d,
VERTEX* vertices,
U32 vertices_count,
GL_TEX2D* tex
);
extern void gl_2d_line( GL_SHADER_PROGRAM* gl2d, VEC2 start, VEC2 end, CLR col );
extern void gl_2d_rect( GL_SHADER_PROGRAM* gl2d, VEC2 origin, VEC2 dimensions, CLR col );
extern void gl_2d_frect( GL_SHADER_PROGRAM* gl2d, VEC2 origin, VEC2 dimensions, CLR col );
extern void gl_2d_circle( GL_SHADER_PROGRAM* gl2d, VEC2 origin, F32 radius, CLR col, U32 res = 48 );
extern void gl_2d_fcircle( GL_SHADER_PROGRAM* gl2d, VEC2 origin, F32 radius, CLR col, U32 res = 48 );
extern void gl_2d_textured_frect(
GL_SHADER_PROGRAM* gl2d,
VEC2 origin,
VEC2 dim,
GL_TEX2D* texture,
CLR col = { 1.f, 1.f, 1.f, 1.f },
VEC2* uv = 0,
F32 rotation = 0.F
);
|