
- Font loading - Measuring for formatting & justification - Utf8 Glyph walking - Commented example in oogabooga/examples/text_rendering.c - Small 2D renderer refactor - Pass 8-bit integers "type" and "sampler_index" to shader - Sample texture differently depending on "type" (text or regular quad) - Sample with nearest/linear min/mag depending on sampler_index - Set min/mag filtering in Draw_Quad - Images are now created and deleted directly with gfx calls rather than deferring it for gfx_update. - We can now set image sub data with gfx_set_image_data() - Images are no longer hard coded to 4 channels - Utf8 utility: - utf8_to_utf32(): convert utf8 bytes to a single u32 codepoint - next_utf8(): Convert first utf8 character in a string to a u32 codepoint and advance the passed string to the next unicode - Renamed m4_multiply -> m4_mul for consistency - Refactored os window to be DPI aware (scaled_width vs pixel_width) - in minimal example, renamed hammer_xform -> rect_xform
51 lines
1.4 KiB
C
51 lines
1.4 KiB
C
|
|
|
|
///
|
|
// Build config stuff
|
|
|
|
|
|
#define RUN_TESTS 0
|
|
// This is only for people developing oogabooga!
|
|
#define OOGABOOGA_DEV 1
|
|
|
|
#define ENABLE_PROFILING 0
|
|
|
|
// ENABLE_SIMD Requires CPU to support at least SSE1 but I will be very surprised if you find a system today which doesn't
|
|
#define ENABLE_SIMD 0
|
|
|
|
|
|
#define INITIAL_PROGRAM_MEMORY_SIZE MB(5)
|
|
|
|
typedef struct Context_Extra {
|
|
int monkee;
|
|
} Context_Extra;
|
|
// This needs to be defined before oogabooga if we want extra stuff in context
|
|
#define CONTEXT_EXTRA Context_Extra
|
|
|
|
// This defaults to "entry", but we can set it to anything (except "main" or other existing proc names"
|
|
#define ENTRY_PROC entry
|
|
|
|
// Ooga booga needs to be included AFTER configuration and BEFORE the program code
|
|
#include "oogabooga/oogabooga.c"
|
|
|
|
// #Volatile tutorial below
|
|
// #Volatile tutorial below
|
|
// #Volatile tutorial below
|
|
|
|
//
|
|
// Comment & Uncomment these to swap projects (only include one at a time)
|
|
//
|
|
|
|
// this is a minimal starting point for new projects. Copy & rename to get started
|
|
#include "oogabooga/examples/minimal_game_loop.c"
|
|
|
|
// #include "oogabooga/examples/text_rendering.c"
|
|
|
|
// An engine dev stress test for rendering
|
|
// #include "oogabooga/examples/renderer_stress_test.c"
|
|
|
|
// Randy's example game that he's building out as a tutorial for using the engine
|
|
// #include "entry_randygame.c"
|
|
|
|
// This is where you swap in your own project!
|
|
// #include "entry_yourepicgamename.c"
|