Move OpenGL texture upload mapping
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
#include "rtt.h"
|
||||
#include "util.h"
|
||||
#include "app.h"
|
||||
#include "renderer_gl/opengl_capabilities.h"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
RTT& RTT::operator=(RTT&& other)
|
||||
{
|
||||
@@ -204,9 +207,8 @@ bool RTT::create(int width, int height, int tex/* = -1*/, GLint internal_format,
|
||||
texID = tex;
|
||||
}
|
||||
|
||||
auto ifmt = GL_UNSIGNED_BYTE;
|
||||
if (internal_format == GL_RGBA32F) ifmt = GL_FLOAT;
|
||||
if (internal_format == GL_RGBA16F) ifmt = GL_HALF_FLOAT;
|
||||
const auto ifmt = static_cast<GLenum>(
|
||||
pp::renderer::gl::texture_upload_type_for_internal_format(static_cast<std::uint32_t>(internal_format)));
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, texID);
|
||||
if (tex == -1)
|
||||
|
||||
Reference in New Issue
Block a user