aboutsummaryrefslogtreecommitdiff
path: root/src/core/shader_program.h
blob: 521118d6b3babfb25885809bfd67aafc7aa8acb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once

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

#include "gl_util.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*);