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;

}

相关推荐
南無忘码至尊3 小时前
Unity学习90天-第1天-认识Transform + 坐标系
学习·unity·游戏引擎
南無忘码至尊4 小时前
Unity学习90天-第1天-认识Unity并书写我们的第一个脚本
学习·unity·游戏引擎
风酥糖4 小时前
Godot游戏练习01-第26节-轮次结束后弹出升级选项
游戏·游戏引擎·godot
雪域迷影5 小时前
Hazel游戏引擎结构分析
c++·游戏引擎·hazel
weixin_4093831213 小时前
godot创建两种敌人僵尸 一种吐舌头 一种在角色脚下生成圆形伤害圈 两种僵尸均继承enemy脚本 理解继承
游戏引擎·godot
mxwin20 小时前
Unity Shader 跨平台兼容性:处理纹理坐标翻转与精度差异
unity·游戏引擎
王家视频教程图书馆20 小时前
godot 下载地址
游戏引擎·godot
small-pudding1 天前
Unity URP + Compute Shader 路径追踪器实战:从可用到可优化
unity·游戏引擎
weixin_423995001 天前
unity 物体转向鼠标点击方向2d和3d
unity·计算机外设·游戏引擎
mxwin1 天前
Unity URP 下 Shader 变体 (Variants):multi_compile 与 shader_feature的关键字管理及变体爆炸防控策略
unity·游戏引擎