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.

21 lines
482 B

4 years ago
  1. #pragma once
  2. #include "glew.h"
  3. #include <stack>
  4. #include <map>
  5. #include <string>
  6. class GPUProgram
  7. {
  8. public:
  9. //member
  10. GLuint mProgram;//gpu resource id
  11. std::stack<GLuint> mAttachedShaders;
  12. std::map<std::string, GLint> mLocations;
  13. public:
  14. GPUProgram();
  15. ~GPUProgram();
  16. void DetectAttribute(const char*attributeName);
  17. void DetectUniform(const char*uniformName);
  18. GLint GetLocation(const char*name);
  19. void AttachShader(GLenum shaderType, const char*shaderPath);
  20. void Link();
  21. };