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.

18 lines
885 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. #pragma once
  2. #include "glew.h"
  3. #include <functional>
  4. GLuint CreateBufferObject(GLenum bufferType, GLsizeiptr size, GLenum usage, void* data = nullptr);
  5. GLuint CreateVAOWithVBOSettings(std::function<void()>settings);
  6. GLuint CreateFramebufferObject(GLuint &colorBuffer, GLuint &depthBuffer, int width, int height, GLuint *colorBuffer2 = nullptr);
  7. char* LoadFileContent(const char *path);
  8. GLuint CompileShader(GLenum shaderType, const char* shaderPath);
  9. GLuint CreateGPUProgram(const char* vsShaderPath, const char* fsShaderPath);
  10. GLuint CreateTextureFromBMP(const char* imagePath);
  11. GLuint CreateTextureFromFile(const char* imagePath);
  12. GLuint CreateTextureFromDds(const char* imagePath);
  13. void SaveImage(const char* imgPath, unsigned char* imgData, int width, int height);
  14. void CheckGLError(const char* file, int line);
  15. #define GL_CALL(x) do{x;CheckGLError(__FILE__,__LINE__);}while(0)