19 struct GPUSamplerDescriptor;
26 template<auto F,
typename T, auto P>
inline auto parameter() {
27 return +[](
GLuint id,
T value)
constexpr {
return (*
F)(id,
P, value); };
#define GL_TEXTURE_MAX_ANISOTROPY_EXT
Definition GLLoader.hpp:6663
#define GL_TEXTURE_COMPARE_FUNC
Definition GLLoader.hpp:1477
#define GL_TEXTURE_MIN_FILTER
Definition GLLoader.hpp:966
#define GL_TEXTURE_BORDER_COLOR
Definition GLLoader.hpp:907
#define GL_TEXTURE_WRAP_R
Definition GLLoader.hpp:1338
#define GL_TEXTURE_WRAP_S
Definition GLLoader.hpp:967
float GLfloat
Definition GLLoader.hpp:735
#define GL_TEXTURE_LOD_BIAS
Definition GLLoader.hpp:1472
#define glTextureParameterfv
Definition GLLoader.hpp:9593
unsigned int GLenum
Definition GLLoader.hpp:723
unsigned int GLuint
Definition GLLoader.hpp:733
#define GL_TEXTURE_MAX_LOD
Definition GLLoader.hpp:1353
#define GL_TEXTURE_WRAP_T
Definition GLLoader.hpp:968
#define GL_TEXTURE_MAG_FILTER
Definition GLLoader.hpp:965
#define glTextureParameterf
Definition GLLoader.hpp:9589
#define glTextureParameteri
Definition GLLoader.hpp:9597
#define GL_TEXTURE_MIN_LOD
Definition GLLoader.hpp:1352
#define GL_TEXTURE_COMPARE_MODE
Definition GLLoader.hpp:1476
A retain-release type of smart pointer.
Definition SmartPtr.hpp:132
Definition OpenGL.hpp:117
Definition GLImage.hpp:66
GLImage(GLDevicePtr device, const GPUImageDescriptor &descriptor)
GPUImageViewPtr createView(const GPUImageViewDescriptor &descriptor) final
GLuint handle() const
Definition GLImage.hpp:91
GLImageState objectState
The OpenGL image state cache.
Definition GLImage.hpp:72
GLObjectHandle<&glad_glGenTextures, &glad_glDeleteTextures > textureID
The OpenGL device image.
Definition GLImage.hpp:69
GPUImageType type() const
Definition GLImage.hpp:87
void updateState(const GPUSamplerDescriptor &samplerDescriptor)
Update the image with the given sampler descriptor.
GPUImageDescriptor mDescriptor
The image descriptor.
Definition GLImage.hpp:75
GPUDevice & device
The owning device this object was created from.
Definition Common.hpp:55
Definition GPUImage.hpp:331
const Descriptor & descriptor
A structure that describes the object and it's properties.
Definition Common.hpp:69
Definition Application.hpp:19
GPUImageType
Definition GPUImage.hpp:36
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
A helper class that tracks the image state.
Definition GLImage.hpp:25
GLObjectState< GLuint, void(const GLfloat *)> borderColor
Definition GLImage.hpp:45
GLObjectState< GLuint, void(GLfloat)> maxLOD
Definition GLImage.hpp:39
GLObjectState< GLuint, void(GLenum)> wrapS
Definition GLImage.hpp:30
GLObjectState< GLuint, void(GLenum)> wrapR
Definition GLImage.hpp:32
GLObjectState< GLuint, void(GLenum)> magFilter
Definition GLImage.hpp:35
auto parameter()
Definition GLImage.hpp:26
GLObjectState< GLuint, void(GLenum)> compareFunc
Definition GLImage.hpp:43
GLObjectState< GLuint, void(GLfloat)> minLOD
Definition GLImage.hpp:38
GLImageState(const GLuint image)
Definition GLImage.hpp:47
GLObjectState< GLuint, void(GLenum)> compareMode
Definition GLImage.hpp:42
GLObjectState< GLuint, void(GLfloat)> lodBias
Definition GLImage.hpp:40
GLObjectState< GLuint, void(GLfloat)> maxAnisotropy
Definition GLImage.hpp:36
GLObjectState< GLuint, void(GLenum)> minFilter
Definition GLImage.hpp:34
GLObjectState< GLuint, void(GLenum)> wrapT
Definition GLImage.hpp:31
Definition OpenGL.hpp:130
Definition GLStateManager.hpp:287
Definition GPUImage.hpp:247
GPUImageType type
Hardware image type. By default ImageType::Image2D.
Definition GPUImage.hpp:250
Image view descriptor structure.
Definition GPUImage.hpp:482
Image sampler descriptor structure.
Definition GPUSampler.hpp:61