blob: 2c059e7e6e0cacc3d65a56da09a0a61c8a2e08db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
#pragma once
// -- internal --
// public
#include "rodeo_config.h"
#include "rodeo_types.h"
// -- system --
#if __EMSCRIPTEN__
#include <emscripten/emscripten.h>
#endif
#include "SDL2/SDL.h"
#include "SDL2/SDL_syswm.h"
#include "bgfx/c99/bgfx.h"
typedef struct
{
SDL_Window* window;
SDL_Surface* screen_surface;
SDL_SysWMinfo wmi;
int screen_width;
int screen_height;
SDL_Event sdl_event;
bool quit;
bgfx_vertex_layout_t vertex_layout;
bgfx_dynamic_vertex_buffer_handle_t vertex_buffer_handle;
bgfx_dynamic_index_buffer_handle_t index_buffer_handle;
rodeo_vertex_t batched_vertices[mrodeo_vertex_size_max];
uint16_t vertex_size;
uint16_t index_count;
uint16_t index_size;
uint16_t batched_indices[(mrodeo_vertex_size_max / 4) * 6];
rodeo_texture_2d_t default_texture;
bgfx_texture_handle_t *active_texture_p;
bgfx_shader_handle_t vertex_shader;
bgfx_shader_handle_t fragment_shader;
bgfx_program_handle_t program_shader;
bgfx_uniform_handle_t texture_uniforms[2];
uint64_t frame_count;
uint64_t start_frame;
uint64_t end_frame;
float frame_time;
uint32_t frame_limit;
}
irodeo_state_t;
struct
irodeo_texture_internal_t
{
bgfx_texture_handle_t texture_bgfx;
//bgfx_uniform_handle_t sampler_bgfx;
};
|