Shaders
This commit is contained in:
29
engine/render/ui.h
Normal file
29
engine/render/ui.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#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();
|
||||
Reference in New Issue
Block a user