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;

}

相关推荐
淡海水4 小时前
16-02-C#常用数据结构源码-附录B-源码索引速查
unity·c#·游戏引擎·il2cpp
速易达网络5 小时前
无人机远程操控仿真
游戏引擎·cocos2d
郝学胜-神的一滴6 小时前
游戏引擎原理与实践 02:揭开3A游戏背后的技术面纱
开发语言·计算机网络·程序人生·游戏·游戏引擎
警醒与鞭策14 小时前
【无标题】
android·unity·性能优化·游戏引擎·perforce
zhchyun200816 小时前
【Unity UI 进阶】仿 Element UI 打造企业级 Unity UI 组件库(10)
ui·unity·游戏引擎
地狱为王20 小时前
Unity使用NVIDIA的Audio2Face驱动口型
unity·游戏引擎
一线灵1 天前
跨平台游戏引擎 Axmol-2.11.5 发布
游戏引擎·lua
淡海水1 天前
16-01-C#数据结构源码-附录A-术语表
unity·c#·游戏引擎·il2cpp
淡海水1 天前
16-03-C#数据结构源码-附录C-参考资源
unity·c#·游戏引擎·il2cpp
天神哥哥啊1 天前
unity联调注意事项-安卓
android·unity·游戏引擎