/**
 * Copyright (c) 2021 Dominic Msters
 * 
 * This software is released under the MIT License.
 * https://opensource.org/licenses/MIT
 */

#pragma once
#include "../libs.h"

#define SHADER_UNI_VIEW "u_View"
#define SHADER_UNI_PROJ "u_Proj"
#define SHADER_UNI_TEXT "u_Text"
#define SHADER_UNI_MODL "u_Modl"

/** Representation of a shader uniform */
typedef GLuint shaderuniform_t;

/**
 * Structure containing information about an OpenGL Shader. For simplicity sake
 * we demand certain uninforms to be present on the shader target.
 */
typedef struct {
  /** Pointer to an uploaded vertex shader program */
  shaderuniform_t shaderVertex;

  /** Pointer to an uploaded fragment shader program */
  shaderuniform_t shaderFrag;

  /** Pointer to an uploaded shader program linked */
  shaderuniform_t shaderProgram;

  /** Matrix for the view matrix */
  shaderuniform_t uniView;

  /** Matrix for the projection matrix */
  shaderuniform_t uniProj;

  /** Uniform for the current texture */
  shaderuniform_t uniText;

  /** Uniform for the current model world position */
  shaderuniform_t uniModl;
} shader_t;