26#include <SDL3/SDL_gpu.h>
28#include <Objectively/Object.h>
29#include <Objectively/Vector.h>
31#include <ObjectivelyGPU.h>
43typedef struct RendererInterface RendererInterface;
92 CommandBuffer *commands;
110 Framebuffer *framebuffer;
116 GraphicsPipeline *pipeline;
142 Buffer *vertexBuffer;
148 Uint32 vertexBufferCapacity;
156 TransferBuffer *transferBuffer;
168struct RendererInterface {
173 ObjectInterface objectInterface;
210 void (*
drawBevel)(
const Renderer *self,
const SDL_Rect *rect,
int radius,
int width,
211 const SDL_Color *topLeft,
const SDL_Color *bottomRight);
221 void (*
drawLine)(
const Renderer *self,
const SDL_Point *points,
const SDL_Color *color);
232 void (*
drawLines)(
const Renderer *self,
const SDL_Point *points,
size_t count,
const SDL_Color *color);
246 void (*
drawPolygon)(
const Renderer *self,
const SDL_Point *points,
size_t count,
int width,
247 const SDL_Color *color);
265 int angle,
const SDL_Color *from,
const SDL_Color *to);
275 void (*
drawRect)(
const Renderer *self,
const SDL_Rect *rect,
const SDL_Color *color);
297 void (*
drawRoundedRect)(
const Renderer *self,
const SDL_Rect *rect,
int radius,
int width,
const SDL_Color *color);
323 int angle,
const SDL_Color *from,
const SDL_Color *to);
431 Texture *
texture,
const SDL_Color *color);
static void renderDeviceWillReset(ImageAtlas *self)
static Texture * texture(ImageAtlas *self, RenderDevice *device)
static void drawTextureRegion(const Renderer *self, Texture *texture, const SDL_Rect *src, const SDL_FRect *dest, const SDL_Color *color)
static void drawView(Renderer *self, View *view)
static void drawLines(const Renderer *self, const SDL_Point *points, size_t count, const SDL_Color *color)
static void drawTexture(const Renderer *self, Texture *texture, const SDL_FRect *dest, const SDL_Color *color)
static void drawRoundedRectGradientFilled(const Renderer *self, const SDL_Rect *rect, int radius, int angle, const SDL_Color *from, const SDL_Color *to)
static void setClippingFrame(Renderer *self, const SDL_Rect *clippingFrame)
static void drawPolygon(const Renderer *self, const SDL_Point *points, size_t count, int width, const SDL_Color *color)
static void beginFrame(Renderer *self)
static void drawRoundedRect(const Renderer *self, const SDL_Rect *rect, int radius, int width, const SDL_Color *color)
static void drawRectFilled(const Renderer *self, const SDL_Rect *rect, const SDL_Color *color)
static void drawRoundedTextureRegion(const Renderer *self, Texture *texture, const SDL_Rect *src, const SDL_FRect *dest, int radius, const SDL_Color *color)
static void drawRect(const Renderer *self, const SDL_Rect *rect, const SDL_Color *color)
static void drawRoundedRectFilled(const Renderer *self, const SDL_Rect *rect, int radius, const SDL_Color *color)
static void drawPolygonFilled(const Renderer *self, const SDL_Point *points, size_t count, int angle, const SDL_Color *from, const SDL_Color *to)
static void pushDrawArrays(const Renderer *self, const MVC_Vertex *verts, size_t count, Texture *texture, const SDL_Color *color)
static void drawLine(const Renderer *self, const SDL_Point *points, const SDL_Color *color)
static void endFrame(Renderer *self)
static void drawBevel(const Renderer *self, const SDL_Rect *rect, int radius, int width, const SDL_Color *topLeft, const SDL_Color *bottomRight)
static void beginFrameWith(Renderer *self, CommandBuffer *commands, Framebuffer *framebuffer)
static void renderDeviceDidReset(Renderer *self)
static void drawRoundedTexture(const Renderer *self, Texture *texture, const SDL_FRect *dest, int radius, const SDL_Color *color)
OBJECTIVELYMVC_EXPORT Class * _Renderer(void)
ObjectivelyMVC base types.
#define OBJECTIVELYMVC_EXPORT
static SDL_Rect clippingFrame(const View *self)
Interleaved position + texcoord + color + rounded rect shape vertex for GPU upload.
Renderer extends Object with ObjectivelyMVC's UI rendering layer.
RendererInterface * interface[0]
The interface type.
RenderDevice * device
The backing RenderDevice.
Object object
The superclass.
Views are the fundamental building blocks of ObjectivelyMVC user interfaces.