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;

}

相关推荐
心疼你的一切1 天前
使用Unity引擎开发Rokid主机应用的全面配置交互操作
学习·游戏·unity·c#·游戏引擎·交互
qq_428639612 天前
虚幻基础:角色受击
游戏引擎·虚幻
maki0772 天前
虚幻版Pico大空间VR入门教程 05 —— 原点坐标和项目优化技巧整理
android·游戏引擎·vr·虚幻·pico·htc vive·大空间
一线灵2 天前
跨平台游戏引擎 Axmol-2.9.0 发布
游戏引擎
maki0772 天前
VR大空间资料 01 —— 常用VR框架对比
android·ue5·游戏引擎·vr·虚幻·pico
maki0773 天前
VR大空间资料 02 —— 常用Body IK对比
android·游戏引擎·vr·虚幻·pico·ik
雪下的新火3 天前
爆炸特效-Unity-04-shader&粒子系统
经验分享·笔记·unity·游戏引擎·shader·粒子系统
Predestination王瀞潞3 天前
UE4报错:无法编译项目
游戏引擎·虚幻·解决方案
大Mod_abfun3 天前
Unity游戏基础-2(初识场景~项目构建)
游戏·unity·游戏引擎
maki0774 天前
虚幻版Pico大空间VR入门教程 04 —— PicoOpenXR和PicoXR插件对于PDC串流、SteamVR串流、OpenXR串流对比 和 手势追踪对比
游戏引擎·vr·虚幻·pico·手势追踪·串流