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%

相关推荐
maki0771 小时前
VR大空间资料 01 —— 常用VR框架对比
android·ue5·游戏引擎·vr·虚幻·pico
啊我不会诶1 小时前
24ICPC成都站补题
数据结构·算法
代码萌新知2 小时前
设计模式学习(五)装饰者模式、桥接模式、外观模式
java·学习·设计模式·桥接模式·装饰器模式·外观模式
2401_841495644 小时前
【计算机视觉】基于数学形态学的保留边缘图像去噪
人工智能·python·算法·计算机视觉·图像去噪·数学形态学·边缘保留
十八岁讨厌编程4 小时前
【算法训练营Day30】动态规划part6
算法·动态规划
iナナ4 小时前
Spring Web MVC入门
java·前端·网络·后端·spring·mvc
驱动探索者4 小时前
find 命令使用介绍
java·linux·运维·服务器·前端·学习·microsoft
卷Java5 小时前
违规通知功能修改说明
java·数据库·微信小程序·uni-app
CoderYanger5 小时前
优选算法-双指针:2.复写零
java·后端·算法·leetcode·职场和发展
小雨凉如水5 小时前
k8s学习-pod的生命周期
java·学习·kubernetes