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;
195 void (*beginFrameWith)(
Renderer *self, CommandBuffer *commands, Framebuffer *framebuffer);
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);
264 void (*drawPolygonFilled)(
const Renderer *self,
const SDL_Point *points,
size_t count,
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);
285 void (*drawRectFilled)(
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);
308 void (*drawRoundedRectFilled)(
const Renderer *self,
const SDL_Rect *rect,
int radius,
const SDL_Color *color);
322 void (*drawRoundedRectGradientFilled)(
const Renderer *self,
const SDL_Rect *rect,
int radius,
323 int angle,
const SDL_Color *from,
const SDL_Color *to);
335 void (*drawRoundedTexture)(
const Renderer *self, Texture *
texture,
const SDL_FRect *dest,
int radius,
const SDL_Color *color);
348 void (*drawRoundedTextureRegion)(
const Renderer *self, Texture *
texture,
const SDL_Rect *src,
const SDL_FRect *dest,
int radius,
const SDL_Color *color);
364 void (*drawTexture)(
const Renderer *self, Texture *
texture,
const SDL_FRect *dest,
const SDL_Color *color);
377 void (*drawTextureRegion)(
const Renderer *self, Texture *
texture,
const SDL_Rect *src,
const SDL_FRect *dest,
const SDL_Color *color);
431 Texture *
texture,
const SDL_Color *color);
439 void (*renderDeviceDidReset)(
Renderer *self);
447 void (*renderDeviceWillReset)(
Renderer *self);
static Texture * texture(ImageAtlas *self, RenderDevice *device)
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.