[Video] Remove grGetProcAddress
This commit is contained in:
parent
27ddac9f89
commit
f6915aa608
|
@ -1317,16 +1317,10 @@ static void DrawWholeFrameBufferToScreen()
|
||||||
|
|
||||||
static void GetGammaTable()
|
static void GetGammaTable()
|
||||||
{
|
{
|
||||||
char strGetGammaTableExt[] = "grGetGammaTableExt";
|
|
||||||
void (FX_CALL *grGetGammaTableExt)(FxU32, FxU32*, FxU32*, FxU32*) =
|
|
||||||
(void (FX_CALL *)(FxU32, FxU32*, FxU32*, FxU32*))grGetProcAddress(strGetGammaTableExt);
|
|
||||||
if (grGetGammaTableExt)
|
|
||||||
{
|
|
||||||
voodoo.gamma_table_r = new FxU32[voodoo.gamma_table_size];
|
voodoo.gamma_table_r = new FxU32[voodoo.gamma_table_size];
|
||||||
voodoo.gamma_table_g = new FxU32[voodoo.gamma_table_size];
|
voodoo.gamma_table_g = new FxU32[voodoo.gamma_table_size];
|
||||||
voodoo.gamma_table_b = new FxU32[voodoo.gamma_table_size];
|
voodoo.gamma_table_b = new FxU32[voodoo.gamma_table_size];
|
||||||
grGetGammaTableExt(voodoo.gamma_table_size, voodoo.gamma_table_r, voodoo.gamma_table_g, voodoo.gamma_table_b);
|
grGetGammaTableExt(voodoo.gamma_table_size, voodoo.gamma_table_r, voodoo.gamma_table_g, voodoo.gamma_table_b);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void write_png_file(const char* file_name, int width, int height, uint8_t *buffer)
|
void write_png_file(const char* file_name, int width, int height, uint8_t *buffer)
|
||||||
|
|
|
@ -615,7 +615,7 @@ grSstWinClose(GrContext_t context)
|
||||||
glDeleteFramebuffers(1, &(fbs[i].fbid));
|
glDeleteFramebuffers(1, &(fbs[i].fbid));
|
||||||
glDeleteRenderbuffers(1, &(fbs[i].zbid));
|
glDeleteRenderbuffers(1, &(fbs[i].zbid));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
nb_fb = 0;
|
nb_fb = 0;
|
||||||
|
|
||||||
|
@ -971,51 +971,6 @@ grTextureAuxBufferExt(GrChipID_t tmu,
|
||||||
|
|
||||||
FX_ENTRY void FX_CALL grAuxBufferExt(GrBuffer_t buffer);
|
FX_ENTRY void FX_CALL grAuxBufferExt(GrBuffer_t buffer);
|
||||||
|
|
||||||
FX_ENTRY GrProc FX_CALL
|
|
||||||
grGetProcAddress(char *procName)
|
|
||||||
{
|
|
||||||
WriteTrace(TraceGlitch, TraceDebug, "procName: %s", procName);
|
|
||||||
if (!strcmp(procName, "grSstWinOpenExt"))
|
|
||||||
return (GrProc)grSstWinOpenExt;
|
|
||||||
if (!strcmp(procName, "grTextureBufferExt"))
|
|
||||||
return (GrProc)grTextureBufferExt;
|
|
||||||
if (!strcmp(procName, "grChromaRangeExt"))
|
|
||||||
return (GrProc)grChromaRangeExt;
|
|
||||||
if (!strcmp(procName, "grChromaRangeModeExt"))
|
|
||||||
return (GrProc)grChromaRangeModeExt;
|
|
||||||
if (!strcmp(procName, "grTexChromaRangeExt"))
|
|
||||||
return (GrProc)grTexChromaRangeExt;
|
|
||||||
if (!strcmp(procName, "grTexChromaModeExt"))
|
|
||||||
return (GrProc)grTexChromaModeExt;
|
|
||||||
// ZIGGY framebuffer copy extension
|
|
||||||
if (!strcmp(procName, "grFramebufferCopyExt"))
|
|
||||||
return (GrProc)grFramebufferCopyExt;
|
|
||||||
if (!strcmp(procName, "grColorCombineExt"))
|
|
||||||
return (GrProc)grColorCombineExt;
|
|
||||||
if (!strcmp(procName, "grAlphaCombineExt"))
|
|
||||||
return (GrProc)grAlphaCombineExt;
|
|
||||||
if (!strcmp(procName, "grTexColorCombineExt"))
|
|
||||||
return (GrProc)grTexColorCombineExt;
|
|
||||||
if (!strcmp(procName, "grTexAlphaCombineExt"))
|
|
||||||
return (GrProc)grTexAlphaCombineExt;
|
|
||||||
if (!strcmp(procName, "grConstantColorValueExt"))
|
|
||||||
return (GrProc)grConstantColorValueExt;
|
|
||||||
if (!strcmp(procName, "grTextureAuxBufferExt"))
|
|
||||||
return (GrProc)grTextureAuxBufferExt;
|
|
||||||
if (!strcmp(procName, "grAuxBufferExt"))
|
|
||||||
return (GrProc)grAuxBufferExt;
|
|
||||||
if (!strcmp(procName, "grConfigWrapperExt"))
|
|
||||||
return (GrProc)grConfigWrapperExt;
|
|
||||||
if (!strcmp(procName, "grKeyPressedExt"))
|
|
||||||
return (GrProc)grKeyPressedExt;
|
|
||||||
if (!strcmp(procName, "grQueryResolutionsExt"))
|
|
||||||
return (GrProc)grQueryResolutionsExt;
|
|
||||||
if (!strcmp(procName, "grGetGammaTableExt"))
|
|
||||||
return (GrProc)grGetGammaTableExt;
|
|
||||||
WriteTrace(TraceGlitch, TraceWarning, "grGetProcAddress : %s", procName);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
FX_ENTRY FxU32 FX_CALL
|
FX_ENTRY FxU32 FX_CALL
|
||||||
grGet(FxU32 pname, FxU32 plength, FxI32 *params)
|
grGet(FxU32 pname, FxU32 plength, FxI32 *params)
|
||||||
{
|
{
|
||||||
|
@ -1131,7 +1086,7 @@ grGet(FxU32 pname, FxU32 plength, FxI32 *params)
|
||||||
WriteTrace(TraceGlitch, TraceWarning, "unknown pname in grGet : %x", pname);
|
WriteTrace(TraceGlitch, TraceWarning, "unknown pname in grGet : %x", pname);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
FX_ENTRY const char * FX_CALL
|
FX_ENTRY const char * FX_CALL
|
||||||
grGetString(FxU32 pname)
|
grGetString(FxU32 pname)
|
||||||
|
@ -1591,7 +1546,7 @@ grBufferSwap(FxU32 swap_interval)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1853,7 +1808,7 @@ grLfbWriteRegion(GrBuffer_t dst_buffer,
|
||||||
dst_x, dst_y,
|
dst_x, dst_y,
|
||||||
src_width, src_height,
|
src_width, src_height,
|
||||||
tex_width, tex_height, +1);
|
tex_width, tex_height, +1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
float *buf = (float*)malloc(src_width*(src_height + (g_viewport_offset)) * sizeof(float));
|
float *buf = (float*)malloc(src_width*(src_height + (g_viewport_offset)) * sizeof(float));
|
||||||
|
|
|
@ -1244,53 +1244,6 @@ grTextureAuxBufferExt(GrChipID_t tmu,
|
||||||
|
|
||||||
FX_ENTRY void FX_CALL grAuxBufferExt(GrBuffer_t buffer);
|
FX_ENTRY void FX_CALL grAuxBufferExt(GrBuffer_t buffer);
|
||||||
|
|
||||||
FX_ENTRY GrProc FX_CALL
|
|
||||||
grGetProcAddress(char *procName)
|
|
||||||
{
|
|
||||||
WriteTrace(TraceGlitch, TraceDebug, "procName: %s", procName);
|
|
||||||
if (!strcmp(procName, "grSstWinOpenExt"))
|
|
||||||
return (GrProc)grSstWinOpenExt;
|
|
||||||
if (!strcmp(procName, "grTextureBufferExt"))
|
|
||||||
return (GrProc)grTextureBufferExt;
|
|
||||||
if (!strcmp(procName, "grChromaRangeExt"))
|
|
||||||
return (GrProc)grChromaRangeExt;
|
|
||||||
if (!strcmp(procName, "grChromaRangeModeExt"))
|
|
||||||
return (GrProc)grChromaRangeModeExt;
|
|
||||||
if (!strcmp(procName, "grTexChromaRangeExt"))
|
|
||||||
return (GrProc)grTexChromaRangeExt;
|
|
||||||
if (!strcmp(procName, "grTexChromaModeExt"))
|
|
||||||
return (GrProc)grTexChromaModeExt;
|
|
||||||
// ZIGGY framebuffer copy extension
|
|
||||||
if (!strcmp(procName, "grFramebufferCopyExt"))
|
|
||||||
return (GrProc)grFramebufferCopyExt;
|
|
||||||
if (!strcmp(procName, "grColorCombineExt"))
|
|
||||||
return (GrProc)grColorCombineExt;
|
|
||||||
if (!strcmp(procName, "grAlphaCombineExt"))
|
|
||||||
return (GrProc)grAlphaCombineExt;
|
|
||||||
if (!strcmp(procName, "grTexColorCombineExt"))
|
|
||||||
return (GrProc)grTexColorCombineExt;
|
|
||||||
if (!strcmp(procName, "grTexAlphaCombineExt"))
|
|
||||||
return (GrProc)grTexAlphaCombineExt;
|
|
||||||
if (!strcmp(procName, "grConstantColorValueExt"))
|
|
||||||
return (GrProc)grConstantColorValueExt;
|
|
||||||
if (!strcmp(procName, "grTextureAuxBufferExt"))
|
|
||||||
return (GrProc)grTextureAuxBufferExt;
|
|
||||||
if (!strcmp(procName, "grAuxBufferExt"))
|
|
||||||
return (GrProc)grAuxBufferExt;
|
|
||||||
if (!strcmp(procName, "grWrapperFullScreenResolutionExt"))
|
|
||||||
return (GrProc)grWrapperFullScreenResolutionExt;
|
|
||||||
if (!strcmp(procName, "grConfigWrapperExt"))
|
|
||||||
return (GrProc)grConfigWrapperExt;
|
|
||||||
if (!strcmp(procName, "grKeyPressedExt"))
|
|
||||||
return (GrProc)grKeyPressedExt;
|
|
||||||
if (!strcmp(procName, "grQueryResolutionsExt"))
|
|
||||||
return (GrProc)grQueryResolutionsExt;
|
|
||||||
if (!strcmp(procName, "grGetGammaTableExt"))
|
|
||||||
return (GrProc)grGetGammaTableExt;
|
|
||||||
WriteTrace(TraceGlitch, TraceWarning, "grGetProcAddress : %s", procName);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
FX_ENTRY FxU32 FX_CALL
|
FX_ENTRY FxU32 FX_CALL
|
||||||
grGet(FxU32 pname, FxU32 plength, FxI32 *params)
|
grGet(FxU32 pname, FxU32 plength, FxI32 *params)
|
||||||
{
|
{
|
||||||
|
@ -2126,7 +2079,7 @@ grLfbWriteRegion(GrBuffer_t dst_buffer,
|
||||||
|
|
||||||
grDisplayGLError("grLfbWriteRegion");
|
grDisplayGLError("grLfbWriteRegion");
|
||||||
return FXTRUE;
|
return FXTRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* wrapper-specific glide extensions */
|
/* wrapper-specific glide extensions */
|
||||||
|
|
||||||
|
@ -2451,7 +2404,7 @@ grGetGammaTableExt(FxU32 /*nentries*/, FxU32 *red, FxU32 *green, FxU32 *blue)
|
||||||
blue[i] = aGammaRamp[2][i] >> 8;
|
blue[i] = aGammaRamp[2][i] >> 8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FX_ENTRY void FX_CALL
|
FX_ENTRY void FX_CALL
|
||||||
guGammaCorrectionRGB(FxFloat gammaR, FxFloat gammaG, FxFloat gammaB)
|
guGammaCorrectionRGB(FxFloat gammaR, FxFloat gammaG, FxFloat gammaB)
|
||||||
|
@ -2466,7 +2419,7 @@ guGammaCorrectionRGB(FxFloat gammaR, FxFloat gammaG, FxFloat gammaB)
|
||||||
aGammaRamp[2][i] = (((FxU16)((pow(i / 255.0F, 1.0F / gammaB)) * 255.0F + 0.5F)) << 8) & 0xFFFF;
|
aGammaRamp[2][i] = (((FxU16)((pow(i / 255.0F, 1.0F / gammaB)) * 255.0F + 0.5F)) << 8) & 0xFFFF;
|
||||||
}
|
}
|
||||||
CorrectGamma(aGammaRamp);
|
CorrectGamma(aGammaRamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
FX_ENTRY void FX_CALL
|
FX_ENTRY void FX_CALL
|
||||||
grDitherMode(GrDitherMode_t /*mode*/)
|
grDitherMode(GrDitherMode_t /*mode*/)
|
||||||
|
|
Loading…
Reference in New Issue