Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Sohns committed Feb 8, 2025
1 parent a6efdf8 commit 667c42b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
16 changes: 14 additions & 2 deletions src/gl/common_gl_texture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Common_GL_Texture::~Common_GL_Texture ()
}

bool
Common_GL_Texture::load (GLenum format_in)
Common_GL_Texture::load ()
{
COMMON_TRACE (ACE_TEXT ("Common_GL_Texture::load"));

Expand All @@ -75,7 +75,19 @@ Common_GL_Texture::load (GLenum format_in)

bind ();

glCopyTexImage2D (GL_TEXTURE_2D, 0, format_in, viewport_a[0], viewport_a[1], viewport_a[2], viewport_a[3], 0);
glCopyTexImage2D (GL_TEXTURE_2D, 0, GL_RGBA, viewport_a[0], viewport_a[1], viewport_a[2], viewport_a[3], 0);
//GLfloat* pixels_p = NULL;
//ACE_NEW_NORETURN (pixels_p,
// GLfloat[4 * viewport_a[2] * viewport_a[3]]);
//ACE_ASSERT (pixels_p);

//glClampColor (GL_CLAMP_READ_COLOR, GL_FALSE);
//glClampColor (GL_CLAMP_VERTEX_COLOR, GL_FALSE);
//glClampColor (GL_CLAMP_FRAGMENT_COLOR, GL_FALSE);

//glReadPixels (0, 0, viewport_a[2], viewport_a[3], GL_RGBA, GL_FLOAT, pixels_p);
//glTexImage2D (GL_TEXTURE_2D, 0, GL_RGBA32F, viewport_a[2], viewport_a[3], 0, GL_RGBA, GL_FLOAT, pixels_p);
//delete [] pixels_p;

unbind ();

Expand Down
2 changes: 1 addition & 1 deletion src/gl/common_gl_texture.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Common_GL_Texture
~Common_GL_Texture ();

// *NOTE*: this loads the (currently bound) framebuffer
bool load (GLenum = GL_RGBA); // format
bool load ();
bool load (uint8_t*, // data
const Common_Image_Resolution_t&, // resolution
unsigned int, // depth
Expand Down

0 comments on commit 667c42b

Please sign in to comment.