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%

相关推荐
何以解忧,唯有..11 小时前
Redis 过期事件监听:原理与实战
java
weixin_3077791311 小时前
C++代码实现MATLAB中的ode45函数功能
开发语言·c++·算法·matlab
风中的小熊生气12 小时前
Spring Boot 面试知识(二):分层、IoC、异常、配置与 Redis
java·springboot
泡茶喝茶写代码12 小时前
量化数据开发实战系列(第 25 篇):基金基础接口实战:基金列表、ETF-LOF 分类、基金概况、净值数据
java·数据库·人工智能·python·mysql
不穿鞋的懒羊羊12 小时前
dfs深度优先搜索
算法
OYYHXPJR12 小时前
【算法】区间重叠模板和矩形重叠模板
算法
shehuiyuelaiyuehao12 小时前
算法46,分治快排,排序数组
java·算法·排序算法·排序
野生技术架构师12 小时前
1200 道 JAVA 面试题(各大企业常见面试题及答案)
java·开发语言
careathers12 小时前
【数据结构】栈
java·数据结构
远航计算机13 小时前
GEO 选题从哪来?用一份 Query 词库把一年内容排出来
大数据·人工智能·算法·aigc