VIZ++ Class: OpenGLRenderBufferEXT
|
Source code
/*
* OpenGLRenderBufferEXT.h
* Copyright (c) 2015 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED.
*/
#pragma once
#ifdef GL_EXT_framebuffer_object
#include <viz++/openglext/OpenGLRenderBuffersEXT.h>
namespace VIZ {
class OpenGLRenderBufferEXT :public OpenGLRenderBuffersEXT {
private:
GLenum target;
public:
OpenGLRenderBufferEXT(GLenum target=GL_RENDERBUFFER_EXT)
:OpenGLRenderBuffersEXT(1),
target(target)
{
}
~OpenGLRenderBufferEXT()
{
}
operator GLuint()
{
return getNth(0);
}
void bind()
{
//bind this target to 0-th buffer id
bindNth(this->target, 0);
}
void unbind()
{
OpenGLRenderBuffersEXT::bind(this->target, 0);
}
void getParameteriv(GLenum pname, GLint* params)
{
OpenGLRenderBuffersEXT::getParameteriv(this->target, pname, params);
}
GLboolean isRenderbuffer()
{
GLuint buffer = getNth(0);
return OpenGLRenderBuffersEXT::isRenderbuffer(buffer);
}
void storage(GLenum internalformat, GLsizei width, GLsizei height)
{
OpenGLRenderBuffersEXT::storage(this->target, internalformat, width, height);
}
};
}
#endif
Last modified: 10 Feb 2017
Copyright (c) 2009-2017 Antillia.com ALL RIGHTS RESERVED.