Refactored client-side rendering code to use a Color struct rather than raw float arrays.
18 lines
346 B
C++
18 lines
346 B
C++
#pragma once
|
|
|
|
#include "shader.h"
|
|
#include "types.h"
|
|
|
|
class ShapeRenderer {
|
|
public:
|
|
ShapeRenderer(unsigned int screen_width, unsigned int screen_height);
|
|
~ShapeRenderer(void);
|
|
|
|
void draw_rect(int x, int y, int width, int height, const Color& color);
|
|
|
|
private:
|
|
Shader* _shape_shader;
|
|
unsigned int _vao, _vbo;
|
|
float _projection[16];
|
|
};
|