[Video] rename grConstantColorValue to gfxConstantColorValue
This commit is contained in:
parent
e0f2ed0513
commit
706e9221bd
|
@ -63,7 +63,7 @@ static int SetupFBtoScreenCombiner(uint32_t texture_size, uint32_t opaque)
|
|||
grTexClampMode(tmu,
|
||||
GR_TEXTURECLAMP_CLAMP,
|
||||
GR_TEXTURECLAMP_CLAMP);
|
||||
// grConstantColorValue (0xFFFFFFFF);
|
||||
// gfxConstantColorValue (0xFFFFFFFF);
|
||||
grColorCombine(GR_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GR_COMBINE_FACTOR_ONE,
|
||||
GR_COMBINE_LOCAL_NONE,
|
||||
|
@ -414,7 +414,7 @@ static void DrawDepthBufferToScreen256(FB_TO_SCREEN_INFO & fb_info)
|
|||
t_info.data = tex;
|
||||
uint32_t tex_size = gfxTexTextureMemRequired(GR_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
int tmu = SetupFBtoScreenCombiner(tex_size*width256*height256, fb_info.opaque);
|
||||
grConstantColorValue(rdp.fog_color);
|
||||
gfxConstantColorValue(rdp.fog_color);
|
||||
grColorCombine(GR_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GR_COMBINE_FACTOR_ONE,
|
||||
GR_COMBINE_LOCAL_NONE,
|
||||
|
@ -484,7 +484,7 @@ static void DrawHiresDepthBufferToScreen(FB_TO_SCREEN_INFO & fb_info)
|
|||
t_info.format = GFX_TEXFMT_ALPHA_INTENSITY_88;
|
||||
t_info.smallLodLog2 = t_info.largeLodLog2 = LOD;
|
||||
t_info.aspectRatioLog2 = GR_ASPECT_LOG2_1x1;
|
||||
grConstantColorValue(rdp.fog_color);
|
||||
gfxConstantColorValue(rdp.fog_color);
|
||||
grColorCombine(GR_COMBINE_FUNCTION_LOCAL,
|
||||
GR_COMBINE_FACTOR_NONE,
|
||||
GR_COMBINE_LOCAL_CONSTANT,
|
||||
|
@ -596,7 +596,7 @@ void DrawDepthBufferToScreen(FB_TO_SCREEN_INFO & fb_info)
|
|||
t_info.data = tex;
|
||||
|
||||
int tmu = SetupFBtoScreenCombiner(gfxTexTextureMemRequired(GR_MIPMAPLEVELMASK_BOTH, &t_info), fb_info.opaque);
|
||||
grConstantColorValue(rdp.fog_color);
|
||||
gfxConstantColorValue(rdp.fog_color);
|
||||
grColorCombine(GR_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GR_COMBINE_FACTOR_ONE,
|
||||
GR_COMBINE_LOCAL_NONE,
|
||||
|
|
|
@ -676,8 +676,7 @@ void set_lambda()
|
|||
glUniform1f(lambda_location, lambda);
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grConstantColorValue(GrColor_t value)
|
||||
void gfxConstantColorValue(GrColor_t value)
|
||||
{
|
||||
WriteTrace(TraceGlitch, TraceDebug, "value: %d", value);
|
||||
switch (lfb_color_fmt)
|
||||
|
@ -695,14 +694,13 @@ grConstantColorValue(GrColor_t value)
|
|||
g_texture_env_color[3] = (value & 0xFF) / 255.0f;
|
||||
break;
|
||||
default:
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grConstantColorValue: unknown color format : %x", lfb_color_fmt);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "gfxConstantColorValue: unknown color format : %x", lfb_color_fmt);
|
||||
}
|
||||
|
||||
vbo_draw();
|
||||
|
||||
constant_color_location = glGetUniformLocation(g_program_object_default, "constant_color");
|
||||
glUniform4f(constant_color_location, g_texture_env_color[0], g_texture_env_color[1],
|
||||
g_texture_env_color[2], g_texture_env_color[3]);
|
||||
glUniform4f(constant_color_location, g_texture_env_color[0], g_texture_env_color[1], g_texture_env_color[2], g_texture_env_color[3]);
|
||||
}
|
||||
|
||||
void writeGLSLColorOther(int other)
|
||||
|
@ -2808,7 +2806,7 @@ FX_ENTRY void FX_CALL grConstantColorValueExt(GrChipID_t tmu, GrColor_t value)
|
|||
}
|
||||
break;
|
||||
default:
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grConstantColorValue: unknown color format : %x", lfb_color_fmt);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "gfxConstantColorValue: unknown color format : %x", lfb_color_fmt);
|
||||
}
|
||||
|
||||
vbo_draw();
|
||||
|
|
|
@ -578,8 +578,7 @@ void set_lambda()
|
|||
grDisplayGLError("set_lambda");
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grConstantColorValue(GrColor_t value)
|
||||
void gfxConstantColorValue(GrColor_t value)
|
||||
{
|
||||
WriteTrace(TraceGlitch, TraceDebug, "value: %d", value);
|
||||
switch (lfb_color_fmt)
|
||||
|
@ -597,14 +596,14 @@ grConstantColorValue(GrColor_t value)
|
|||
texture_env_color[3] = (value & 0xFF) / 255.0f;
|
||||
break;
|
||||
default:
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grConstantColorValue: unknown color format : %x", lfb_color_fmt);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "gfxConstantColorValue: unknown color format : %x", lfb_color_fmt);
|
||||
}
|
||||
|
||||
constant_color_location = glGetUniformLocationARB(program_object, "constant_color");
|
||||
glUniform4fARB(constant_color_location, texture_env_color[0], texture_env_color[1],
|
||||
texture_env_color[2], texture_env_color[3]);
|
||||
|
||||
grDisplayGLError("grConstantColorValue");
|
||||
grDisplayGLError("gfxConstantColorValue");
|
||||
}
|
||||
|
||||
int setOtherColorSource(int other)
|
||||
|
@ -2764,7 +2763,7 @@ grConstantColorValueExt(GrChipID_t tmu,
|
|||
}
|
||||
break;
|
||||
default:
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grConstantColorValue: unknown color format : %x", lfb_color_fmt);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "gfxConstantColorValue: unknown color format : %x", lfb_color_fmt);
|
||||
}
|
||||
|
||||
if (num_tex == 0)
|
||||
|
|
|
@ -23,6 +23,7 @@ FxBool gfxSstWinClose(GrContext_t context);
|
|||
void gfxTextureBufferExt(GrChipID_t tmu, FxU32 startAddress, GrLOD_t lodmin, GrLOD_t lodmax, GrAspectRatio_t aspect, GrTextureFormat_t fmt, FxU32 evenOdd);
|
||||
FxU32 gfxTexMaxAddress(GrChipID_t tmu);
|
||||
FxU32 gfxTexTextureMemRequired(FxU32 evenOdd, GrTexInfo *info);
|
||||
void gfxConstantColorValue(GrColor_t value);
|
||||
|
||||
extern uint32_t nbTextureUnits;
|
||||
extern uint32_t g_scr_res_x, g_scr_res_y, g_res_x, g_res_y;
|
||||
|
|
|
@ -334,7 +334,7 @@ static GrTextureFormat_t TexBufSetupCombiner(int force_rgb = FALSE)
|
|||
GR_COMBINE_LOCAL_NONE,
|
||||
GR_COMBINE_OTHER_TEXTURE,
|
||||
FXFALSE);
|
||||
// grConstantColorValue (0xFFFFFFFF);
|
||||
// gfxConstantColorValue (0xFFFFFFFF);
|
||||
grAlphaBlendFunction(GR_BLEND_ONE, // use alpha compare, but not T0 alpha
|
||||
GR_BLEND_ZERO,
|
||||
GR_BLEND_ONE,
|
||||
|
|
|
@ -685,7 +685,7 @@ void TexCache()
|
|||
grColorCombine(cmb.c_fnc, cmb.c_fac, cmb.c_loc, cmb.c_oth, FXFALSE);
|
||||
grAlphaCombine(cmb.a_fnc, cmb.a_fac, cmb.a_loc, cmb.a_oth, FXFALSE);
|
||||
}
|
||||
grConstantColorValue(cmb.ccolor);
|
||||
gfxConstantColorValue(cmb.ccolor);
|
||||
grAlphaBlendFunction(cmb.abf1, cmb.abf2, GR_BLEND_ZERO, GR_BLEND_ZERO);
|
||||
if (!rdp.tex) //nothing more to do
|
||||
return;
|
||||
|
|
|
@ -2500,7 +2500,7 @@ void rdp_fillrect()
|
|||
((uint32_t)((float)((color & 0x003E) >> 1) / 31.0f * 255.0f) << 8);
|
||||
}
|
||||
|
||||
grConstantColorValue(color);
|
||||
gfxConstantColorValue(color);
|
||||
|
||||
grColorCombine(GR_COMBINE_FUNCTION_LOCAL,
|
||||
GR_COMBINE_FACTOR_NONE,
|
||||
|
@ -2545,7 +2545,7 @@ void rdp_fillrect()
|
|||
GR_COMBINE_LOCAL_CONSTANT,
|
||||
GR_COMBINE_OTHER_NONE,
|
||||
FXFALSE);
|
||||
grConstantColorValue((cmb.ccolor & 0xFFFFFF00) | (rdp.fog_color & 0xFF));
|
||||
gfxConstantColorValue((cmb.ccolor & 0xFFFFFF00) | (rdp.fog_color & 0xFF));
|
||||
rdp.update |= UPDATE_COMBINE;
|
||||
}
|
||||
}
|
||||
|
@ -3171,7 +3171,7 @@ void SetWireframeCol()
|
|||
GR_COMBINE_LOCAL_CONSTANT,
|
||||
GR_COMBINE_OTHER_NONE,
|
||||
FXFALSE);
|
||||
grConstantColorValue(0xFF0000FF);
|
||||
gfxConstantColorValue(0xFF0000FF);
|
||||
grAlphaBlendFunction(GR_BLEND_ONE,
|
||||
GR_BLEND_ZERO,
|
||||
GR_BLEND_ZERO,
|
||||
|
|
Loading…
Reference in New Issue