mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-27 18:20:27 +00:00
[GL1] Initial changes for hw context without FBO
This commit is contained in:
parent
9e908b1255
commit
13b5450ff9
@ -727,11 +727,7 @@ static bool gl1_gfx_frame(void *data, const void *frame,
|
||||
video_width, video_height, false, true);
|
||||
}
|
||||
|
||||
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
if ( gl1->video_width != frame_width ||
|
||||
gl1->video_height != frame_height ||
|
||||
@ -760,9 +756,10 @@ static bool gl1_gfx_frame(void *data, const void *frame,
|
||||
pot_width = get_pot(width);
|
||||
pot_height = get_pot(height);
|
||||
|
||||
if ( frame_width == 4 &&
|
||||
if ( frame == RETRO_HW_FRAME_BUFFER_VALID || (
|
||||
frame_width == 4 &&
|
||||
frame_height == 4 &&
|
||||
(frame_width < width && frame_height < height)
|
||||
(frame_width < width && frame_height < height))
|
||||
)
|
||||
draw = false;
|
||||
|
||||
@ -794,6 +791,12 @@ static bool gl1_gfx_frame(void *data, const void *frame,
|
||||
|
||||
if (draw)
|
||||
{
|
||||
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
if (frame_to_copy)
|
||||
draw_tex(gl1, pot_width, pot_height,
|
||||
width, height, gl1->tex, frame_to_copy);
|
||||
|
Loading…
Reference in New Issue
Block a user