13 #ifndef OGLPLUS_TEXTURE_HANDLE_1309262134_HPP
14 #define OGLPLUS_TEXTURE_HANDLE_1309262134_HPP
26 #if OGLPLUS_DOCUMENTATION_ONLY || GL_ARB_bindless_texture
37 : _handle(OGLPLUS_GLFUNC(GetTextureHandleARB)(
GetGLName(texture)))
39 OGLPLUS_CHECK_SIMPLE(GetTextureHandleARB);
44 : _handle(OGLPLUS_GLFUNC(GetTextureSamplerHandleARB)(
49 OGLPLUS_CHECK_SIMPLE(GetTextureSamplerHandleARB);
55 OGLPLUS_GLFUNC(MakeTextureHandleResidentARB)(_handle);
56 OGLPLUS_CHECK_SIMPLE(MakeTextureHandleResidentARB);
62 OGLPLUS_GLFUNC(MakeTextureHandleNonResidentARB)(_handle);
63 OGLPLUS_CHECK_SIMPLE(MakeTextureHandleNonResidentARB);
70 OGLPLUS_GLFUNC(IsTextureHandleResidentARB)(_handle);
71 OGLPLUS_VERIFY_SIMPLE(IsTextureHandleResidentARB);
72 return result == GL_TRUE;
83 struct AdjustProgVar<TextureHandle>
85 typedef GLuint64 BaseType;
86 typedef TextureHandle ValueType;
88 inline static BaseType Adjust(ValueType value)
108 ): _handle(OGLPLUS_GLFUNC(GetImageHandleARB)(
111 layered?GL_TRUE:GL_FALSE,
116 OGLPLUS_CHECK_SIMPLE(GetImageHandleARB);
122 OGLPLUS_GLFUNC(MakeImageHandleResidentARB)(
126 OGLPLUS_CHECK_SIMPLE(MakeImageHandleResidentARB);
132 OGLPLUS_GLFUNC(MakeImageHandleNonResidentARB)(_handle);
133 OGLPLUS_CHECK_SIMPLE(MakeImageHandleNonResidentARB);
140 OGLPLUS_GLFUNC(IsImageHandleResidentARB)(_handle);
141 OGLPLUS_VERIFY_SIMPLE(IsImageHandleResidentARB);
142 return result == GL_TRUE;
153 struct AdjustProgVar<ImageHandle>
155 typedef GLuint64 BaseType;
156 typedef ImageHandle ValueType;
158 inline static BaseType Adjust(ValueType value)
164 #endif // GL_ARB_bindless_texture
168 #endif // include guard
void MakeResident(AccessSpecifier access)
Make the image resident.
Definition: texture_handle.hpp:120
void MakeResident(void)
Make the texture resident.
Definition: texture_handle.hpp:53
Access type specifier enumeration.
TextureHandle(TextureName texture, SamplerName sampler)
Construction from a texture and a sampler.
Definition: texture_handle.hpp:43
bool IsResident(void) const
Make the image non-resident.
Definition: texture_handle.hpp:137
GLuint GetGLName(ObjectName< ObjTag > named)
Returns the GLuint OpenGL name assigned to named object.
Definition: name.hpp:38
AccessSpecifier
Enumeration of access type specifiers.
Definition: access_specifier.hpp:27
friend GLuint64 GetGLHandle(TextureHandle)
Returns the GL handle value from TextureHandle.
Definition: texture_handle.hpp:77
bool IsResident(void) const
Make the texture non-resident.
Definition: texture_handle.hpp:67
Helper macro for optional checking of availability of GL function.
Program variable type operations.
void MakeNonResident(void)
Make the image non-resident.
Definition: texture_handle.hpp:130
Pixel data-related declarations.
ImageHandle(TextureName texture, GLint level, bool layered, GLint layer, ImageUnitFormat format)
Construction from a texture and additional parameters.
Definition: texture_handle.hpp:102
void MakeNonResident(void)
Make the texture non-resident.
Definition: texture_handle.hpp:60
A handle for a bindless texture.
Definition: texture_handle.hpp:29
ImageUnitFormat
OpenGL image unit format enumeration.
Definition: pixel_data.hpp:104
Base class for OpenGL "named" objects.
TextureHandle(TextureName texture)
Construction from a texture.
Definition: texture_handle.hpp:36
GLuint64 GetGLHandle(TextureHandle th)
Returns the GL handle value from TextureHandle.
Definition: texture_handle.hpp:77
A common template for "named" objects like textures, buffers, etc.
Definition: fwd.hpp:136
A handle for a bindless texture image.
Definition: texture_handle.hpp:95
friend GLuint64 GetGLHandle(ImageHandle)
Returns the GL handle value from ImageHandle.
Definition: texture_handle.hpp:147