mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-15 06:04:49 +01:00
fix texture formats
This commit is contained in:
parent
21c114dfb3
commit
bcde36c844
@ -197,8 +197,7 @@ static BOOL d3d9_create_resouces()
|
||||
|
||||
err = err || !d3d9_update_vertices(InterlockedExchangeAdd(&g_ddraw->upscale_hack_active, 0), TRUE);
|
||||
|
||||
int i;
|
||||
for (i = 0; i < D3D9_TEXTURE_COUNT; i++)
|
||||
for (int i = 0; i < D3D9_TEXTURE_COUNT; i++)
|
||||
{
|
||||
err = err || FAILED(
|
||||
IDirect3DDevice9_CreateTexture(
|
||||
@ -207,7 +206,7 @@ static BOOL d3d9_create_resouces()
|
||||
tex_height,
|
||||
1,
|
||||
0,
|
||||
g_ddraw->bpp == 16 ? D3DFMT_R5G6B5 : g_ddraw->bpp == 32 ? D3DFMT_X8B8G8R8 : D3DFMT_L8,
|
||||
g_ddraw->bpp == 16 ? D3DFMT_R5G6B5 : g_ddraw->bpp == 32 ? D3DFMT_X8R8G8B8 : D3DFMT_L8,
|
||||
D3DPOOL_MANAGED,
|
||||
&g_d3d9.surface_tex[i],
|
||||
0));
|
||||
|
@ -181,8 +181,7 @@ static void ogl_create_textures(int width, int height)
|
||||
|
||||
glGenTextures(TEXTURE_COUNT, g_ogl.surface_tex_ids);
|
||||
|
||||
int i;
|
||||
for (i = 0; i < TEXTURE_COUNT; i++)
|
||||
for (int i = 0; i < TEXTURE_COUNT; i++)
|
||||
{
|
||||
glBindTexture(GL_TEXTURE_2D, g_ogl.surface_tex_ids[i]);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
@ -201,7 +200,7 @@ static void ogl_create_textures(int width, int height)
|
||||
g_ogl.surface_tex_width,
|
||||
g_ogl.surface_tex_height,
|
||||
0,
|
||||
g_ogl.surface_format = GL_RGBA,
|
||||
g_ogl.surface_format = GL_BGRA,
|
||||
g_ogl.surface_type = GL_UNSIGNED_BYTE,
|
||||
0);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user