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;

}

相关推荐
枫景Maple7 小时前
Shader开发(六)什么是着色器
游戏引擎·着色器
向宇it9 小时前
【unity小技巧】封装unity适合2D3D进行鼠标射线检测,获取鼠标位置信息检测工具类
游戏·3d·unity·游戏引擎
年少无知且疯狂15 小时前
【Unity】实现小地图
unity·游戏引擎
AA陈超15 小时前
虚幻引擎5 GAS开发俯视角RPG游戏 #06-11:游戏后效果执行
c++·游戏·ue5·游戏引擎·虚幻
徐子竣19 小时前
[学习记录]Unity-Shader-常量缓冲区(CBUFFER)
学习·unity·游戏引擎
大飞pkz20 小时前
【Unity】Application类常见路径
unity·游戏引擎·游戏开发·application常用路径·数据路径·数据存储位置
向宇it20 小时前
【unity小技巧】封装一套 Unity 的植物生长系统
游戏·unity·c#·游戏引擎
死也不注释1 天前
【在Unity游戏开发中Dictionary、List介绍】
数据结构·游戏·unity·游戏引擎·list·游戏程序
沧海归城2 天前
Unity_XR控制手部动画
unity·游戏引擎·xr
惊鸿醉2 天前
⭐ Unity 异步加载PPT页面 并 首帧无卡顿显示
unity·游戏引擎·powerpoint