feat: cleaned up and created 'ceramic/'
This commit is contained in:
parent
2d669e6411
commit
f32494a29f
12 changed files with 265 additions and 195 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include "application.h"
|
||||
#include "input.h"
|
||||
#include "resources.h"
|
||||
#include "ceramic/resources.h"
|
||||
#include <SDL3/SDL.h>
|
||||
#include <SDL3/SDL_error.h>
|
||||
#include <SDL3/SDL_events.h>
|
||||
|
|
@ -90,7 +90,7 @@ void InitClay() {
|
|||
clayMemorySize = Clay_MinMemorySize();
|
||||
clayPrimaryArena = Clay_CreateArenaWithCapacityAndMemory(clayMemorySize, SDL_malloc(clayMemorySize));
|
||||
Clay_Initialize(clayPrimaryArena, { (float)screenWidth, (float)screenHeight }, { HandleClayErrors });
|
||||
Clay_SetMeasureTextFunction(MeasureText, resources::fonts);
|
||||
Clay_SetMeasureTextFunction(MeasureText, resources::defaultFont);
|
||||
Clay_SetLayoutDimensions({ (float)screenWidth, (float)screenHeight });
|
||||
float x{ 0 }, y{ 0 };
|
||||
SDL_GetMouseState(&x, &y);
|
||||
|
|
@ -99,10 +99,10 @@ void InitClay() {
|
|||
|
||||
int main(int argc, char *argv[]) {
|
||||
InitSDL();
|
||||
resources::LoadResources();
|
||||
resources::SetDefaultFont("assets/AdwaitaSans-Regular.ttf");
|
||||
LogOutputResolution();
|
||||
InitClay();
|
||||
backendData = { renderer, resources::textEngine, resources::fonts };
|
||||
backendData = { renderer, resources::textEngine, resources::defaultFont };
|
||||
SDL_Event event;
|
||||
uint64_t startFrameTime = SDL_GetTicksNS();
|
||||
double deltaTime = 0.0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue