29 lines
622 B
C++
29 lines
622 B
C++
#pragma once
|
|
|
|
#include <utils/maths.h>
|
|
|
|
#define MAX_UI_VERTICES 2048 * 4
|
|
#define MAX_UI_INDICES 2048 * 4
|
|
|
|
class Texture2D;
|
|
|
|
struct UIVertex
|
|
{
|
|
Vec2 position;
|
|
Vec2 uv;
|
|
Vec4 color;
|
|
};
|
|
|
|
void uiInit();
|
|
void uiShutdown();
|
|
|
|
void uiBeginRender();
|
|
|
|
void uiDrawQuad(const Vec2& a, const Vec2& b, const Vec2& c, const Vec2& d, const Vec4& color);
|
|
void uiDrawLines(const Vec2* drawPoints, const size_t pointsCount, bool closed, const Vec4& color);
|
|
void uiDrawRect(const Vec2& position, const Vec2& size, const Vec4& color);
|
|
|
|
void uiSetTexture(Texture2D* texture);
|
|
void uiSetTextureByName(const char* filename);
|
|
|
|
void uiEndRender(); |