## v0.01.005 - Arenas, Monitor query, fullscreen - Window - Added bool window.fullscreen - Added bool window.allow_resize - Reworked window initialization Window now starts of invisible and is made visible on first os_update(). This also gets rid of the weird window resize and reposition at startup. - Renderer - Added gfx_read_image_data() to read pixels from a Gfx_Image* - Os - Implemented access to monitor information Os_Monitor *os.monitors Os_Monitor *os.primary_monitor Os_Monitor *window.monitor u64 Os_Monitor.refresh_rate u64 Os_Monitor.resolution_x u64 Os_Monitor.resolution_y u64 Os_Monitor.dpi u64 Os_Monitor.dpi_y string Os_Monitor.name - Memory - Added arenas & the arena allocator Arena make_arena(size) Allocator make_arena_allocator(size) Allocator make_arena_allocator_with_memory(size, *memory) - Misc - Added examples/sprite_animation.c - Removed Herobrine. - Modified build scripts to not remove the build/ directory and instead check if it exists and if not, create it. - Added os_wait_and_read_stdin(*result, max_count, allocator) - Added %b format specifier for printing bools (true/false) - Added/Improved some documentation - Fixed some woopsies, goofs, and bugs ## v0.01.004 - Gamepad input, text wrapping, bug fixes - Input - Added Gamepad support - Gamepad keycodes for buttons & clicks - input_frame.left_stick .right_stick .left_trigger .right_trigger - event.gamepad_index for key inputs if it's from the gamepad - INPUT_EVENT_GAMEPAD_AXIS for same axes but in events and with the event.gamepad_index set - Deadzone globals: Vector2 deadzone_left_stick Vector2 deadzone_right_stick float32 deadzone_left_trigger float32 deadzone_right_trigger - Vibration set_gamepad_vibration(float32 left, float32 right) set_specific_gamepad_vibration(int gamepad_index, float32 left, float32 right) - Text - Implemented word-wrapping text into lines with split_text_to_lines_with_wrapping() - Added Gfx_Font_Metrics.new_line_offset for an exact value for how much you should decrement the Y on newline - strings - Added some utf8 helpers utf8_index_to_byte_index() utf8_slice() - Added whitespace trimming helpers string_trim() (trim right & left) string_trim_left() string_trim_right() - Misc - input_example.c - Reworked os_get_current_time_in_seconds() -> os_get_elapsed_seconds() Now returns seconds sincs app init. - draw_frame.view -> draw_frame.camera_xform (deprecated .view) - Unecessary refactoring in drawing.c - Fixed temporary storage overflow warning (contributor @kacpercwiklinski f9bf7ff) - Added build.sh for building on linux (contributor @0xf0adc 90f00b) - Added linmath constants v2_one v3_one v4_one v2_zero v3_zero v4_zero - Refactored get_temporary_allocator() to fallback to get_initialization_allocator() if temp_allocator is not initted ## v0.01.003 - Mouse pointers, Audio improvement & features, bug fixes - Os layer - Implemented setting of mouse pointers, either to system standard pointers or a custom image os_set_mouse_pointer_standard(kind) os_set_mouse_pointer_custom(pointer) os_make_custom_mouse_pointer(image, width, height, hotspot_x, hotspot_y) os_make_custom_mouse_pointer_from_file(path, hotspot_x, hotspot_y, allocator) - Ignore SETCURSOR events unless for window resize pointer - Store SYSTEM_INFO in init - os_get_number_of_logical_processors() - Renderer - Fix bad uv sampling bug when uneven window dimensions - Memory - Made program_memory act more like an arena (see os_reserve_next_memory_pages() & os_unlock_program_memory_pages()) - In debug, default program memory to PAGE_NOACCESS which needs to be unlocked with os_unlock_program_memory_pages() (better crashes if we touch that memory) - os_lock_program_memory_pages - Heap locks pages when completely free - Audio - Implemented playback speed configuration - Implemented a way to recognize audio sources which start playing at the exact same time so we can avoid phase cancellation - Refactor playback configuration members in Audio_Player to be in a struct Audio_Playback_Configuration Example: player.volume -> player.config.volume - bool disable_spacialization -> bool enable_spacialization (inverted) - Deprecated: play_one_audio_clip_source_at_position() play_one_audio_clip_at_position() - Added: play_one_audio_clip_source_with_config() play_one_audio_clip_with_config() - Removed 'bool retain_progression_factor' parameter in audio_player_set_source() - Fixed a bug where players didn't loop when set to do so - Fixed a bug where wav sources would return 4 garbage samples at the start of playback, causing a glitch in the sound - Fixed a crash when default audio device could not be initialized - Fixed a bunch of bugs & woopsies - Updated audio_test.c - Misc - Deprecated Rangef stuff - added peek_random() - Updated #Contributions - Cleaned up memory barriers in concurrency.c and use volatile instead - Made hr fails output d3d11 debug messages before crash - Made temporary storage size runtime-configurable for new threads - Cleanup temporary storage after thread destroy - Added Header checking in growing array - Unfucked linmath alignment ## v0.01.002 - Flexible build options, Hotloading, growing array - Build system - We can now compile with: OOGABOOGA_HEADLESS: No window, graphics or audio OOGABOOGA_BUILD_SHARED_LIBRARY: Build oogabooga as a shared library (dll) OOGABOOGA_LINK_EXTERNAL_INSTANCE: Link to an external oogabooga global state instance - See oogabooga/examples/hotload for an example on how we can set up a project with hotloaded code - Misc - Better examples in custom_shader.c, & outlined circle - Z-Sorting in the renderer is now stable - Growing array - oogabooga/examples/growing_array_example.c ## v0.01.001 - Spacial audio, custom shading, scissor boxing - Audio - Implemented spacial audio playback Simply set player->position (it's in ndc space (-1 to 1), see audio_test.c) Save some computation with player->disable_spacialization = true - Added position overloads for play_one_clip play_one_audio_clip_source_at_position(source, pos) play_one_audio_clip_at_position(path, pos) - Implemented volume control with player->volume - Renderer - Implemented custom shading - Recompile shader with your extension to the pixel stage with shader_recompile_with_extension(source, cbuffer_size) - pass a buffer to the shader constant buffer at b0 with draw_frame.cbuffer = &my_cbuffer_data - pass userdata in the form of Vector4's define VERTEX_2D_USER_DATA_COUNT for the amount of Vertex4 userdata's to be part of each vertex. You can set the userdata in Draw_Quad->userdata which is a Vector4[VERTEX_2D_USER_DATA_COUNT]. See custom_shading.c example. - Added window scissor boxing (screen space) push_window_scissor(min, max); pop_window_scissor(); - Added draw_circle() and draw_circle_xform in drawing.c - Made an example for custom shading (oogabooga/examples/custom_shading.c) - Embed default shader into codebase & always compile - Added draw_line(p0, p1, width, color) - Implemented culling of quads out of view - Fixed culling bug where big rectangles that overlapped the screen but had all corners outside the screen would get culled. - Misc - Improved text measure and added a better explanation for it in font.c. - Added some useful Vector procedures: vx_length() vx_normalize() vx_average() vx_dot() vx_abs() vx_cross() - added os_get_file_size_from_Path() - Some simple restructuring of existing code - Made heap corruption detection more robust ## v0.01.000 - AUDIO! - Added audio sources - File stream sources & Fully decoded sources - 16-bit int & 32-bit float support - WAV & OGG support (in-house wav decoder, stb_vorbis for ogg) - Usage: bool audio_open_source_stream(*src, path, allocator) bool audio_open_source_load(*src, path, allocator) void audio_source_destroy(*src) - Added audio playback - The simple way: play_one_audio_clip_source(source); play_one_audio_clip(path); - With Audio_Player: audio_player_get_one(); audio_player_release(*player); audio_player_set_state(*player, state); audio_player_set_time_stamp(*player, time_in_seconds); audio_player_set_progression_factor(*player, factor); audio_player_get_time_stamp(*player); audio_player_get_current_progression_factor(*player); audio_player_set_source(*player, src, bool retain_progression_factor); audio_player_clear_source(*player); audio_player_set_looping(*player, bool looping); - Added some basic features in the audio system - Conversion & resampling between audio formats - Automatically detects new default device - Small fade in pause/play for less noise from sudden changes in playback buffer - Added a audio_test.c example - More OS procuedres - os_file_set_pos(file, pos) - os_file_get_pos(file) - os_file_get_size(file) - os_get_stack_trace(allocator) - Misc - Win32 audio impl - Link to more win32 junk - Make default logger thread safe - Rename tm_scope_cycles & tm_scope_cycles_xxx -> tm_scope & tm_scope_xxx - Minor cleanups - Fix Vector types align woopsies - Fix bug in heap allocator which caused internal heap corruption - Maybe fixed spinlocks with memory barriers? - Bunch of more asserts & better detection for heap allocation issues - lerpf, lerpi, smerpf, smerpi - Failed asserts now prints the stack trace. ## v0.00.005 - Z layers Renderer: - Added optional Z-sorting - Either set quad->z or call push_z_layer(s64) (and pop_z_layer()) - Enable with draw_frame.enable_z_sorting = true - Refactored the quad buffering to just be a growing quad buffer rather than a linked list of quad blocks. Your CPU will be thankful. - Fixed crashing when D3D11 DEBUG flag fails in ID3D11CreateDevice, and instead log a descriptive error then continue as usual Misc: - removed gfx_impl_legacy_opengl.c - Sorting procedures - merge_sort() - radix_sort() - sorting tests ## v0.00.004 - Custom logging, more concurrency & bugfixing Concurrency: - Refactored spinlock out of OS api (deprecated old procs) - Concurrency utilites: void spinlock_init(Spinlock *l); void spinlock_acquire_or_wait(Spinlock* l); bool spinlock_acquire_or_wait_timeout(Spinlock* l, f64 timeout_seconds); void spinlock_release(Spinlock* l); void mutex_init(Mutex *m); void mutex_destroy(Mutex *m); void mutex_acquire_or_wait(Mutex *m); void mutex_release(Mutex *m); void binary_semaphore_init(Binary_Semaphore *sem, bool initial_state); void binary_semaphore_destroy(Binary_Semaphore *sem); void binary_semaphore_wait(Binary_Semaphore *sem); void binary_semaphore_signal(Binary_Semaphore *sem); Macro MEMORY_BARRIER - Concurrency tests Docs: - custom_logger.c example to show how one can make a custom logger and have logs displayed in-game Utility: - draw_text_and_measure() which is just an overload of draw_text but it also does a measure and returns it Misc: - Added u64 thread_id to global context. This is set in main() for main thread and in thread startup when you dispatch a Thread - Fixed a bug where plain rects would be drawn with the incorrect color - Fixed a bug where quads from earlier frames would be drawn ## v0.00.003 - Fixes Random: - get_random_float64() - get_random_float32_in_range() - get_random_float64_in_range() - get_random_int_in_range() Third party: - Added 3 minimal libraries for audio decoding - dr_mp3.h: MP3 decoding - dr_wav.h: WAV decoding - stb_vorbis.c: OGG decoding - Made a global thread_local "third_party_allocator" which is set when third party libraries are used so all memory still goes through our *program_memory - Stripped all third party libraries of external dependencies (C headers) & noise Memory: - Improved assert messages to be more clear about what might be happening if they fail - Added more checks in debug to detect heap corruption and what not - Fixed a bug where the program would crash because a heap block was perfectly full Misc: - Fixed typos in examples/text_rendering.c - Fixed Y placement of window when changing the window rect - Fixed window sizing when setting scaled_width or scaled_height - Updated readme - Portable DEPRECATED macro - Deprecate os_compare_and_swap and replace with more portable compare_and_swap - Fixed a bug where the wrong image would be drawn ## v0.00.003 - Fixes Random: - get_random_float64() - get_random_float32_in_range() - get_random_float64_in_range() - get_random_int_in_range() Third party: - Added 3 minimal libraries for audio decoding - dr_mp3.h: MP3 decoding - dr_wav.h: WAV decoding - stb_vorbis.c: OGG decoding - Made a global thread_local "third_party_allocator" which is set when third party libraries are used so all memory still goes through our *program_memory - Stripped all third party libraries of external dependencies (C headers) & noise Memory: - Improved assert messages to be more clear about what might be happening if they fail - Added more checks in debug to detect heap corruption and what not - Fixed a bug where the program would crash because a heap block was perfectly full Misc: - Fixed typos in examples/text_rendering.c - Fixed Y placement of window when changing the window rect - Fixed window sizing when setting scaled_width or scaled_height - Updated readme - Portable DEPRECATED macro - Deprecate os_compare_and_swap and replace with more portable compare_and_swap - Fixed a bug where the wrong image would be drawn ## v0.00.002 - Text rendering, image manipulation, hash tables Renderer: - 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 Text/Fonts: - Added font loading with lazy initialization/rasterization when it's needed - Load & rasterize any fonts with load_font_from_disk() - Fonts automatically rasterize glyphs into atlases and generate metrics on the fly - Measure text for very_useful metrics with measure_text() - Walk over glyphs and their metrics with walk_glyphs() - Implemented simple but powerful text rendering - Draw text with draw_text() or draw_text_xform() - See oogabooga/examples/text_rendering.c for more Other: - Added 3 simple hash functions: - 64-bit xx_hash(): Very fast hash for 64-bit values - 64-bit city_hash(): Very fast hash for short strings - 64-bit djb2_hash(): Fast hash for strings longer than 32 bytes - Made a generic get_hash() macro to detect the type you are trying to hash and call the approriate procedure - Introduced a simple (kinda slow) hash table with following procedures: - hash_table_add - hash_table_find - hash_table_contains - hash_table_set See hash_table.c for more information. - 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 - Window now has scaled_width, scaled_height which is the DPI-scaled size. Previous window.width & window.height are now aliased as window.pixel_height and window.pixel_width for clarity - in minimal example, renamed hammer_xform -> rect_xform