summaryrefslogtreecommitdiff
path: root/src/renderer/backends/opengl/backend_opengl.h
blob: 0ce765aab10fd7e9ccdc2af9da7a921df77ce351 (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
#pragma once

#ifdef CEL_REND_BACKEND_OPENGL

#include "defines.h"
#include "maths_types.h"

typedef struct gpu_swapchain {
  u32x2 dimensions;
} gpu_swapchain;
typedef struct gpu_device {} gpu_device;
typedef struct gpu_pipeline_layout { void* pad } gpu_pipeline_layout;
typedef struct gpu_pipeline {
  u32 shader_id;
  u32 pad;
} gpu_pipeline;
typedef struct gpu_renderpass { void* pad } gpu_renderpass;
typedef struct gpu_cmd_encoder { void* pad } gpu_cmd_encoder;  // Recording
typedef struct gpu_cmd_buffer { void* pad } gpu_cmd_buffer;    // Ready for submission

typedef struct gpu_buffer {
  union {
    u32 vbo;
    u32 ibo;
  } id;
  u32 pad;
} gpu_buffer;
typedef struct gpu_texture { void* pad } gpu_texture;


u32 shader_create_separate(const char *vert_shader, const char *frag_shader);

void uniform_vec3f(u32 program_id, const char *uniform_name, vec3 *value);
void uniform_f32(u32 program_id, const char *uniform_name, f32 value);
void uniform_i32(u32 program_id, const char *uniform_name, i32 value);
void uniform_mat4f(u32 program_id, const char *uniform_name, mat4 *value);
#endif