You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
548 B
20 lines
548 B
#pragma once
|
|
#include "ggl.h"
|
|
struct UniformTexture {
|
|
GLint mLocation;
|
|
GLuint mTexture;
|
|
UniformTexture() {
|
|
mLocation = -1;
|
|
mTexture = 0;
|
|
}
|
|
};
|
|
class Shader {
|
|
public:
|
|
GLuint mProgram;
|
|
std::map<std::string, UniformTexture*> mUniformTextures;
|
|
GLint mModelMatrixLocation, mViewMatrixLocation, mProjectionMatrixLocation;
|
|
GLint mPositionLocation, mColorLocation, mTexcoordLocation, mNormalLocation;
|
|
void Init(const char*vs, const char*fs);
|
|
void Bind(float *M, float *V, float*P);
|
|
void SetTexture(const char * name, const char*imagePath);
|
|
};
|