Browse Source

add types.h include

main
cinnaboot 5 years ago
parent
commit
f3e3de55c5
  1. 4
      src/asset.h
  2. 23
      src/main.cpp
  3. 24
      src/shader.h
  4. 8
      src/types.h

4
src/asset.h

@ -4,10 +4,8 @@
#include <GL/glew.h> #include <GL/glew.h>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include "types.h"
typedef uint8_t u8;
typedef int32_t i32;
typedef uint64_t u64;
//----------------- //-----------------
// Hashing // Hashing

23
src/main.cpp

@ -6,9 +6,32 @@
#include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/matrix_transform.hpp>
#include "asset.h" #include "asset.h"
#include "dumbLog.h"
#include "shader.h" #include "shader.h"
#include "types.h"
struct SDLHandles
{
SDL_Window* window;
SDL_GLContext sdl_gl_ctx;
SDL_DisplayMode display_mode;
};
struct RenderState
{
memory_arena* arena;
model_assets* assets;
texture_assets* textures;
transforms* xforms; // NOTE: would be part of camera in libTangerine
SDLHandles* handles;
GLContext* gl_ctx;
gl_mesh_array* gl_mesh_arr;
light_array lights;
};
mesh mesh
initCubeMesh() initCubeMesh()
{ {

24
src/shader.h

@ -5,8 +5,7 @@
#include <GL/glew.h> #include <GL/glew.h>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include "types.h"
typedef uint32_t u32;
// FIXME: won't need this enum when dynamic shader parsing is working // FIXME: won't need this enum when dynamic shader parsing is working
@ -129,27 +128,6 @@ struct light_array
point_light* lights; point_light* lights;
}; };
struct SDLHandles
{
SDL_Window* window;
SDL_GLContext sdl_gl_ctx;
SDL_DisplayMode display_mode;
};
struct RenderState
{
memory_arena* arena;
model_assets* assets;
texture_assets* textures;
transforms* xforms; // NOTE: would be part of camera in libTangerine
SDLHandles* handles;
GLContext* gl_ctx;
gl_mesh_array* gl_mesh_arr;
light_array lights;
};
struct node; struct node;
struct entity; struct entity;
struct animation; struct animation;

8
src/types.h

@ -0,0 +1,8 @@
#pragma once
typedef uint8_t u8;
typedef int32_t i32;
typedef uint32_t u32;
typedef uint64_t u64;
Loading…
Cancel
Save