2023-03-12 16:24:48 +01:00
|
|
|
// "Copyright [2023] <Krzysztof Rudnicki>"
|
2023-03-05 18:14:43 +01:00
|
|
|
#ifndef TEXTURES_HPP
|
|
|
|
|
#define TEXTURES_HPP
|
2023-03-05 20:02:41 +01:00
|
|
|
#include <iostream>
|
2023-03-05 18:14:43 +01:00
|
|
|
#include <glad/glad.h>
|
|
|
|
|
#include <GLFW/glfw3.h>
|
|
|
|
|
|
|
|
|
|
void setTextureParametersINT(const GLenum textureTarget = GL_TEXTURE_2D, const GLint sCoordinateOption = GL_REPEAT, const GLint tCoordinateOption = GL_REPEAT, const GLint rCoordinateOption = GL_REPEAT, const float* borderColor = NULL);
|
|
|
|
|
void setTextureSCoordinate(const GLenum textureTarget = GL_TEXTURE_2D, const GLint sCoordinateOption = GL_REPEAT, const float* borderColor = NULL);
|
|
|
|
|
void setTextureTCoordinate(const GLenum textureTarget = GL_TEXTURE_2D, const GLint tCoordinateOption = GL_REPEAT, const float* borderColor = NULL);
|
|
|
|
|
void setTextureRCoordinate(const GLenum textureTarget = GL_TEXTURE_3D, const GLint rCoordinateOption = GL_REPEAT, const float* borderColor = NULL);
|
|
|
|
|
void setTextureFilteringAndMipMap(const GLenum textureTarget = GL_TEXTURE_2D, const GLenum filterType = GL_TEXTURE_MAG_FILTER, const GLint textureFilteringMethod = GL_NEAREST, const GLint mipMapFilteringMethod = GL_NEAREST_MIPMAP_NEAREST);
|
2023-03-11 19:08:15 +01:00
|
|
|
unsigned int generateAndBindTexture(const GLenum textureTarget);
|
2023-03-05 18:14:43 +01:00
|
|
|
|
2023-03-11 19:08:15 +01:00
|
|
|
// const char* texturePath, int textureWidth, int textureHeight, int colorChannels, const GLenum textureTarget, const GLint sCoordinateOption, const GLint tCoordinateOption, const GLint rCoordinateOption, const float* borderColor
|
2023-03-12 16:24:48 +01:00
|
|
|
unsigned int loadAndCreateTexture(const char* texturePath, bool flipImage);
|
2023-03-11 20:06:42 +01:00
|
|
|
void activateAndBindTextures(unsigned int texture, GLenum textureNumber);
|
2023-03-12 16:24:48 +01:00
|
|
|
unsigned int loadAndBindTextureFile(unsigned int texture, const char* texturePath, bool flipImage);
|
2023-03-11 19:08:15 +01:00
|
|
|
|
2023-03-05 18:14:43 +01:00
|
|
|
#endif // TEXTURES_HPP
|