MiMoEngine ASM: x86-64 MASM汇编+C混合架构游戏引擎
核心热路径(数学/内存/字符串/性能分析)用MASM汇编(SSE/AVX2) 外围系统(窗口/渲染/ECS/音频/UI/脚本)用C语言 含自研编辑器、VisualScript积木编程、中文渲染(glyph_atlas)
This commit is contained in:
commit
2d56cb3bc9
91 files changed
+9988
No files matched your search
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
#include "block_workspace.h"
|
||||
#include <d3d11.h>
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct BlockRenderer {
|
||||
ID3D11Device* device;
|
||||
ID3D11DeviceContext* context;
|
||||
ID3D11Buffer* vertex_buffer;
|
||||
ID3D11Buffer* index_buffer;
|
||||
ID3D11VertexShader* vertex_shader;
|
||||
ID3D11PixelShader* pixel_shader;
|
||||
ID3D11InputLayout* input_layout;
|
||||
|
||||
float* vertex_data;
|
||||
int vertex_count;
|
||||
int vertex_capacity;
|
||||
uint32_t* index_data;
|
||||
int index_count;
|
||||
int index_capacity;
|
||||
} BlockRenderer;
|
||||
|
||||
int block_renderer_init(BlockRenderer* renderer, void* device, void* context);
|
||||
void block_renderer_shutdown(BlockRenderer* renderer);
|
||||
void block_renderer_begin(BlockRenderer* renderer);
|
||||
void block_renderer_end(BlockRenderer* renderer);
|
||||
void block_renderer_draw_block(BlockRenderer* renderer, Block* block, float view_x, float view_y, float zoom);
|
||||
void block_renderer_draw_connection(BlockRenderer* renderer, BlockSlot* from, BlockSlot* to, float view_x, float view_y, float zoom);
|
||||
void block_renderer_draw_text(BlockRenderer* renderer, const char* text, float x, float y, float r, float g, float b);
|
||||
void block_renderer_add_quad(BlockRenderer* renderer, float x, float y, float w, float h, float r, float g, float b, float a);
|
||||
void block_renderer_add_line(BlockRenderer* renderer, float x1, float y1, float x2, float y2, float r, float g, float b, float a);
|
||||
Reference in new issue
Block a user