Skip to content

glisy/uniform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GlisyUniform

Installation

$ clib install glisy/uniform --save

Usage

#include <glisy/uniform.h>
#include <glisy/color.h>
#include <glisy/math.h>

int
main (void) {
  GlisyColor color;
  GlisyUniform uColor;

  glisyColorInit(&color, "blue", 0);
  glisyUniformInit(&uColor, "uColor", GLISY_UNIFORM_VECTOR, 3);
  glisyUniformSet(&uColor, &vec3(color.r, color.g, color.b), sizeof(vec3));
  glisyUniformBind(&uColor, 0); // current bound program

  return 0;
}

License

MIT