Changed function signatures to remove const qualifiers

Changed several function signatures across multiple files to remove the `const` qualifier from parameters of type `vec3s` for improved flexibility.
Changed `material_collection_create` to `material_collection_init` for better initialization handling.
Changed `scene_create` to `scene_init` to return a boolean indicating success or failure.
Changed `render_target_create` to `render_target_init` for consistent initialization practices.
Changed `window_create` to remove `const` from its parameters for consistency.
Changed `evaluate_bsdf_directional` and `evaluate_bsdf_const_sky` to remove `const` from their parameters.
Changed `sample_bsdf_simple_lit` and `sample_bsdf_pdf_simple_lit` to remove `const` from the `normal` parameter.
Changed `scene_render` to take a pointer to `render_target_t` instead of returning it directly.
Updated `main.c` to reflect new initialization functions for better memory management.
This commit is contained in:
2025-04-18 10:51:46 +09:00
parent bfc94f0008
commit 1162575545
27 changed files with 231 additions and 166 deletions

View File

@@ -2,21 +2,21 @@
#define WINDOW_H
#include "Common.h"
#include <windows.h>
#include <stdint.h>
#include <windows.h>
// TODO: This is just a temporary solution. We may move to C# Windows SDK for easier GUI handling in the future.
static HWND hwnd;
static HDC hdc_mem;
static HDC hdc_mem;
static HBITMAP bitmap;
static BITMAPINFO bitmap_info;
static int window_width;
static int window_height;
static unsigned char* pixel_buffer;
int window_create(const char* title, HINSTANCE hInst, const int width, const int height);
void window_update_pixels(const vec4s color, const int pixel_x, const int pixel_y);
void window_refresh_region(const int pixel_x, const int pixel_y, const int region_width, const int region_height);
int window_create(const char* title, HINSTANCE hInst, int width, int height);
void window_update_pixels(vec4s color, int pixel_x, int pixel_y);
void window_refresh_region(int pixel_x, int pixel_y, int region_width, int region_height);
#endif // WINDOW_H