mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-28 18:12:05 +08:00
74dc639515
* c++ glutil * function getUniformLocation * rebase master old-commit-hash: cef469cbed1d835e70e952d06e1fd8b4eabca450
21 lines
364 B
C++
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;
|
|
};
|