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;

}

相关推荐
CApp3 小时前
GODOT引擎学习日志
学习·游戏引擎·godot
AgilityBaby13 小时前
UE5打包项目设置Project Settings(打包widows exe安装包)
c++·3d·ue5·游戏引擎·unreal engine
Magnum Lehar1 天前
vulkan游戏引擎的vulkan_utils实现
游戏引擎
Magnum Lehar1 天前
GameEngine游戏引擎前端界面wpf页面实现
前端·游戏引擎·wpf
AgilityBaby1 天前
UE5蓝图暴露变量,在游戏运行时修改变量实时变化、看向目标跟随目标Find Look at Rotation、修改玩家自身弹簧臂
笔记·游戏·ue5·游戏引擎·蓝图
一只鱼^_1 天前
用JS实现植物大战僵尸(前端作业)
javascript·css·vscode·游戏引擎·游戏程序·html5·动画
Magnum Lehar2 天前
vulkan游戏引擎的核心交换链swapchain实现
java·前端·游戏引擎
Magnum Lehar2 天前
vulkan游戏引擎game_types.h和生成build.bat实现
java·算法·游戏引擎
Magnum Lehar2 天前
vulkan游戏引擎的renderer_types实现
游戏引擎