summaryrefslogtreecommitdiff
path: root/gfx/src/core/shader_program.h
blob: 1443663075ebe46737fd743d7c5370bd0ab2377f (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
#pragma once

#include <gfx/core.h>
#include <gfx/sizes.h>

#include "gl_util.h"

#include <math/fwd.h>

#include <stdbool.h>

typedef struct Texture Texture;

typedef struct ShaderProgram {
  GLuint        id;
  ShaderUniform uniforms[GFX_MAX_UNIFORMS_PER_SHADER];
  int           num_uniforms;
} ShaderProgram;

/// Create a new shader program.
bool gfx_build_shader_program(ShaderProgram*, const ShaderProgramDesc*);

/// Destroy the shader program.
void gfx_del_shader_program(ShaderProgram*);