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%

相关推荐
voidmort12 小时前
3. 微调(Fine-tuning)与强化学习(RL)的核心思想
python·深度学习·算法
金銀銅鐵12 小时前
[Java] 如何理解 class 文件中方法的 descriptor?
java·后端
云烟成雨TD12 小时前
Spring AI Alibaba 1.x 系列【63】AI Agent 长期记忆
java·人工智能·spring
憧憬成为java架构高手的小白12 小时前
苍穹外卖--day09
java·spring boot·百度
学代码的真由酱12 小时前
Java多用户一对一网页聊天室-测试报告
java·开发语言·功能测试·测试
人道领域12 小时前
【LeetCode刷题日记】669.修剪二叉搜索树
开发语言·python·算法
Jasonakeke13 小时前
SpringBoot自动配置原理揭秘
java·spring boot·后端
QiLinkOS13 小时前
【从实验室到商业战场:发明专利如何重塑科技与企业的共生生态】
大数据·c语言·数据结构·c++·人工智能·单片机·算法
2301_8035389513 小时前
Java读取Word图片的两种实用方法
java·开发语言·word
mxwin14 小时前
Unity URP下新技术MSSPT 取代SSR和光线追踪
unity·游戏引擎·shader