Files
sunnypilot/selfdrive/common/glutil.h
Dean Lee 74dc639515 convert glutil.c to gltuil.cc & add class GLShader (#19720)
* c++ glutil

* function getUniformLocation

* rebase master
old-commit-hash: cef469cbed
2021-01-12 15:43:34 +01:00

21 lines
364 B
C++

#pragma once
#ifdef __APPLE__
#include <OpenGL/gl3.h>
#else
#include <GLES3/gl3.h>
#endif
#include <map>
class GLShader {
public:
GLShader(const char *vert_src, const char *frag_src);
~GLShader();
GLuint getUniformLocation(const char * name);
GLuint prog = 0;
private:
GLuint vert = 0, frag = 0;
std::map<const char*, GLint> uniform_loc_map;
};