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;

}

相关推荐
孟无岐14 小时前
【Laya】Component 使用说明
typescript·游戏引擎·游戏程序·laya
weixin_4093831214 小时前
cocos shader三角流光
游戏引擎·cocos2d
Mars-xq16 小时前
godot 毛玻璃效果着色器shader
游戏引擎·godot·着色器
绀目澄清19 小时前
Unity 的AI Navigation 系统详细总结
人工智能·unity·游戏引擎
绀目澄清20 小时前
Unity3D AI Navigation 详解:从基础概念到实战应用
unity·游戏引擎
weixin_4093831221 小时前
cocos shader流光文字 不显示透明部分
游戏引擎·cocos2d
JIes__21 小时前
Unity(二)——3D数学
unity·游戏引擎
淡海水1 天前
【节点】[RandomRange节点]原理解析与实际应用
unity·游戏引擎·shadergraph·图形·randomrange
weixin_424294672 天前
在Unity中,摄像机移动时出现“残影”或“闪烁”是常见问题,主要原因和处理方法。
unity·游戏引擎
孟无岐2 天前
【Laya】Browser 使用说明
typescript·游戏引擎·游戏程序·laya