Renderer: Implement Framebuffers
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/OpenGLRenderer/OpenGLTexture.hpp>
|
||||
#include <stdexcept>
|
||||
#include <Nazara/OpenGLRenderer/Debug.hpp>
|
||||
|
||||
namespace Nz
|
||||
@@ -11,6 +12,22 @@ namespace Nz
|
||||
{
|
||||
return m_texture;
|
||||
}
|
||||
|
||||
inline GL::TextureTarget OpenGLTexture::ToTextureTarget(ImageType imageType)
|
||||
{
|
||||
switch (imageType)
|
||||
{
|
||||
case ImageType_2D: return GL::TextureTarget::Target2D;
|
||||
case ImageType_2D_Array: return GL::TextureTarget::Target2D_Array;
|
||||
case ImageType_3D: return GL::TextureTarget::Target3D;
|
||||
case ImageType_Cubemap: return GL::TextureTarget::Cubemap;
|
||||
|
||||
case ImageType_1D:
|
||||
case ImageType_1D_Array:
|
||||
default:
|
||||
throw std::runtime_error("unsupported texture type");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#include <Nazara/OpenGLRenderer/DebugOff.hpp>
|
||||
|
||||
Reference in New Issue
Block a user