[Video] Rename grFramebufferCopyExt to gfxFramebufferCopyExt

This commit is contained in:
zilmar 2017-05-26 07:39:33 +10:00
parent 148bf3ebf4
commit 837ebe02ef
4 changed files with 12 additions and 14 deletions

View File

@ -493,7 +493,7 @@ int InitGfx()
to_fullscreen = FALSE;
// get maximal texture size
grGet(GR_MAX_TEXTURE_SIZE, 4, (FxI32*)&voodoo.max_tex_size);
gfxGet(GR_MAX_TEXTURE_SIZE, 4, (FxI32*)&voodoo.max_tex_size);
voodoo.sup_large_tex = (voodoo.max_tex_size > 256 && !g_settings->hacks(CSettings::hack_PPL));
voodoo.tex_min_addr[0] = voodoo.tex_min_addr[1] = gfxTexMinAddress(GR_TMU0);
@ -507,7 +507,7 @@ int InitGfx()
voodoo.sup_32bit_tex = TRUE;
voodoo.gamma_correction = 0;
grGet(GR_GAMMA_TABLE_ENTRIES, sizeof(voodoo.gamma_table_size), &voodoo.gamma_table_size);
gfxGet(GR_GAMMA_TABLE_ENTRIES, sizeof(voodoo.gamma_table_size), &voodoo.gamma_table_size);
srand(g_settings->stipple_pattern());
setPattern();

View File

@ -896,8 +896,7 @@ int CheckTextureBufferFormat(GrChipID_t tmu, FxU32 startAddress, GrTexInfo *info
return 0;
}
FX_ENTRY FxU32 FX_CALL
grGet(FxU32 pname, FxU32 plength, FxI32 *params)
FxU32 gfxGet(FxU32 pname, FxU32 plength, FxI32 *params)
{
WriteTrace(TraceGlitch, TraceDebug, "pname: %d plength: %d", pname, plength);
switch (pname)
@ -996,7 +995,7 @@ grGet(FxU32 pname, FxU32 plength, FxI32 *params)
return 4;
break;
default:
WriteTrace(TraceGlitch, TraceWarning, "unknown pname in grGet : %x", pname);
WriteTrace(TraceGlitch, TraceWarning, "unknown pname in gfxGet : %x", pname);
}
return 0;
}
@ -1136,8 +1135,7 @@ void updateTexture()
}
}
FX_ENTRY void FX_CALL grFramebufferCopyExt(int x, int y, int w, int h,
int from, int to, int mode)
void gfxFramebufferCopyExt(int x, int y, int w, int h, int from, int to, int mode)
{
if (mode == GR_FBCOPY_MODE_DEPTH) {
int tw = 1, th = 1;

View File

@ -1179,8 +1179,7 @@ int CheckTextureBufferFormat(GrChipID_t tmu, FxU32 startAddress, GrTexInfo *info
return 0;
}
FX_ENTRY FxU32 FX_CALL
grGet(FxU32 pname, FxU32 plength, FxI32 *params)
FxU32 gfxGet(FxU32 pname, FxU32 plength, FxI32 *params)
{
WriteTrace(TraceGlitch, TraceDebug, "pname: %d plength: %d", pname, plength);
switch (pname)
@ -1291,7 +1290,7 @@ grGet(FxU32 pname, FxU32 plength, FxI32 *params)
return 4;
break;
default:
WriteTrace(TraceGlitch, TraceWarning, "unknown pname in grGet : %x", pname);
WriteTrace(TraceGlitch, TraceWarning, "unknown pname in gfxGet : %x", pname);
}
return 0;
}
@ -1406,8 +1405,7 @@ void updateTexture()
grDisplayGLError("updateTexture");
}
FX_ENTRY void FX_CALL grFramebufferCopyExt(int /*x*/, int /*y*/, int /*w*/, int /*h*/,
int from, int to, int mode)
void gfxFramebufferCopyExt(int x, int y, int w, int h, int from, int to, int mode)
{
if (mode == GR_FBCOPY_MODE_DEPTH) {
int tw = 1, th = 1;
@ -1427,7 +1425,7 @@ FX_ENTRY void FX_CALL grFramebufferCopyExt(int /*x*/, int /*y*/, int /*w*/, int
glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT,
0, g_viewport_offset, tw, th, 0);
glBindTexture(GL_TEXTURE_2D, default_texture);
grDisplayGLError("grFramebufferCopyExt :: A");
grDisplayGLError("gfxFramebufferCopyExt :: A");
return;
}
if (from == GR_FBCOPY_BUFFER_FRONT && to == GR_FBCOPY_BUFFER_BACK) {
@ -1449,7 +1447,7 @@ FX_ENTRY void FX_CALL grFramebufferCopyExt(int /*x*/, int /*y*/, int /*w*/, int
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
glBindTexture(GL_TEXTURE_2D, default_texture);
glPopAttrib();
grDisplayGLError("grFramebufferCopyExt :: B");
grDisplayGLError("gfxFramebufferCopyExt :: B");
return;
}
}

View File

@ -54,6 +54,8 @@ void gfxDrawVertexArrayContiguous(FxU32 mode, FxU32 Count, void *pointers, FxU32
GrContext_t gfxSstWinOpen(GrColorFormat_t color_format, GrOriginLocation_t origin_location, int nColBuffers, int nAuxBuffers);
void gfxAuxBufferExt(GrBuffer_t buffer);
FxU32 gfxGet(FxU32 pname, FxU32 plength, FxI32 *params);
void gfxFramebufferCopyExt(int x, int y, int w, int h, int from, int to, int mode);
extern uint32_t nbTextureUnits;
extern uint32_t g_scr_res_x, g_scr_res_y, g_res_x, g_res_y;