[video] Rename grAlphaBlendFunction to gfxAlphaBlendFunction
This commit is contained in:
parent
83c03738a4
commit
2662fc26f8
|
@ -78,14 +78,14 @@ static int SetupFBtoScreenCombiner(uint32_t texture_size, uint32_t opaque)
|
|||
if (opaque)
|
||||
{
|
||||
grAlphaTestFunction(GR_CMP_ALWAYS);
|
||||
grAlphaBlendFunction(GR_BLEND_ONE,
|
||||
gfxAlphaBlendFunction(GR_BLEND_ONE,
|
||||
GR_BLEND_ZERO,
|
||||
GR_BLEND_ONE,
|
||||
GR_BLEND_ZERO);
|
||||
}
|
||||
else
|
||||
{
|
||||
grAlphaBlendFunction(GR_BLEND_SRC_ALPHA,
|
||||
gfxAlphaBlendFunction(GR_BLEND_SRC_ALPHA,
|
||||
GR_BLEND_ONE_MINUS_SRC_ALPHA,
|
||||
GR_BLEND_ONE,
|
||||
GR_BLEND_ZERO);
|
||||
|
@ -495,7 +495,7 @@ static void DrawHiresDepthBufferToScreen(FB_TO_SCREEN_INFO & fb_info)
|
|||
GR_COMBINE_LOCAL_NONE,
|
||||
GR_COMBINE_OTHER_TEXTURE,
|
||||
FXFALSE);
|
||||
grAlphaBlendFunction(GR_BLEND_SRC_ALPHA,
|
||||
gfxAlphaBlendFunction(GR_BLEND_SRC_ALPHA,
|
||||
GR_BLEND_ONE_MINUS_SRC_ALPHA,
|
||||
GR_BLEND_ONE,
|
||||
GR_BLEND_ZERO);
|
||||
|
|
|
@ -1464,11 +1464,7 @@ void gfxTexCombine(GrChipID_t tmu, GrCombineFunction_t rgb_function, GrCombineFa
|
|||
need_to_compile = 1;
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grAlphaBlendFunction(
|
||||
GrAlphaBlendFnc_t rgb_sf, GrAlphaBlendFnc_t rgb_df,
|
||||
GrAlphaBlendFnc_t alpha_sf, GrAlphaBlendFnc_t alpha_df
|
||||
)
|
||||
void gfxAlphaBlendFunction(GrAlphaBlendFnc_t rgb_sf, GrAlphaBlendFnc_t rgb_df, GrAlphaBlendFnc_t alpha_sf, GrAlphaBlendFnc_t alpha_df)
|
||||
{
|
||||
int sfactorRGB = 0, dfactorRGB = 0, sfactorAlpha = 0, dfactorAlpha = 0;
|
||||
WriteTrace(TraceGlitch, TraceDebug, "rgb_sf: %d rgb_df: %d alpha_sf: %d alpha_df: %d", rgb_sf, rgb_df, alpha_sf, alpha_df);
|
||||
|
@ -1488,7 +1484,7 @@ grAlphaBlendFunction(
|
|||
sfactorRGB = GL_ONE_MINUS_SRC_ALPHA;
|
||||
break;
|
||||
default:
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grAlphaBlendFunction : rgb_sf = %x", rgb_sf);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "gfxAlphaBlendFunction : rgb_sf = %x", rgb_sf);
|
||||
}
|
||||
|
||||
switch (rgb_df)
|
||||
|
@ -1506,7 +1502,7 @@ grAlphaBlendFunction(
|
|||
dfactorRGB = GL_ONE_MINUS_SRC_ALPHA;
|
||||
break;
|
||||
default:
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grAlphaBlendFunction : rgb_df = %x", rgb_df);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "gfxAlphaBlendFunction : rgb_df = %x", rgb_df);
|
||||
}
|
||||
|
||||
switch (alpha_sf)
|
||||
|
@ -1518,7 +1514,7 @@ grAlphaBlendFunction(
|
|||
sfactorAlpha = GL_ONE;
|
||||
break;
|
||||
default:
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grAlphaBlendFunction : alpha_sf = %x", alpha_sf);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "gfxAlphaBlendFunction : alpha_sf = %x", alpha_sf);
|
||||
}
|
||||
|
||||
switch (alpha_df)
|
||||
|
@ -1530,7 +1526,7 @@ grAlphaBlendFunction(
|
|||
dfactorAlpha = GL_ONE;
|
||||
break;
|
||||
default:
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grAlphaBlendFunction : alpha_df = %x", alpha_df);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "gfxAlphaBlendFunction : alpha_df = %x", alpha_df);
|
||||
}
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);
|
||||
|
|
|
@ -1401,11 +1401,7 @@ void gfxTexCombine(GrChipID_t tmu, GrCombineFunction_t rgb_function, GrCombineFa
|
|||
need_to_compile = 1;
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grAlphaBlendFunction(
|
||||
GrAlphaBlendFnc_t rgb_sf, GrAlphaBlendFnc_t rgb_df,
|
||||
GrAlphaBlendFnc_t alpha_sf, GrAlphaBlendFnc_t alpha_df
|
||||
)
|
||||
void gfxAlphaBlendFunction(GrAlphaBlendFnc_t rgb_sf, GrAlphaBlendFnc_t rgb_df, GrAlphaBlendFnc_t alpha_sf, GrAlphaBlendFnc_t alpha_df)
|
||||
{
|
||||
int sfactorRGB = 0, dfactorRGB = 0, sfactorAlpha = 0, dfactorAlpha = 0;
|
||||
WriteTrace(TraceGlitch, TraceDebug, "rgb_sf: %d rgb_df: %d alpha_sf: %d alpha_df: %d", rgb_sf, rgb_df, alpha_sf, alpha_df);
|
||||
|
@ -1425,7 +1421,7 @@ grAlphaBlendFunction(
|
|||
sfactorRGB = GL_ONE_MINUS_SRC_ALPHA;
|
||||
break;
|
||||
default:
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grAlphaBlendFunction : rgb_sf = %x", rgb_sf);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "gfxAlphaBlendFunction : rgb_sf = %x", rgb_sf);
|
||||
}
|
||||
|
||||
switch (rgb_df)
|
||||
|
@ -1443,7 +1439,7 @@ grAlphaBlendFunction(
|
|||
dfactorRGB = GL_ONE_MINUS_SRC_ALPHA;
|
||||
break;
|
||||
default:
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grAlphaBlendFunction : rgb_df = %x", rgb_df);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "gfxAlphaBlendFunction : rgb_df = %x", rgb_df);
|
||||
}
|
||||
|
||||
switch (alpha_sf)
|
||||
|
@ -1455,7 +1451,7 @@ grAlphaBlendFunction(
|
|||
sfactorAlpha = GL_ONE;
|
||||
break;
|
||||
default:
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grAlphaBlendFunction : alpha_sf = %x", alpha_sf);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "gfxAlphaBlendFunction : alpha_sf = %x", alpha_sf);
|
||||
}
|
||||
|
||||
switch (alpha_df)
|
||||
|
@ -1467,7 +1463,7 @@ grAlphaBlendFunction(
|
|||
dfactorAlpha = GL_ONE;
|
||||
break;
|
||||
default:
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grAlphaBlendFunction : alpha_df = %x", alpha_df);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "gfxAlphaBlendFunction : alpha_df = %x", alpha_df);
|
||||
}
|
||||
glEnable(GL_BLEND);
|
||||
if (blend_func_separate_support)
|
||||
|
@ -1475,7 +1471,7 @@ grAlphaBlendFunction(
|
|||
else
|
||||
glBlendFunc(sfactorRGB, dfactorRGB);
|
||||
|
||||
grDisplayGLError("grAlphaBlendFunction");
|
||||
grDisplayGLError("gfxAlphaBlendFunction");
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
|
|
|
@ -27,6 +27,7 @@ void gfxConstantColorValue(GrColor_t value);
|
|||
void gfxColorCombine(GrCombineFunction_t function, GrCombineFactor_t factor, GrCombineLocal_t local, GrCombineOther_t other, FxBool invert);
|
||||
void gfxAlphaCombine(GrCombineFunction_t function, GrCombineFactor_t factor, GrCombineLocal_t local, GrCombineOther_t other, FxBool invert);
|
||||
void gfxTexCombine(GrChipID_t tmu, GrCombineFunction_t rgb_function, GrCombineFactor_t rgb_factor, GrCombineFunction_t alpha_function, GrCombineFactor_t alpha_factor, FxBool rgb_invert, FxBool alpha_invert);
|
||||
void gfxAlphaBlendFunction(GrAlphaBlendFnc_t rgb_sf, GrAlphaBlendFnc_t rgb_df, GrAlphaBlendFnc_t alpha_sf, GrAlphaBlendFnc_t alpha_df);
|
||||
|
||||
extern uint32_t nbTextureUnits;
|
||||
extern uint32_t g_scr_res_x, g_scr_res_y, g_res_x, g_res_y;
|
||||
|
|
|
@ -335,7 +335,7 @@ static GrTextureFormat_t TexBufSetupCombiner(int force_rgb = FALSE)
|
|||
GR_COMBINE_OTHER_TEXTURE,
|
||||
FXFALSE);
|
||||
// gfxConstantColorValue (0xFFFFFFFF);
|
||||
grAlphaBlendFunction(GR_BLEND_ONE, // use alpha compare, but not T0 alpha
|
||||
gfxAlphaBlendFunction(GR_BLEND_ONE, // use alpha compare, but not T0 alpha
|
||||
GR_BLEND_ZERO,
|
||||
GR_BLEND_ONE,
|
||||
GR_BLEND_ZERO);
|
||||
|
|
|
@ -686,7 +686,7 @@ void TexCache()
|
|||
gfxAlphaCombine(cmb.a_fnc, cmb.a_fac, cmb.a_loc, cmb.a_oth, FXFALSE);
|
||||
}
|
||||
gfxConstantColorValue(cmb.ccolor);
|
||||
grAlphaBlendFunction(cmb.abf1, cmb.abf2, GR_BLEND_ZERO, GR_BLEND_ZERO);
|
||||
gfxAlphaBlendFunction(cmb.abf1, cmb.abf2, GR_BLEND_ZERO, GR_BLEND_ZERO);
|
||||
if (!rdp.tex) //nothing more to do
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1962,7 +1962,7 @@ void set_message_combiner()
|
|||
GR_COMBINE_LOCAL_NONE,
|
||||
GR_COMBINE_OTHER_TEXTURE,
|
||||
FXFALSE);
|
||||
grAlphaBlendFunction(GR_BLEND_ONE,
|
||||
gfxAlphaBlendFunction(GR_BLEND_ONE,
|
||||
GR_BLEND_ZERO,
|
||||
GR_BLEND_ZERO,
|
||||
GR_BLEND_ZERO);
|
||||
|
|
|
@ -2514,7 +2514,7 @@ void rdp_fillrect()
|
|||
GR_COMBINE_OTHER_NONE,
|
||||
FXFALSE);
|
||||
|
||||
grAlphaBlendFunction(GR_BLEND_ONE, GR_BLEND_ZERO, GR_BLEND_ONE, GR_BLEND_ZERO);
|
||||
gfxAlphaBlendFunction(GR_BLEND_ONE, GR_BLEND_ZERO, GR_BLEND_ONE, GR_BLEND_ZERO);
|
||||
|
||||
grAlphaTestFunction(GR_CMP_ALWAYS);
|
||||
grStippleMode(GR_STIPPLE_DISABLE);
|
||||
|
@ -3143,7 +3143,7 @@ void SetWireframeCol()
|
|||
GR_COMBINE_LOCAL_ITERATED,
|
||||
GR_COMBINE_OTHER_NONE,
|
||||
FXFALSE);
|
||||
grAlphaBlendFunction(GR_BLEND_ONE,
|
||||
gfxAlphaBlendFunction(GR_BLEND_ONE,
|
||||
GR_BLEND_ZERO,
|
||||
GR_BLEND_ZERO,
|
||||
GR_BLEND_ZERO);
|
||||
|
@ -3172,7 +3172,7 @@ void SetWireframeCol()
|
|||
GR_COMBINE_OTHER_NONE,
|
||||
FXFALSE);
|
||||
gfxConstantColorValue(0xFF0000FF);
|
||||
grAlphaBlendFunction(GR_BLEND_ONE,
|
||||
gfxAlphaBlendFunction(GR_BLEND_ONE,
|
||||
GR_BLEND_ZERO,
|
||||
GR_BLEND_ZERO,
|
||||
GR_BLEND_ZERO);
|
||||
|
|
|
@ -82,7 +82,7 @@ float set_sprite_combine_mode()
|
|||
GR_COMBINE_LOCAL_NONE,
|
||||
GR_COMBINE_OTHER_TEXTURE,
|
||||
FXFALSE);
|
||||
grAlphaBlendFunction(GR_BLEND_ONE,
|
||||
gfxAlphaBlendFunction(GR_BLEND_ONE,
|
||||
GR_BLEND_ZERO,
|
||||
GR_BLEND_ZERO,
|
||||
GR_BLEND_ZERO);
|
||||
|
@ -168,7 +168,7 @@ void DrawHiresDepthImage(const DRAWIMAGE & d)
|
|||
GR_COMBINE_LOCAL_NONE,
|
||||
GR_COMBINE_OTHER_TEXTURE,
|
||||
FXFALSE);
|
||||
grAlphaBlendFunction(GR_BLEND_ONE,
|
||||
gfxAlphaBlendFunction(GR_BLEND_ONE,
|
||||
GR_BLEND_ZERO,
|
||||
GR_BLEND_ONE,
|
||||
GR_BLEND_ZERO);
|
||||
|
|
Loading…
Reference in New Issue