Renderer: Implement Framebuffers

This commit is contained in:
Jérôme Leclercq
2021-02-20 19:22:08 +01:00
parent 3ef74d6e1d
commit fb3468854f
32 changed files with 401 additions and 100 deletions

View File

@@ -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>