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 天前
基于OpenGL封装摄像机类:视图矩阵与透视矩阵的实现
c++·qt·线性代数·矩阵·游戏引擎·图形渲染
EQ-雪梨蛋花汤1 天前
【Unity笔记】Unity 编辑器扩展:打造一个可切换 Config.assets 的顶部菜单插件
unity·编辑器·游戏引擎
极客柒2 天前
Unity 塔防自用可视化路点寻路编辑器
unity·编辑器·游戏引擎
一线灵3 天前
跨平台游戏引擎 Axmol-2.8.1 发布
junit·游戏引擎
王家视频教程图书馆3 天前
2025年最新 unityHub游戏引擎开发2d手机游戏和桌面游戏教程
游戏·unity·游戏引擎
Xeon_CC5 天前
Unity中,软遮罩SoftMaskForUGUI的使用
unity·游戏引擎
DanmF--5 天前
NGUI--三大基础组件
unity·游戏引擎
Xeon_CC5 天前
Unity中,软遮罩SoftMaskForUGUI可移动遮罩形状实现方法
unity·游戏引擎
Yasin Chen5 天前
Unity Standard Shader 解析(五)之ShadowCaster
unity·游戏引擎
我想_iwant5 天前
android集成unity后动态导入 assetsBundle
android·unity·游戏引擎