vulkan游戏引擎game_types.h和生成build.bat实现

1.game_types.h

#pragma once

#include "core/application.h"

typedef struct game{

application_config app_config;

b8 (*initialize)(struct game* game_inst);

b8 (*update)(struct game* game_inst,f32 delta_time);

b8 (*render)(struct game* game_inst,f32 delta_time);

void (*on_resize)(struct game* game_inst,u32 width,u32 height);

void* state;

//Application state

void* application_state;

}game;

2.build.bat

REM Build script for engine

@ECHO OFF

SetLocal EnableDelayedExpansion

REM Get a list of all the .c files

SET cFilenames=

FOR /R %%f in (*c) do (

SET cFilenames=!cFilenames! %%f

)

REM echo "Files:" %cFilenames%

SET assembly=engine

SET compilerFlags=-g -shared -Wvarargs -Wall -Werror

REM -Wall -Werror

SET includeFlags=-Isrc -I%VULKAN_SDK%/Include

SET linkerFlags=-luser32 -lvulkan-1 -L%VULKAN_SDK%/Lib

SET defines=-D_DEBUG -DKEXPORT -D_CRT_SECURE_NO_WARNINGS

ECHO "Building %assembly%%..."

clang %cFilenames% %compilerFlags% -o ../bin/%assembly%.dll %defines% %includeFlags% %linkerFlags%

相关推荐
鬼手点金4 分钟前
opencode-crawl4ai使用建议
java·开发语言·人工智能·python·机器学习
longlongzihan7 分钟前
LeetCode 76. 最小覆盖子串:滑动窗口算法详解
算法·leetcode·滑动窗口
专业程序开发源18 分钟前
springboot校园志愿者管理系统28562-计算机课程设计、毕业设计
java·spring boot·后端·python·django·php·课程设计
thefool11226622 分钟前
多线程 2
java
怕浪猫9 小时前
RAG 面试 6 连问,从原理到优化全部覆盖
python·算法·面试
无线通信科研笔记9 小时前
IEEE TVT 2026 论文精读与完整复现|相位误差如何重塑近场 RIS 的幅相响应
论文阅读·人工智能·python·算法·论文笔记
daidaidaiyu10 小时前
ThingsBoard 集群的核心逻辑源码分析
java
mmmmath_310 小时前
二叉树の递归遍历
算法
All for pursuit.11 小时前
【位运算-1】338.比特位计数
数据结构·c++·算法·leetcode
我可能是个假开发11 小时前
FTP Unicode 文件名导致 `550` 的问题分析与解决方案
java·开发语言·spring