fixed include, added width and height query for renderbuffer and texture2d.
This commit is contained in:
parent
37acc0146a
commit
2131d6a681
|
@ -1,7 +1,7 @@
|
||||||
#ifndef GLW_FRAMEBUFFER_H
|
#ifndef GLW_FRAMEBUFFER_H
|
||||||
#define GLW_FRAMEBUFFER_H
|
#define GLW_FRAMEBUFFER_H
|
||||||
|
|
||||||
#include "./texture2D.h"
|
#include "./texture2d.h"
|
||||||
#include "./renderbuffer.h"
|
#include "./renderbuffer.h"
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
|
@ -68,6 +68,16 @@ class Renderbuffer : public Renderable
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GLsizei width(void) const
|
||||||
|
{
|
||||||
|
return this->m_width;
|
||||||
|
}
|
||||||
|
|
||||||
|
GLsizei height(void) const
|
||||||
|
{
|
||||||
|
return this->m_height;
|
||||||
|
}
|
||||||
|
|
||||||
void setStorage(GLenum target, GLint unit, GLenum format, GLsizei width, GLsizei height)
|
void setStorage(GLenum target, GLint unit, GLenum format, GLsizei width, GLsizei height)
|
||||||
{
|
{
|
||||||
(void)unit;
|
(void)unit;
|
||||||
|
@ -139,6 +149,16 @@ class SafeRenderbuffer : public SafeRenderable
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GLsizei width(void) const
|
||||||
|
{
|
||||||
|
return this->object()->width();
|
||||||
|
}
|
||||||
|
|
||||||
|
GLsizei height(void) const
|
||||||
|
{
|
||||||
|
return this->object()->height();
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
SafeRenderbuffer(const RenderbufferPtr & renderbuffer)
|
SafeRenderbuffer(const RenderbufferPtr & renderbuffer)
|
||||||
|
|
|
@ -61,6 +61,16 @@ class Texture2D : public Texture
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GLsizei width(void) const
|
||||||
|
{
|
||||||
|
return this->m_width;
|
||||||
|
}
|
||||||
|
|
||||||
|
GLsizei height(void) const
|
||||||
|
{
|
||||||
|
return this->m_height;
|
||||||
|
}
|
||||||
|
|
||||||
void setImage(GLenum target, GLint unit, GLint level, GLsizei width, GLsizei height, GLenum dataFormat, GLenum dataType, const void * data)
|
void setImage(GLenum target, GLint unit, GLint level, GLsizei width, GLsizei height, GLenum dataFormat, GLenum dataType, const void * data)
|
||||||
{
|
{
|
||||||
(void)unit;
|
(void)unit;
|
||||||
|
@ -154,6 +164,16 @@ class SafeTexture2D : public SafeTexture
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GLsizei width(void) const
|
||||||
|
{
|
||||||
|
return this->object()->width();
|
||||||
|
}
|
||||||
|
|
||||||
|
GLsizei height(void) const
|
||||||
|
{
|
||||||
|
return this->object()->height();
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
SafeTexture2D(const Texture2DPtr & texture2D)
|
SafeTexture2D(const Texture2DPtr & texture2D)
|
||||||
|
@ -223,6 +243,11 @@ class BoundTexture2D : public BoundTexture
|
||||||
return static_cast<Texture2DHandle &>(BaseType::handle());
|
return static_cast<Texture2DHandle &>(BaseType::handle());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setSampleMode(const TextureSampleMode & sampler)
|
||||||
|
{
|
||||||
|
this->object()->setSampleMode(this->m_target, this->m_unit, sampler);
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
BoundTexture2D(const Texture2DHandle & handle, const Texture2DBindingParams & params)
|
BoundTexture2D(const Texture2DHandle & handle, const Texture2DBindingParams & params)
|
||||||
|
|
Loading…
Reference in New Issue