charcoal/OpenGLEngine/Sampler.h
elipzer ae7fcc9011 Starting Textured Scene
Want to use seperate textures and samplers for the scene to allow
for more modularization. Currently have created a texture class
and started creating a scene class.
2018-09-15 17:40:49 -04:00

48 lines
962 B
C++

#pragma once
#include "stdafx.h"
namespace charcoal
{
class Sampler
{
public:
enum MinFilter : GLenum
{
NEAREST = GL_NEAREST,
LINEAR = GL_LINEAR,
NEAREST_MIPMAP_NEAREST = GL_NEAREST_MIPMAP_NEAREST,
LINEAR_MIPMAP_NEAREST = GL_LINEAR_MIPMAP_NEAREST,
NEAREST_MIPMAP_LINEAR = GL_NEAREST_MIPMAP_LINEAR,
LINEAR_MIPMAP_LINEAR = GL_LINEAR_MIPMAP_LINEAR,
};
enum MagFilter : GLenum
{
NEAREST = GL_NEAREST,
LINEAR = GL_LINEAR,
};
enum Wrap : GLenum
{
CLAMP_TO_EDGE = GL_CLAMP_TO_EDGE,
MIRRORED_REPEAT = GL_MIRRORED_REPEAT,
REPEAT = GL_REPEAT,
};
/*
TODO:
GL_TEXTURE_BORDER_COLOR, GL_TEXTURE_MIN_LOD, GL_TEXTURE_MAX_LOD,
GL_TEXTURE_LOD_BIAS GL_TEXTURE_COMPARE_MODE, GL_TEXTURE_COMPARE_FUNC,
GL_TEXTURE_WRAP_R
*/
Sampler(Wrap wrap_s, Wrap wrap_t, MagFilter magnification_filter, MinFilter minification_filter);
~Sampler();
void bind(GLuint texture_unit);
private:
GLuint m_sampler = 0;
};
}