Skip to content

Commit

Permalink
Fix rpi build
Browse files Browse the repository at this point in the history
  • Loading branch information
drhelius committed Apr 12, 2020
1 parent 47b843c commit 7fcb7d4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions platforms/raspberrypi/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ void update(void)
scr_h = runtime_info.screen_height;
}

glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, scr_w, scr_h, GL_RGBA, GL_UNSIGNED_BYTE, (GLvoid*) theFrameBuffer);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, scr_w, scr_h, GL_RGB, GL_UNSIGNED_BYTE, (GLvoid*) theFrameBuffer);
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
eglSwapBuffers(display, surface);
}
Expand Down Expand Up @@ -418,7 +418,7 @@ void init_ogl(void)

glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, theGSTexture);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, GL_RGBA, GL_UNSIGNED_BYTE, (GLvoid*) NULL);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 256, 256, 0, GL_RGB, GL_UNSIGNED_BYTE, (GLvoid*) NULL);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);

Expand Down Expand Up @@ -463,7 +463,6 @@ void init(void){
{
int pixel = (y * GS_RESOLUTION_MAX_WIDTH) + x;
theFrameBuffer[pixel].red = theFrameBuffer[pixel].green = theFrameBuffer[pixel].blue = 0x00;
theFrameBuffer[pixel].alpha = 0xFF;
}
}
}
Expand Down

0 comments on commit 7fcb7d4

Please sign in to comment.