-
-
Notifications
You must be signed in to change notification settings - Fork 612
Open
Description
Ok. FIrst of all, i used to code in TS and Python .
I'm very new at c/c++ coding so i'm here to ask some help.
#define CLAY_IMPLEMENTATION
#include "clay.h"
#include "clay_renderer_raylib.c"
#include <stdio.h>
// Example error handler function for Clay_ErrorHandler
void HandleClayErrors(Clay_ErrorData errorData) {
// See the Clay_ErrorData struct for more information
printf("%s", errorData.errorText.chars);
switch(errorData.errorType) {
// etc
}
}
int main(void){
Clay_Raylib_Initialize(800,600 , "Clay + Raylib Test", FLAG_WINDOW_RESIZABLE);
uint64_t clayRequiredMemory = Clay_MinMemorySize();
Clay_Arena clayMemory = (Clay_Arena) {
.memory = malloc(clayRequiredMemory),
.capacity = clayRequiredMemory
};
Clay_Initialize(clayMemory, (Clay_Dimensions){
.width = GetScreenWidth(),
.height = GetScreenHeight()
}, (Clay_ErrorHandler) { HandleClayErrors });
Font font = GetFontDefault();
while (!WindowShouldClose()) {
Clay_BeginLayout();
// * UI
Clay_RenderCommandArray renderCommands = Clay_EndLayout();
BeginDrawing();
Clay_Raylib_Render(renderCommands, &font);
}
}This is my code
I was trying to use the intro video but it seems to be a little bit older coz it didn't work (In most part because of "too few arguments")
So basically, it compiles ok (using gcc -o raylibhelloworld.exe main3.c -I include -L lib -lraylib -lgdi32 -lwinmm) but when i run it just crash.
Plus, here's my gcc -v
P.S: I'm not using repo's raylib. i'm using the windows dist from raysan5/raylib.
Metadata
Metadata
Assignees
Labels
No labels
