mirror of
https://github.com/libretro/RetroArch
synced 2025-02-11 15:40:28 +00:00
(RGL PS3) Reimplement glpixelStorei
This commit is contained in:
parent
3e5489cc6e
commit
c9dc5e62d2
4
gfx/gl.c
4
gfx/gl.c
@ -2445,9 +2445,7 @@ static bool gl_overlay_load(void *data, const struct video_overlay_image *images
|
|||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||||
|
|
||||||
#ifndef HAVE_PSGL
|
|
||||||
glPixelStorei(GL_UNPACK_ALIGNMENT, get_alignment(images[i].width * sizeof(uint32_t)));
|
glPixelStorei(GL_UNPACK_ALIGNMENT, get_alignment(images[i].width * sizeof(uint32_t)));
|
||||||
#endif
|
|
||||||
glTexImage2D(GL_TEXTURE_2D, 0, driver.gfx_use_rgba ? GL_RGBA : RARCH_GL_INTERNAL_FORMAT32,
|
glTexImage2D(GL_TEXTURE_2D, 0, driver.gfx_use_rgba ? GL_RGBA : RARCH_GL_INTERNAL_FORMAT32,
|
||||||
images[i].width, images[i].height, 0, driver.gfx_use_rgba ? GL_RGBA : RARCH_GL_TEXTURE_TYPE32,
|
images[i].width, images[i].height, 0, driver.gfx_use_rgba ? GL_RGBA : RARCH_GL_TEXTURE_TYPE32,
|
||||||
RARCH_GL_FORMAT32, images[i].image);
|
RARCH_GL_FORMAT32, images[i].image);
|
||||||
@ -2630,10 +2628,8 @@ static void gl_set_texture_frame(void *data,
|
|||||||
|
|
||||||
gl->rgui_texture_alpha = alpha;
|
gl->rgui_texture_alpha = alpha;
|
||||||
|
|
||||||
#ifndef HAVE_PSGL
|
|
||||||
unsigned base_size = rgb32 ? sizeof(uint32_t) : sizeof(uint16_t);
|
unsigned base_size = rgb32 ? sizeof(uint32_t) : sizeof(uint16_t);
|
||||||
glPixelStorei(GL_UNPACK_ALIGNMENT, get_alignment(width * base_size));
|
glPixelStorei(GL_UNPACK_ALIGNMENT, get_alignment(width * base_size));
|
||||||
#endif
|
|
||||||
|
|
||||||
if (rgb32)
|
if (rgb32)
|
||||||
{
|
{
|
||||||
|
@ -2872,3 +2872,18 @@ void rglGcmFifoGlSetRenderTarget (const void *data)
|
|||||||
uint32_t log2Height = 31 - ({__asm__("cntlzw %0,%1" : "=r" (log2Height) : "r" (grt->height)); log2Height;});
|
uint32_t log2Height = 31 - ({__asm__("cntlzw %0,%1" : "=r" (log2Height) : "r" (grt->height)); log2Height;});
|
||||||
rglGcmSetSurface(thisContext, grt, CELL_GCM_WINDOW_ORIGIN_BOTTOM, CELL_GCM_WINDOW_PIXEL_CENTER_HALF, log2Width, log2Height);
|
rglGcmSetSurface(thisContext, grt, CELL_GCM_WINDOW_ORIGIN_BOTTOM, CELL_GCM_WINDOW_PIXEL_CENTER_HALF, log2Width, log2Height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GLAPI void APIENTRY glPixelStorei( GLenum pname, GLint param )
|
||||||
|
{
|
||||||
|
RGLcontext* LContext = _CurrentContext;
|
||||||
|
|
||||||
|
switch ( pname )
|
||||||
|
{
|
||||||
|
case GL_PACK_ALIGNMENT:
|
||||||
|
LContext->packAlignment = param;
|
||||||
|
break;
|
||||||
|
case GL_UNPACK_ALIGNMENT:
|
||||||
|
LContext->unpackAlignment = param;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user