PrevUpHomeNext

Renderbuffers

#include <oglplus/renderbuffer.hpp>

Common renderbuffer operations

template <>
class ObjCommonOps<tag::Renderbuffer>
 : public RenderbufferName
{
public:
	typedef RenderbufferTarget Target; 1

	static RenderbufferName Binding(RenderbufferTarget target); 2
	static void Bind(RenderbufferTarget target, RenderbufferName renderbuffer); 3

	void Bind(RenderbufferTarget target) const; 4
};

1

Renderbuffer bind target.

2

Returns the renderbuffer currently bound to the specified target. See glGetIntegerv.

3

Binds the specified renderbuffer to the specified target. See glBindRenderbuffer.

4

Binds this renderbuffer to the specified target. See glBindRenderbuffer.

Operations with explicit selector

template <>
class ObjectOps<tag::ExplicitSel, tag::Renderbuffer>
 : public ObjZeroOps<tag::ExplicitSel, tag::Renderbuffer> 1
{
public:
	static void Storage(
		RenderbufferTarget target,
		PixelDataInternalFormat internalformat,
		SizeType width,
		SizeType height
	); 2
	static void Storage(
		RenderbufferTarget target,
		const images::ImageSpec& image_spec
	);

	static void StorageMultisample(
		RenderbufferTarget target,
		SizeType samples,
		PixelDataInternalFormat internalformat,
		SizeType width,
		SizeType height
	); 3

	static SizeType Width(RenderbufferTarget target); 4
	static SizeType Height(RenderbufferTarget target); 5

	static SizeType RedSize(RenderbufferTarget target); 6
	static SizeType GreenSize(RenderbufferTarget target); 7
	static SizeType BlueSize(RenderbufferTarget target); 8
	static SizeType AlphaSize(RenderbufferTarget target); 9
	static SizeType DepthSize(RenderbufferTarget target); 10
	static SizeType StencilSize(RenderbufferTarget target); 11

	static SizeType Samples(RenderbufferTarget target); 12
	static PixelDataInternalFormat InternalFormat(RenderbufferTarget target); 13
};

1

Indirectly inherits from ObjCommonOps<tag::Renderbuffer>.

2

Sets the storage parameters for the renderbuffer currently bound to the specified target. See glRenderbufferStorage.

3

Sets multipsample storage parameters for the renderbuffer currently bound to the specified target. See glRenderbufferStorageMultisample.

4

Returns the width in pixels of the renderbuffer currently bound to the specified target. See glGetRenderbufferParameter, GL_RENDERBUFFER_WIDTH.

5

Returns the height in pixels of the renderbuffer currently bound to the specified target. See glGetRenderbufferParameter, GL_RENDERBUFFER_HEIGHT.

6

Returns the size in bits of the red component of the renderbuffer currently bound to the specified target. See glGetRenderbufferParameter, GL_RENDERBUFFER_RED_SIZE.

7

Returns the size in bits of the green component of the renderbuffer currently bound to the specified target. See glGetRenderbufferParameter, GL_RENDERBUFFER_GREEN_SIZE.

8

Returns the size in bits of the blue component of the renderbuffer currently bound to the specified target. See glGetRenderbufferParameter, GL_RENDERBUFFER_BLUE_SIZE.

9

Returns the size in bits of the alpha component of the renderbuffer currently bound to the specified target. See glGetRenderbufferParameter, GL_RENDERBUFFER_ALPHA_SIZE.

10

Returns the size in bits of the depth component of the renderbuffer currently bound to the specified target. See glGetRenderbufferParameter, GL_RENDERBUFFER_DEPTH_SIZE.

11

Returns the size in bits of the stencil component of the renderbuffer currently bound to the specified target. See glGetRenderbufferParameter, GL_RENDERBUFFER_STENCIL_SIZE.

12

Returns the number of samples of the renderbuffer currently bound to the specified target. See glGetRenderbufferParameter, GL_RENDERBUFFER_SAMPLES.

13

Returns the internal format of the renderbuffer currently bound to the specified target. See glGetRenderbufferParameter, GL_RENDERBUFFER_INTERNAL_FORMAT.

Definition

typedef ObjectOps<tag::ExplicitSel, tag::Renderbuffer>
	RenderbufferOps;

typedef Object<RenderbufferOps> Renderbuffer;

typedef ObjectZero<ObjZeroOps<tag::ExplicitSel, tag::Renderbuffer>>
	NoRenderbuffer;

Syntax sugar operators

RenderbufferTarget operator << (
	const RenderbufferOps& rbo,
	RenderbufferTarget target
); 1

RenderbufferTarget operator << (
	RenderbufferTarget target,
	const images::ImageSpec& image_spec
); 2

1

Binds rbo to the specified target.

2

Sets the storage parameters from image_spec to the renderbuffer currently bound to the specified target.

Target

#include <oglplus/renderbuffer_target.hpp>

enum class RenderbufferTarget : GLenum
{
	Renderbuffer = GL_RENDERBUFFER
};

template <>
Range<RenderbufferTarget> EnumValueRange<RenderbufferTarget>(void);

StrCRef EnumValueName(RenderbufferTarget);

Target to class

#if !OGLPLUS_NO_ENUM_VALUE_CLASSES
namespace enums {

template <typename Base, template<RenderbufferTarget> class Transform>
class EnumToClass<Base, RenderbufferTarget, Transform> 1
 : public Base
{
public:
	EnumToClass(void);
	EnumToClass(Base&& base);

	Transform<RenderbufferTarget::Renderbuffer>
		Renderbuffer;
};

} // namespace enums
#endif

1

Specialization of EnumToClass for the RenderbufferTarget enumeration.


PrevUpHomeNext