vulkan游戏引擎的resources,entry实现

1.resource_types.h

#pragma once

#include "math/math_types.h"

typedef struct texture

{

u32 id;

u32 width;

u32 height;

u8 channel_count;

b8 has_transparency;

u32 generation;

void* internal_data;

}texture;

2.entry.h

#include "core/application.h"

#include "core/logger.h"

#include "game_types.h"

//#include "core/kmemory.h"

extern b8 create_game(game* out_game);

int main(void)

{

game game_inst;

if(!create_game(&game_inst)){

KFATAL("Could not create game!");

return -1;

}

if(!application_create(&game_inst))

{

KINFO("Application failed to create!");

return 1;

}

//begin the game loop

if(!application_run()){

KINFO("Application did not shutdown gracefully\n");

return 2;

}

//application_config config;

// config.start_pos_x = 100;

// config.start_pos_y = 100;

//config.start_width = 1280;

//config.start_height = 720;

// config.name= "apophis engine testbed";

return 0;

}

相关推荐
jiayong2331 分钟前
虚幻引擎是什么?用来做什么?
游戏引擎·虚幻
易知微EasyV数据可视化1 小时前
Web+游戏引擎模式:设计的跨界协同最优解 | 数字孪生实战训练营·设计篇
前端·经验分享·游戏引擎·数字孪生·空间智能
拾忆丶夜9 小时前
unity webgl 阴影条纹问题
unity·游戏引擎·webgl
tealcwu19 小时前
【Unity实战】Unity IAP 4.x 在 Windows Store (UWP) 平台上的实现指南
windows·unity·游戏引擎
winlife_1 天前
让 AI 写敌人状态机,并用脚本化场景验证状态转换正确:funplay-unity-mcp 实战
人工智能·unity·游戏引擎·ai编程·状态机·mcp
tealcwu1 天前
【Unity实战】Unity IAP 5.3 中实现 Windows Custom Store 实战教程
windows·unity·游戏引擎
zhiSiBuYu05171 天前
Godot 游戏引擎新手从零开发指南
游戏引擎·godot
qq_205279052 天前
Unity 运行时候会时不时卡顿一下,哪怕是空场景
unity·游戏引擎
美团骑手阿豪2 天前
Unity UGUI自适应分辨率
unity·游戏引擎
winlife_2 天前
让 AI 跑通“调跳跃手感“的完整闭环:funplay-unity-mcp 实战案例
人工智能·unity·游戏引擎·ai编程·mcp·游戏手感