fix: .gitignore + add 44 language JSON files
This commit is contained in:
1 parent
e8fd68e27b
commit
8de545dd2c
227 files changed
+22603
No files matched your search
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
// ============================================================================
|
||||
// mesh.h - 网格 (顶点缓冲 + 索引缓冲)
|
||||
// ============================================================================
|
||||
|
||||
#include <d3d11.h>
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct {
|
||||
ID3D11Buffer* vertex_buffer;
|
||||
ID3D11Buffer* index_buffer;
|
||||
uint32_t vertex_count;
|
||||
uint32_t index_count;
|
||||
uint32_t vertex_stride;
|
||||
} MeshBuffer;
|
||||
|
||||
// 从内存数据创建网格
|
||||
MeshBuffer* mesh_create(ID3D11Device* device,
|
||||
const void* vertices, uint32_t vertex_count, uint32_t vertex_stride,
|
||||
const uint32_t* indices, uint32_t index_count);
|
||||
|
||||
// 从 OBJ 文件加载网格 (简化版: 仅顶点+面)
|
||||
MeshBuffer* mesh_load_obj(ID3D11Device* device, const char* filepath);
|
||||
|
||||
// 销毁
|
||||
void mesh_destroy(MeshBuffer* mesh);
|
||||
|
||||
// 绘制
|
||||
void mesh_draw(ID3D11DeviceContext* ctx, MeshBuffer* mesh);
|
||||
@@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
#include <d3d11.h>
|
||||
|
||||
typedef struct {
|
||||
ID3D11Texture2D* texture;
|
||||
ID3D11ShaderResourceView* srv;
|
||||
uint32_t width, height;
|
||||
} Texture;
|
||||
|
||||
Texture* texture_load_bmp(ID3D11Device* dev, const char* path);
|
||||
Texture* texture_create_white(ID3D11Device* dev, uint32_t w, uint32_t h);
|
||||
void texture_destroy(Texture* tex);
|
||||
Reference in new issue
Block a user