openpilot is an open source driver assistance system. openpilot performs the functions of Automated Lane Centering and Adaptive Cruise Control for over 200 supported car makes and models.

22 lines
361 B

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