mirror of
https://gitlab.com/shinovon/re3-symbian.git
synced 2026-05-23 01:57:21 +03:00
Fix
This commit is contained in:
parent
dfdd037ed3
commit
6c644421fd
2 changed files with 6 additions and 6 deletions
4
vendor/librw/src/gl/gl3raster.cpp
vendored
4
vendor/librw/src/gl/gl3raster.cpp
vendored
|
|
@ -630,7 +630,7 @@ rasterUnlock(Raster *raster, int32 level)
|
|||
#endif
|
||||
) {
|
||||
// convert to 16-bit
|
||||
uint16_t* pixels16 = (uint16_t*)rwMalloc(raster->width * raster->height * sizeof(uint16_t));
|
||||
uint16_t* pixels16 = (uint16_t*)rwMalloc(raster->width * raster->height * sizeof(uint16_t), MEMDUR_FUNCTION | ID_DRIVER);
|
||||
uint8_t* pixels8 = (uint8_t*)raster->pixels;
|
||||
|
||||
for (int i = 0; i < raster->width * raster->height; i++) {
|
||||
|
|
@ -642,7 +642,7 @@ rasterUnlock(Raster *raster, int32 level)
|
|||
pixels16[i] = ((r >> 4) << 12) | ((g >> 4) << 8) | ((b >> 4) << 4) | (a >> 4);
|
||||
}
|
||||
glTexImage2D(GL_TEXTURE_2D, level, GL_RGBA, raster->width, raster->height, 0, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4, pixels16);
|
||||
free(pixels16);
|
||||
rwFree(pixels16);
|
||||
CHECK_GL_ERROR("glTexImage2D 1");
|
||||
} else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue