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 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| #include "GLRenderer.h"
void GLRenderer::Begin() { rlDrawRenderBatchActive();
rlEnableShader(rlGetShaderIdDefault());
rlPushMatrix(); rlMatrixMode(RL_MODELVIEW); rlLoadIdentity();
rlDisableTexture(); rlDisableBackfaceCulling(); rlDisableDepthTest(); }
void GLRenderer::End() { rlDrawRenderBatchActive();
rlPopMatrix(); rlDisableShader(); }
void GLRenderer::DrawTestTriangle(float x, float y, float size, float rotation) { rlPushMatrix(); rlTranslatef(x, y, 0); rlRotatef(rotation, 0, 0, 1);
rlBegin(RL_TRIANGLES); rlColor4ub(255, 0, 0, 255); rlVertex2f(0, -size); rlColor4ub(0, 255, 0, 255); rlVertex2f(size, size); rlColor4ub(0, 0, 255, 255); rlVertex2f(-size, size); rlEnd(); rlPopMatrix(); }
|