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;

}

相关推荐
wgslucky7 小时前
Godot GDScript初学者遇到的问题记录
游戏引擎·godot
点心的游戏开发世界9 小时前
GDScript 入门笔记(五):函数
笔记·游戏引擎·godot
谢斯12 小时前
[unity]如何在unity中添加newtonsoft-json
unity·json·游戏引擎
云雨巫山16 小时前
Unity 游戏开发性能优化全景手册
unity·智能手机·性能优化·游戏引擎
学习星球16 小时前
AI 原生游戏开发:Godot 4 + AI Agent 全栈指南(Ziva 3 / Godot MCP 深度实战)
人工智能·游戏引擎·godot
云雨巫山16 小时前
Unity 性能优化 · 图解全景手册
unity·性能优化·游戏引擎
点心的游戏开发世界2 天前
GDScript 入门笔记(二):变量与数据类型
笔记·游戏引擎·godot
郝学胜-神的一滴3 天前
CMake 047:解锁安装阶段自定义操作,告别配置阶段提前执行坑
运维·服务器·c++·游戏引擎·图形渲染·opengl
微三云生态系统架构师-彭丹4 天前
任务卷轴积分系统架构设计:从任务状态机到合规风控的完整实现
unity·系统架构·游戏引擎
XR技术研习社4 天前
从 PICO 文档看未来短期内的 Unity 版本选择
unity·游戏引擎·xr·vr