Reworking everything about shaders.

This commit is contained in:
2021-12-07 09:06:28 -08:00
parent 17b066e676
commit 3d8b67cca5
46 changed files with 264 additions and 170 deletions

View File

@ -0,0 +1,11 @@
# Copyright (c) 2021 Dominic Msters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
# Sources
# target_sources(${PROJECT_NAME}
# PRIVATE
# standardshader.c
# shaderui.c
# )

View File

@ -0,0 +1,12 @@
/**
* Copyright (c) 2021 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "shaderui.h"
void shaderUiInit(shaderprogram_t *program) {
}

View File

@ -0,0 +1,22 @@
/**
* Copyright (c) 2021 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "../shaderprogram.h"
#include "../texture.h"
typedef struct {
shaderprogram_t program;
texture_t texture;
shaderuniform_t uniProjection;
shaderuniform_t uniModel;
shaderuniform_t uniTexture;
shaderuniform_t uniColor;
} uishader_t;
void shaderUiInit(shaderprogram_t *program);

View File

@ -0,0 +1,11 @@
/**
* Copyright (c) 2021 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "standardshader.h"
void standardShaderInit(standardshader_t *stds, char *vert, char *frag) {
}

View File

@ -0,0 +1,28 @@
/**
* Copyright (c) 2021 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "../../libs.h"
#include "../shaderprogram.h"
#define STANDARD_SHADER_UNIFORM_NAME_VIEW "u_View"
#define STANDARD_SHADER_UNIFORM_NAME_PROJ "u_Proj"
#define STANDARD_SHADER_UNIFORM_NAME_TEXT "u_Text"
#define STANDARD_SHADER_UNIFORM_NAME_MODEL "u_Model"
#define STANDARD_SHADER_UNIFORM_NAME_COLOR "u_Color"
typedef struct {
shaderprogram_t shader;
shaderuniform_t uniformView;
shaderuniform_t uniformProjection;
shaderuniform_t uniformPosition;
shaderuniform_t uniformTexture;
shaderuniform_t uniformColor;
} standardshader_t;
void standardShaderInit(standardshader_t *stds, char *vert, char *frag);