From 4fcd29b82f59df70f5c2123dafbbc031bafb0d11 Mon Sep 17 00:00:00 2001 From: Noel Berry Date: Sat, 12 Feb 2022 00:16:59 -0800 Subject: [PATCH] forgot to include renderer updates from Texture commit --- src/internal/renderer_d3d11.cpp | 4 ++-- src/internal/renderer_opengl.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/internal/renderer_d3d11.cpp b/src/internal/renderer_d3d11.cpp index e37f8cd..9ac9bca 100644 --- a/src/internal/renderer_d3d11.cpp +++ b/src/internal/renderer_d3d11.cpp @@ -274,7 +274,7 @@ namespace Blah return m_format; } - void set_data(unsigned char* data) override + void set_data(const u8* data) override { // bounds D3D11_BOX box; @@ -295,7 +295,7 @@ namespace Blah 0); } - void get_data(unsigned char* data) override + void get_data(u8* data) override { HRESULT hr; diff --git a/src/internal/renderer_opengl.cpp b/src/internal/renderer_opengl.cpp index dc80930..8ff1b00 100644 --- a/src/internal/renderer_opengl.cpp +++ b/src/internal/renderer_opengl.cpp @@ -254,7 +254,7 @@ typedef char GLchar; GL_FUNC(BindTexture, void, GLenum target, GLuint id) \ GL_FUNC(BindRenderbuffer, void, GLenum target, GLuint id) \ GL_FUNC(BindFramebuffer, void, GLenum target, GLuint id) \ - GL_FUNC(TexImage2D, void, GLenum target, GLint level, GLenum internalFormat, GLint width, GLint height, GLint border, GLenum format, GLenum type, void* data) \ + GL_FUNC(TexImage2D, void, GLenum target, GLint level, GLenum internalFormat, GLint width, GLint height, GLint border, GLenum format, GLenum type, const void* data) \ GL_FUNC(FramebufferRenderbuffer, void, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) \ GL_FUNC(FramebufferTexture2D, void, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) \ GL_FUNC(TexParameteri, void, GLenum target, GLenum name, GLint param) \ @@ -709,14 +709,14 @@ namespace Blah } } - virtual void set_data(unsigned char* data) override + virtual void set_data(const u8* data) override { renderer->gl.ActiveTexture(GL_TEXTURE0); renderer->gl.BindTexture(GL_TEXTURE_2D, m_id); renderer->gl.TexImage2D(GL_TEXTURE_2D, 0, m_gl_internal_format, m_width, m_height, 0, m_gl_format, m_gl_type, data); } - virtual void get_data(unsigned char* data) override + virtual void get_data(u8* data) override { renderer->gl.ActiveTexture(GL_TEXTURE0); renderer->gl.BindTexture(GL_TEXTURE_2D, m_id);