added CPU uniform location lookup optimization
This commit is contained in:
parent
4101006b5e
commit
a7ebf0ddc3
5 changed files with 48 additions and 28490 deletions
|
|
@ -1,22 +1,21 @@
|
|||
#pragma once
|
||||
|
||||
#include "../defines.hpp"
|
||||
|
||||
struct SQuad {
|
||||
GLuint program;
|
||||
GLint proj;
|
||||
GLint color;
|
||||
GLint posAttrib;
|
||||
GLint texAttrib;
|
||||
};
|
||||
#include <unordered_map>
|
||||
|
||||
class CShader {
|
||||
public:
|
||||
GLuint program;
|
||||
GLint proj;
|
||||
GLint color;
|
||||
GLint tex;
|
||||
GLint alpha;
|
||||
GLint posAttrib;
|
||||
GLint texAttrib;
|
||||
GLint discardOpaque;
|
||||
|
||||
GLint getUniformLocation(const std::string&);
|
||||
|
||||
private:
|
||||
std::unordered_map<std::string, GLint> m_muUniforms;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue