Files
SimpleRayTracing/header/Window.h
Misaki 17872804c5 Update project files and enhance rendering system
Added:
- Updated `.gitignore` to ignore the `[Bb]uild/` directory.
- Additional tasks added to the roadmap in `README.md` for light unit standardization and GPU backend support.

Changed:
- Removed line in `settings.json` that disabled error squiggles for C/C++ code.
- Modified `Triangle.h` to include `material_id` in `triangle_t` and reorganized properties.
- Reordered parameters in `triangle_collection_init` for clarity.
- Updated `shading_context_t` in `Material.h` and added size parameter to `material_create`.
- Streamlined initialization in `scene_init` and updated `scene_free` for proper resource management.
- Updated `window_create` in `Window.h` to accept a `render_job_t` parameter.
- Introduced `renderer_start` in `Renderer.c` to handle rendering jobs and optimized pixel rendering logic.
2025-04-23 22:24:02 +09:00

28 lines
795 B
C

#ifndef WINDOW_H
#define WINDOW_H
#include "Common.h"
#include "Rendering/Renderer.h"
#include <stdint.h>
#include <windows.h>
#define WM_USER_TILE_DONE (WM_USER + 1)
// 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 HANDLE render_thread;
static HDC hdc_mem;
static HBITMAP bitmap;
static BITMAPINFO bitmap_info;
static int window_width;
static int window_height;
static unsigned char* pixel_buffer;
bool window_create(const char* title, HINSTANCE hInst, int width, int height, render_job_t* render_job);
void window_update_pixel(vec4s color, int pixel_x, int pixel_y);
void window_refresh_region(int pixel_x, int pixel_y, int region_width, int region_height);
void window_close();
#endif // WINDOW_H