13 #ifndef OGLPLUS_RENDERBUFFER_1107121519_HPP
14 #define OGLPLUS_RENDERBUFFER_1107121519_HPP
38 static void Gen(tag::Generate, GLsizei count, GLuint* names)
40 assert(names !=
nullptr);
41 OGLPLUS_GLFUNC(GenRenderbuffers)(count, names);
42 OGLPLUS_CHECK_SIMPLE(GenRenderbuffers);
44 #if GL_VERSION_4_5 || GL_ARB_direct_state_access
45 static void Gen(tag::Create, GLsizei count, GLuint* names)
47 assert(names !=
nullptr);
48 OGLPLUS_GLFUNC(CreateRenderbuffers)(count, names);
49 OGLPLUS_CHECK_SIMPLE(CreateRenderbuffers);
53 static void Delete(GLsizei count, GLuint* names)
55 assert(names !=
nullptr);
56 OGLPLUS_GLFUNC(DeleteRenderbuffers)(count, names);
57 OGLPLUS_VERIFY_SIMPLE(DeleteRenderbuffers);
60 static GLboolean IsA(GLuint name)
63 GLboolean result = OGLPLUS_GLFUNC(IsRenderbuffer)(name);
64 OGLPLUS_VERIFY_SIMPLE(IsRenderbuffer);
101 OGLPLUS_GLFUNC(BindRenderbuffer)(
108 Object(renderbuffer).
121 ,
public ObjBindingOps<tag::Renderbuffer>
144 :
public ObjZeroOps<tag::ExplicitSel, tag::Renderbuffer>
149 static GLint GetIntParam(
Target target, GLenum query);
163 OGLPLUS_GLFUNC(RenderbufferStorage)(
165 GLenum(internalformat),
172 ObjectBinding(target).
173 EnumParam(internalformat)
182 static void Storage(Target target,
const images::ImageSpec& image_spec);
197 OGLPLUS_GLFUNC(RenderbufferStorageMultisample)(
200 GLenum(internalformat),
205 RenderbufferStorageMultisample,
207 ObjectBinding(target).
208 EnumParam(internalformat)
223 return GLsizei(GetIntParam(target, GL_RENDERBUFFER_WIDTH));
236 return GLsizei(GetIntParam(target, GL_RENDERBUFFER_HEIGHT));
251 return GLsizei(GetIntParam(target, GL_RENDERBUFFER_RED_SIZE));
268 return GLsizei(GetIntParam(target, GL_RENDERBUFFER_GREEN_SIZE));
285 return GLsizei(GetIntParam(target, GL_RENDERBUFFER_BLUE_SIZE));
302 return GLsizei(GetIntParam(target, GL_RENDERBUFFER_ALPHA_SIZE));
319 return GLsizei(GetIntParam(target, GL_RENDERBUFFER_DEPTH_SIZE));
336 return GLsizei(GetIntParam(target,GL_RENDERBUFFER_STENCIL_SIZE));
347 return GLsizei(GetIntParam(target,GL_RENDERBUFFER_SAMPLES));
359 GetIntParam(target, GL_RENDERBUFFER_INTERNAL_FORMAT)
365 typedef ObjectOps<tag::ExplicitSel, tag::Renderbuffer>
383 const images::ImageSpec& image_spec
394 typedef ObjectZero<ObjZeroOps<tag::ExplicitSel, tag::Renderbuffer>>
405 #if !OGLPLUS_LINK_LIBRARY || defined(OGLPLUS_IMPLEMENTING_LIBRARY)
406 #include <oglplus/renderbuffer.ipp>
407 #endif // OGLPLUS_LINK_LIBRARY
409 #endif // include guard
RenderbufferTarget Target
Renderbuffer bind targets.
Definition: renderbuffer.hpp:79
static GLsizei AlphaSize(Target target)
Returns the size in bits of the renderbuffer's alpha component.
Definition: renderbuffer.hpp:300
static void Bind(Target target, RenderbufferName renderbuffer)
Binds the specified renderbuffer to the specified target.
Definition: renderbuffer.hpp:96
PixelDataInternalFormat
OpenGL pixel data internal format enumeration.
Definition: pixel_data.hpp:79
Renderbuffer bind target enumerations.
Declaration of OGLplus object-related error.
Generic OpenGL object wrapper.
static GLsizei StencilSize(Target target)
Returns the size in bits of the renderbuffer's stencil component.
Definition: renderbuffer.hpp:334
Forward declarations of Image-related classes.
Implements operations applicable to named (non-zero) objects.
Definition: wrap_tpl.hpp:45
GLuint GetGLName(ObjectName< ObjTag > named)
Returns the GLuint OpenGL name assigned to named object.
Definition: name.hpp:38
RenderbufferTarget
Renderbuffer bind target.
Definition: renderbuffer_target.hpp:24
static GLsizei RedSize(Target target)
Returns the size in bits of the renderbuffer's red component.
Definition: renderbuffer.hpp:249
Helper macro for optional checking of availability of GL function.
Implements operations applicable to any object including object 0 (zero)
Definition: fwd.hpp:157
static PixelDataInternalFormat InternalFormat(Target target)
Returns the internal format of the renderbuffer.
Definition: renderbuffer.hpp:356
Pixel data-related declarations.
static RenderbufferName Binding(Target target)
Returns the current Renderbuffer bound to specified target.
Definition: renderbuffer.hpp:86
static GLsizei DepthSize(Target target)
Returns the size in bits of the renderbuffer's depth component.
Definition: renderbuffer.hpp:317
static GLsizei GreenSize(Target target)
Returns the size in bits of the renderbuffer's green component.
Definition: renderbuffer.hpp:266
RENDERBUFFER: The default target.
Exception class for GL object-related errors.
Definition: object.hpp:24
static void Storage(Target target, PixelDataInternalFormat internalformat, GLsizei width, GLsizei height)
Set the renderbuffer storage parameters for the rbo bound to target.
Definition: renderbuffer.hpp:156
static GLsizei Width(Target target)
Returns the width of the renderbuffer as it was specified by Storage*.
Definition: renderbuffer.hpp:221
static GLsizei Samples(Target target)
Returns the number of samples of the renderbuffer.
Definition: renderbuffer.hpp:345
ObjectOps< tag::ExplicitSel, tag::Renderbuffer > RenderbufferOps
Renderbuffer operations with explicit selector.
Definition: renderbuffer.hpp:366
void Bind(Target target=Target::Renderbuffer) const
Binds this renderbuffer to the specified target.
Definition: renderbuffer.hpp:133
Implements operations applicable to any object and any operation kind.
Definition: fwd.hpp:151
static void StorageMultisample(Target target, GLsizei samples, PixelDataInternalFormat internalformat, GLsizei width, GLsizei height)
Set the renderbuffer multisample storage parameters.
Definition: renderbuffer.hpp:189
ObjectZero< ObjZeroOps< tag::ExplicitSel, tag::Renderbuffer > > NoRenderbuffer
Class that can be used to unbind the currently bound renderbuffer.
Definition: renderbuffer.hpp:395
Class wrapping renderbuffer functions with explicit target selector.
Definition: renderbuffer.hpp:143
static GLsizei Height(Target target)
Returns the height of the renderbuffer as it was specified by Storage*.
Definition: renderbuffer.hpp:234
static GLsizei BlueSize(Target target)
Returns the size in bits of the renderbuffer's blue component.
Definition: renderbuffer.hpp:283
A common template for "named" objects like textures, buffers, etc.
Definition: fwd.hpp:136
Object< RenderbufferOps > Renderbuffer
An oglplus_object encapsulating the renderbuffer object functionality.
Definition: renderbuffer.hpp:401