Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken RenderCore_Minimal #32

Open
harskish opened this issue Jan 23, 2024 · 0 comments
Open

Broken RenderCore_Minimal #32

harskish opened this issue Jan 23, 2024 · 0 comments

Comments

@harskish
Copy link

The render function in RenderCore_Minimal contains an incorrect call to glTexSubImage2D:

glTexSubImage2D( GL_TEXTURE_2D, 0, GL_RGBA, screen->width, screen->height, 0, GL_RGBA, GL_UNSIGNED_BYTE, screen->pixels );

Based on the docs, the call signature is

void glTexSubImage2D(GLenum target,
                     GLint level,
                     GLint xoffset,
                     GLint yoffset,
                     GLsizei width,
                     GLsizei height,
                     GLenum format,
                     GLenum type,
                     const void * pixels);

and as such the call itself should be:

glTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, screen->width, screen->height, GL_RGBA, GL_UNSIGNED_BYTE, screen->pixels );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant