feat: major engine overhaul - scene demo with lighting, sphere, ground

- Scene Demo: cube + sphere + ground plane with proper lighting
- Audio: XAudio2 dynamic loading + WAV playback
- Physics: expanded collision system
- Renderer: improved pipeline with materials
- UI: extended widget system
- VisualScript: enhanced serializer + block interactions
- ASM: optimized math/memory/profiling routines
- Window: mouse input + scroll support
This commit is contained in:
shuiyu1123 committed 2026-07-12 08:21:07 +08:00
1 parent 2653926d85
commit 0669d102ce
35 files changed
+1844 -314

No files matched your search

+6 -1
View File
@@ -9,7 +9,7 @@
#define UI_MAX_VERTICES 16384
#define UI_MAX_INDICES 32768
#define UI_MAX_WIDGETS 256
#define UI_MAX_WIDGETS 256
typedef struct {
float x, y;
@@ -31,6 +31,8 @@ typedef struct {
ID3D11InputLayout* input_layout;
ID3D11BlendState* blend_state;
ID3D11RasterizerState* rasterizer;
ID3D11ShaderResourceView* font_srv;
ID3D11SamplerState* font_sampler;
UIVertex vertices[UI_MAX_VERTICES];
uint32_t indices[UI_MAX_INDICES];
@@ -47,6 +49,8 @@ typedef struct {
uint32_t bg_color;
uint32_t border_color;
float padding;
float char_uvs[128][4];
} UI;
// 创建/销毁
@@ -61,6 +65,7 @@ void ui_render(UI* ui, ID3D11DeviceContext* ctx);
// 基础绘制
void ui_draw_rect(UI* ui, float x, float y, float w, float h, uint32_t color);
void ui_draw_rect_border(UI* ui, float x, float y, float w, float h, uint32_t fill, uint32_t border, float thickness);
void ui_draw_text(UI* ui, float x, float y, const char* text, uint32_t color);
// 控件
int ui_button(UI* ui, float x, float y, float w, float h, const char* text);