[Glide64] Change display_warning to WriteTrace
This commit is contained in:
parent
89162c784e
commit
9b39879a32
|
@ -1407,7 +1407,6 @@ output: none
|
|||
*******************************************************************/
|
||||
void CALL GetDllInfo(PLUGIN_INFO * PluginInfo)
|
||||
{
|
||||
WriteTrace(TraceGlide64, TraceDebug, "-");
|
||||
PluginInfo->Version = 0x0104; // Set to 0x0104
|
||||
PluginInfo->Type = PLUGIN_TYPE_GFX; // Set to PLUGIN_TYPE_GFX
|
||||
#ifdef _DEBUG
|
||||
|
|
|
@ -42,6 +42,18 @@
|
|||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="OGLcombiner.cpp" />
|
||||
<ClCompile Include="OGLEScombiner.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="OGLESgeometry.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="OGLESglitchmain.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="OGLEStextures.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="OGLgeometry.cpp" />
|
||||
<ClCompile Include="OGLglitchmain.cpp" />
|
||||
<ClCompile Include="OGLtextures.cpp" />
|
||||
|
|
|
@ -23,6 +23,18 @@
|
|||
<ClCompile Include="OGLtextures.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="OGLEScombiner.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="OGLESgeometry.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="OGLESglitchmain.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="OGLEStextures.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="glitchmain.h">
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -173,7 +173,7 @@ grCoordinateSpace( GrCoordinateSpaceMode_t mode )
|
|||
case GR_WINDOW_COORDS:
|
||||
break;
|
||||
default:
|
||||
display_warning("unknwown coordinate space : %x", mode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknwown coordinate space : %x", mode);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -212,7 +212,7 @@ grVertexLayout(FxU32 param, FxI32 offset, FxU32 mode)
|
|||
st1_off = offset;
|
||||
break;
|
||||
default:
|
||||
display_warning("unknown grVertexLayout parameter : %x", param);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown grVertexLayout parameter : %x", param);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -246,7 +246,7 @@ grCullMode( GrCullMode_t mode )
|
|||
glEnable(GL_CULL_FACE);
|
||||
break;
|
||||
default:
|
||||
display_warning("unknown cull mode : %x", mode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown cull mode : %x", mode);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -273,7 +273,7 @@ grDepthBufferMode( GrDepthBufferMode_t mode )
|
|||
w_buffer_mode = 0;
|
||||
break;
|
||||
default:
|
||||
display_warning("unknown depth buffer mode : %x", mode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown depth buffer mode : %x", mode);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -321,7 +321,7 @@ grDepthBufferFunction( GrCmpFnc_t function )
|
|||
break;
|
||||
|
||||
default:
|
||||
display_warning("unknown depth buffer function : %x", function);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown depth buffer function : %x", function);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -600,7 +600,7 @@ grDrawVertexArray(FxU32 mode, FxU32 Count, void *pointers2)
|
|||
|
||||
if(mode != GR_TRIANGLE_FAN)
|
||||
{
|
||||
display_warning("grDrawVertexArray : unknown mode : %x", mode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grDrawVertexArray : unknown mode : %x", mode);
|
||||
}
|
||||
|
||||
vbo_enable();
|
||||
|
@ -638,6 +638,6 @@ grDrawVertexArrayContiguous(FxU32 mode, FxU32 Count, void *pointers, FxU32 strid
|
|||
vbo_buffer(GL_TRIANGLE_FAN,0,Count,pointers);
|
||||
break;
|
||||
default:
|
||||
display_warning("grDrawVertexArrayContiguous : unknown mode : %x", mode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grDrawVertexArrayContiguous : unknown mode : %x", mode);
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -183,7 +183,7 @@ grTexTextureMemRequired( FxU32 evenOdd,
|
|||
{
|
||||
int width, height;
|
||||
LOG("grTextureMemRequired(%d)\r\n", evenOdd);
|
||||
if (info->largeLodLog2 != info->smallLodLog2) display_warning("grTexTextureMemRequired : loading more than one LOD");
|
||||
if (info->largeLodLog2 != info->smallLodLog2) WriteTrace(TraceGlitch, TraceWarning, "grTexTextureMemRequired : loading more than one LOD");
|
||||
|
||||
if (info->aspectRatioLog2 < 0)
|
||||
{
|
||||
|
@ -221,7 +221,7 @@ grTexTextureMemRequired( FxU32 evenOdd,
|
|||
case GR_TEXFMT_ARGB_CMP_FXT1:
|
||||
return ((((width+0x7)&~0x7)*((height+0x3)&~0x3))>>1);
|
||||
default:
|
||||
display_warning("grTexTextureMemRequired : unknown texture format: %x", info->format);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexTextureMemRequired : unknown texture format: %x", info->format);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -233,7 +233,7 @@ grTexCalcMemRequired(
|
|||
{
|
||||
int width, height;
|
||||
LOG("grTexCalcMemRequired(%d, %d, %d, %d)\r\n", lodmin, lodmax, aspect, fmt);
|
||||
if (lodmax != lodmin) display_warning("grTexCalcMemRequired : loading more than one LOD");
|
||||
if (lodmax != lodmin) WriteTrace(TraceGlitch, TraceWarning, "grTexCalcMemRequired : loading more than one LOD");
|
||||
|
||||
if (aspect < 0)
|
||||
{
|
||||
|
@ -271,7 +271,7 @@ grTexCalcMemRequired(
|
|||
case GR_TEXFMT_ARGB_CMP_FXT1:
|
||||
return ((((width+0x7)&~0x7)*((height+0x3)&~0x3))>>1);
|
||||
default:
|
||||
display_warning("grTexTextureMemRequired : unknown texture format: %x", fmt);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexTextureMemRequired : unknown texture format: %x", fmt);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -315,7 +315,7 @@ int grTexFormatSize(int fmt)
|
|||
factor = 8;
|
||||
break;
|
||||
default:
|
||||
display_warning("grTexFormatSize : unknown texture format: %x", fmt);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexFormatSize : unknown texture format: %x", fmt);
|
||||
}
|
||||
return factor;
|
||||
}
|
||||
|
@ -401,7 +401,7 @@ int grTexFormat2GLPackedFmt(int fmt, int * gltexfmt, int * glpixfmt, int * glpac
|
|||
*glpackfmt = GL_COMPRESSED_RGBA_FXT1_3DFX; // XXX: what should we do about GL_COMPRESSED_RGB_FXT1_3DFX?
|
||||
break;
|
||||
default:
|
||||
display_warning("grTexFormat2GLPackedFmt : unknown texture format: %x", fmt);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexFormat2GLPackedFmt : unknown texture format: %x", fmt);
|
||||
}
|
||||
return factor;
|
||||
*/
|
||||
|
@ -418,7 +418,7 @@ grTexDownloadMipMap( GrChipID_t tmu,
|
|||
int glformat = 0;
|
||||
int gltexfmt, glpixfmt, glpackfmt;
|
||||
LOG("grTexDownloadMipMap(%d,%d,%d)\r\n", tmu, startAddress, evenOdd);
|
||||
if (info->largeLodLog2 != info->smallLodLog2) display_warning("grTexDownloadMipMap : loading more than one LOD");
|
||||
if (info->largeLodLog2 != info->smallLodLog2) WriteTrace(TraceGlitch, TraceWarning, "grTexDownloadMipMap : loading more than one LOD");
|
||||
|
||||
if (info->aspectRatioLog2 < 0)
|
||||
{
|
||||
|
@ -622,7 +622,7 @@ grTexDownloadMipMap( GrChipID_t tmu,
|
|||
break;
|
||||
*/
|
||||
default:
|
||||
display_warning("grTexDownloadMipMap : unknown texture format: %x", info->format);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexDownloadMipMap : unknown texture format: %x", info->format);
|
||||
factor = 0;
|
||||
}
|
||||
}
|
||||
|
@ -767,14 +767,14 @@ grTexDetailControl(
|
|||
{
|
||||
if (!lod_bias && !detail_scale && !detail_max) return;
|
||||
else
|
||||
display_warning("grTexDetailControl : %d, %d, %f", lod_bias, detail_scale, detail_max);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexDetailControl : %d, %d, %f", lod_bias, detail_scale, detail_max);
|
||||
}
|
||||
lambda = detail_max;
|
||||
if(lambda > 1.0f)
|
||||
{
|
||||
lambda = 1.0f - (255.0f - lambda);
|
||||
}
|
||||
if(lambda > 1.0f) display_warning("lambda:%f", lambda);
|
||||
if(lambda > 1.0f) WriteTrace(TraceGlitch, TraceWarning, "lambda:%f", lambda);
|
||||
|
||||
set_lambda();
|
||||
}
|
||||
|
@ -843,7 +843,7 @@ grTexClampMode(
|
|||
wrap_s0 = GL_MIRRORED_REPEAT;
|
||||
break;
|
||||
default:
|
||||
display_warning("grTexClampMode : unknown s_clampmode : %x", s_clampmode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexClampMode : unknown s_clampmode : %x", s_clampmode);
|
||||
}
|
||||
switch(t_clampmode)
|
||||
{
|
||||
|
@ -857,7 +857,7 @@ grTexClampMode(
|
|||
wrap_t0 = GL_MIRRORED_REPEAT;
|
||||
break;
|
||||
default:
|
||||
display_warning("grTexClampMode : unknown t_clampmode : %x", t_clampmode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexClampMode : unknown t_clampmode : %x", t_clampmode);
|
||||
}
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, wrap_s0);
|
||||
|
@ -877,7 +877,7 @@ grTexClampMode(
|
|||
wrap_s1 = GL_MIRRORED_REPEAT;
|
||||
break;
|
||||
default:
|
||||
display_warning("grTexClampMode : unknown s_clampmode : %x", s_clampmode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexClampMode : unknown s_clampmode : %x", s_clampmode);
|
||||
}
|
||||
switch(t_clampmode)
|
||||
{
|
||||
|
@ -891,7 +891,7 @@ grTexClampMode(
|
|||
wrap_t1 = GL_MIRRORED_REPEAT;
|
||||
break;
|
||||
default:
|
||||
display_warning("grTexClampMode : unknown t_clampmode : %x", t_clampmode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexClampMode : unknown t_clampmode : %x", t_clampmode);
|
||||
}
|
||||
glActiveTexture(GL_TEXTURE1);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, wrap_s1);
|
||||
|
|
|
@ -243,11 +243,11 @@ void init_combiner()
|
|||
if (!log_length)
|
||||
{
|
||||
glGetInfoLogARB(fragment_shader_object, 2048, &log_length, shader_log);
|
||||
if (log_length) display_warning(shader_log);
|
||||
if (log_length) WriteTrace(TraceGlitch, TraceWarning, shader_log);
|
||||
glGetInfoLogARB(vertex_shader_object, 2048, &log_length, shader_log);
|
||||
if (log_length) display_warning(shader_log);
|
||||
if (log_length) WriteTrace(TraceGlitch, TraceWarning, shader_log);
|
||||
glGetInfoLogARB(program_object, 2048, &log_length, shader_log);
|
||||
if (log_length) display_warning(shader_log);
|
||||
if (log_length) WriteTrace(TraceGlitch, TraceWarning, shader_log);
|
||||
}
|
||||
|
||||
texture0_location = glGetUniformLocationARB(program_object, "texture0");
|
||||
|
@ -267,11 +267,11 @@ void init_combiner()
|
|||
if (!log_length)
|
||||
{
|
||||
glGetInfoLogARB(fragment_shader_object, 2048, &log_length, shader_log);
|
||||
if (log_length) display_warning(shader_log);
|
||||
if (log_length) WriteTrace(TraceGlitch, TraceWarning, shader_log);
|
||||
glGetInfoLogARB(vertex_shader_object, 2048, &log_length, shader_log);
|
||||
if (log_length) display_warning(shader_log);
|
||||
if (log_length) WriteTrace(TraceGlitch, TraceWarning, shader_log);
|
||||
glGetInfoLogARB(program_object, 2048, &log_length, shader_log);
|
||||
if (log_length) display_warning(shader_log);
|
||||
if (log_length) WriteTrace(TraceGlitch, TraceWarning, shader_log);
|
||||
}
|
||||
|
||||
texture0_location = glGetUniformLocationARB(program_object, "texture0");
|
||||
|
@ -314,7 +314,7 @@ void compile_chroma_shader()
|
|||
strcat(fragment_shader_chroma, "float alpha = constant_color.a; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("unknown compile_choma_shader_alpha : %x", chroma_other_alpha);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown compile_choma_shader_alpha : %x", chroma_other_alpha);
|
||||
}
|
||||
|
||||
switch (chroma_other_color)
|
||||
|
@ -329,7 +329,7 @@ void compile_chroma_shader()
|
|||
strcat(fragment_shader_chroma, "vec4 color = vec4(vec3(constant_color),alpha); \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("unknown compile_choma_shader_alpha : %x", chroma_other_color);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown compile_choma_shader_alpha : %x", chroma_other_color);
|
||||
}
|
||||
|
||||
strcat(fragment_shader_chroma, "if (color.rgb == chroma_color.rgb) discard; \n");
|
||||
|
@ -487,12 +487,12 @@ void compile_shader()
|
|||
{
|
||||
glGetInfoLogARB(shader_programs[number_of_programs].fragment_shader_object,
|
||||
2048, &log_length, shader_log);
|
||||
if (log_length) display_warning(shader_log);
|
||||
if (log_length) WriteTrace(TraceGlitch, TraceWarning, shader_log);
|
||||
glGetInfoLogARB(vertex_shader_object, 2048, &log_length, shader_log);
|
||||
if (log_length) display_warning(shader_log);
|
||||
if (log_length) WriteTrace(TraceGlitch, TraceWarning, shader_log);
|
||||
glGetInfoLogARB(program_object,
|
||||
2048, &log_length, shader_log);
|
||||
if (log_length) display_warning(shader_log);
|
||||
if (log_length) WriteTrace(TraceGlitch, TraceWarning, shader_log);
|
||||
}
|
||||
|
||||
texture0_location = glGetUniformLocationARB(program_object, "texture0");
|
||||
|
@ -582,7 +582,7 @@ grConstantColorValue(GrColor_t value)
|
|||
texture_env_color[3] = (value & 0xFF) / 255.0f;
|
||||
break;
|
||||
default:
|
||||
display_warning("grConstantColorValue: unknown color format : %x", lfb_color_fmt);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grConstantColorValue: unknown color format : %x", lfb_color_fmt);
|
||||
}
|
||||
|
||||
constant_color_location = glGetUniformLocationARB(program_object, "constant_color");
|
||||
|
@ -606,7 +606,7 @@ int setOtherColorSource(int other)
|
|||
return GL_CONSTANT_ARB;
|
||||
break;
|
||||
default:
|
||||
display_warning("unknwown other color source : %x", other);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown other color source : %x", other);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -622,7 +622,7 @@ int setLocalColorSource(int local)
|
|||
return GL_CONSTANT_ARB;
|
||||
break;
|
||||
default:
|
||||
display_warning("unknwown local color source : %x", local);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown local color source : %x", local);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -641,7 +641,7 @@ void writeGLSLColorOther(int other)
|
|||
strcat(fragment_shader_color_combiner, "vec4 color_other = constant_color; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("unknown writeGLSLColorOther : %x", other);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown writeGLSLColorOther : %x", other);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -656,7 +656,7 @@ void writeGLSLColorLocal(int local)
|
|||
strcat(fragment_shader_color_combiner, "vec4 color_local = constant_color; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("unknown writeGLSLColorLocal : %x", local);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown writeGLSLColorLocal : %x", local);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -704,7 +704,7 @@ void writeGLSLColorFactor(int factor, int local, int need_local, int other, int
|
|||
strcat(fragment_shader_color_combiner, "vec4 color_factor = vec4(1.0) - vec4(ctexture1.a); \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("unknown writeGLSLColorFactor : %x", factor);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown writeGLSLColorFactor : %x", factor);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -731,7 +731,7 @@ FxBool invert)
|
|||
last_local = local;
|
||||
last_other = other;
|
||||
|
||||
if (invert) display_warning("grColorCombine : inverted result");
|
||||
if (invert) WriteTrace(TraceGlitch, TraceWarning, "inverted result");
|
||||
|
||||
color_combiner_key = function | (factor << 4) | (local << 8) | (other << 10);
|
||||
chroma_other_color = other;
|
||||
|
@ -797,7 +797,7 @@ FxBool invert)
|
|||
break;
|
||||
default:
|
||||
strcpy(fragment_shader_color_combiner, fragment_shader_default);
|
||||
display_warning("grColorCombine : unknown function : %x", function);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown function : %x", function);
|
||||
}
|
||||
//compile_shader();
|
||||
need_to_compile = 1;
|
||||
|
@ -817,7 +817,7 @@ int setOtherAlphaSource(int other)
|
|||
return GL_CONSTANT_ARB;
|
||||
break;
|
||||
default:
|
||||
display_warning("unknwown other alpha source : %x", other);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknwown other alpha source : %x", other);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -833,7 +833,7 @@ int setLocalAlphaSource(int local)
|
|||
return GL_CONSTANT_ARB;
|
||||
break;
|
||||
default:
|
||||
display_warning("unknwown local alpha source : %x", local);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknwown local alpha source : %x", local);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -852,7 +852,7 @@ void writeGLSLAlphaOther(int other)
|
|||
strcat(fragment_shader_alpha_combiner, "float alpha_other = constant_color.a; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("unknown writeGLSLAlphaOther : %x", other);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown writeGLSLAlphaOther : %x", other);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -867,7 +867,7 @@ void writeGLSLAlphaLocal(int local)
|
|||
strcat(fragment_shader_alpha_combiner, "float alpha_local = constant_color.a; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("unknown writeGLSLAlphaLocal : %x", local);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown writeGLSLAlphaLocal : %x", local);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -912,7 +912,7 @@ void writeGLSLAlphaFactor(int factor, int local, int need_local, int other, int
|
|||
strcat(fragment_shader_alpha_combiner, "float alpha_factor = 1.0 - ctexture1.a; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("unknown writeGLSLAlphaFactor : %x", factor);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown writeGLSLAlphaFactor : %x", factor);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -939,7 +939,7 @@ FxBool invert
|
|||
last_local = local;
|
||||
last_other = other;
|
||||
|
||||
if (invert) display_warning("grAlphaCombine : inverted result");
|
||||
if (invert) WriteTrace(TraceGlitch, TraceWarning, "inverted result");
|
||||
|
||||
alpha_combiner_key = function | (factor << 4) | (local << 8) | (other << 10);
|
||||
chroma_other_alpha = other;
|
||||
|
@ -1005,7 +1005,7 @@ FxBool invert
|
|||
strcat(fragment_shader_alpha_combiner, "gl_FragColor.a = alpha_factor * (-alpha_local) + alpha_local; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("grAlphaCombine : unknown function : %x", function);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown function : %x", function);
|
||||
}
|
||||
|
||||
//compile_shader();
|
||||
|
@ -1077,7 +1077,7 @@ void writeGLSLTextureColorFactor(int num_tex, int factor)
|
|||
strcat(fragment_shader_texture1, "vec4 texture1_color_factor = vec4(1.0) - vec4(lambda); \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("unknown writeGLSLTextureColorFactor : %x", factor);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown writeGLSLTextureColorFactor : %x", factor);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1146,7 +1146,7 @@ void writeGLSLTextureAlphaFactor(int num_tex, int factor)
|
|||
strcat(fragment_shader_texture1, "float texture1_alpha_factor = 1.0 - lambda; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("unknown writeGLSLTextureAlphaFactor : %x", factor);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown writeGLSLTextureAlphaFactor : %x", factor);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1300,7 +1300,7 @@ FxBool alpha_invert
|
|||
strcat(fragment_shader_texture0, "vec4 ctexture0 = readtex0; \n");
|
||||
else
|
||||
strcat(fragment_shader_texture1, "vec4 ctexture1 = readtex1; \n");
|
||||
display_warning("grTextCombine : unknown rgb function : %x", rgb_function);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTextCombine : unknown rgb function : %x", rgb_function);
|
||||
}
|
||||
|
||||
if (rgb_invert)
|
||||
|
@ -1392,7 +1392,7 @@ FxBool alpha_invert
|
|||
strcat(fragment_shader_texture0, "ctexture0.a = readtex0.a; \n");
|
||||
else
|
||||
strcat(fragment_shader_texture1, "ctexture1.a = ctexture0.a; \n");
|
||||
display_warning("grTextCombine : unknown alpha function : %x", alpha_function);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTextCombine : unknown alpha function : %x", alpha_function);
|
||||
}
|
||||
|
||||
if (alpha_invert)
|
||||
|
@ -1429,7 +1429,7 @@ GrAlphaBlendFnc_t alpha_sf, GrAlphaBlendFnc_t alpha_df
|
|||
sfactorRGB = GL_ONE_MINUS_SRC_ALPHA;
|
||||
break;
|
||||
default:
|
||||
display_warning("grAlphaBlendFunction : rgb_sf = %x", rgb_sf);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grAlphaBlendFunction : rgb_sf = %x", rgb_sf);
|
||||
}
|
||||
|
||||
switch (rgb_df)
|
||||
|
@ -1447,7 +1447,7 @@ GrAlphaBlendFnc_t alpha_sf, GrAlphaBlendFnc_t alpha_df
|
|||
dfactorRGB = GL_ONE_MINUS_SRC_ALPHA;
|
||||
break;
|
||||
default:
|
||||
display_warning("grAlphaBlendFunction : rgb_df = %x", rgb_df);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grAlphaBlendFunction : rgb_df = %x", rgb_df);
|
||||
}
|
||||
|
||||
switch (alpha_sf)
|
||||
|
@ -1459,7 +1459,7 @@ GrAlphaBlendFnc_t alpha_sf, GrAlphaBlendFnc_t alpha_df
|
|||
sfactorAlpha = GL_ONE;
|
||||
break;
|
||||
default:
|
||||
display_warning("grAlphaBlendFunction : alpha_sf = %x", alpha_sf);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grAlphaBlendFunction : alpha_sf = %x", alpha_sf);
|
||||
}
|
||||
|
||||
switch (alpha_df)
|
||||
|
@ -1471,7 +1471,7 @@ GrAlphaBlendFnc_t alpha_sf, GrAlphaBlendFnc_t alpha_df
|
|||
dfactorAlpha = GL_ONE;
|
||||
break;
|
||||
default:
|
||||
display_warning("grAlphaBlendFunction : alpha_df = %x", alpha_df);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grAlphaBlendFunction : alpha_df = %x", alpha_df);
|
||||
}
|
||||
glEnable(GL_BLEND);
|
||||
if (blend_func_separate_support)
|
||||
|
@ -1510,7 +1510,7 @@ grAlphaTestFunction(GrCmpFnc_t function)
|
|||
return;
|
||||
break;
|
||||
default:
|
||||
display_warning("grAlphaTestFunction : unknown function : %x", function);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown function : %x", function);
|
||||
}
|
||||
|
||||
glEnable(GL_ALPHA_TEST);
|
||||
|
@ -1540,7 +1540,7 @@ grFogMode(GrFogMode_t mode)
|
|||
fog_enabled = 2;
|
||||
break;
|
||||
default:
|
||||
display_warning("grFogMode : unknown mode : %x", mode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown mode : %x", mode);
|
||||
}
|
||||
need_to_compile = 1;
|
||||
|
||||
|
@ -1594,7 +1594,7 @@ grFogColorValue(GrColor_t fogcolor)
|
|||
color[3] = (fogcolor & 0xFF) / 255.0f;
|
||||
break;
|
||||
default:
|
||||
display_warning("grFogColorValue: unknown color format : %x", lfb_color_fmt);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown color format : %x", lfb_color_fmt);
|
||||
}
|
||||
|
||||
glFogfv(GL_FOG_COLOR, color);
|
||||
|
@ -1616,7 +1616,7 @@ grChromakeyMode(GrChromakeyMode_t mode)
|
|||
chroma_enabled = 1;
|
||||
break;
|
||||
default:
|
||||
display_warning("grChromakeyMode : unknown mode : %x", mode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown mode : %x", mode);
|
||||
}
|
||||
need_to_compile = 1;
|
||||
}
|
||||
|
@ -1642,7 +1642,7 @@ grChromakeyValue(GrColor_t value)
|
|||
chroma_color[3] = 1.0;//(value & 0xFF) / 255.0f;
|
||||
break;
|
||||
default:
|
||||
display_warning("grChromakeyValue: unknown color format : %x", lfb_color_fmt);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grChromakeyValue: unknown color format : %x", lfb_color_fmt);
|
||||
}
|
||||
|
||||
chroma_color_location = glGetUniformLocationARB(program_object, "chroma_color");
|
||||
|
@ -1723,7 +1723,7 @@ grStippleMode(GrStippleMode_t mode)
|
|||
glEnable(GL_TEXTURE_2D);
|
||||
break;
|
||||
default:
|
||||
display_warning("grStippleMode:%x", mode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grStippleMode:%x", mode);
|
||||
}
|
||||
|
||||
need_to_compile = 1;
|
||||
|
@ -1738,8 +1738,8 @@ GrCCUColor_t d, FxBool d_invert,
|
|||
FxU32 shift, FxBool invert)
|
||||
{
|
||||
WriteTrace(TraceResolution, TraceDebug, "a: %d a_mode: %d b: %d b_mode: %d c: %d c_invert: %d d: %d d_invert: %d shift: %d invert: %d", a, a_mode, b, b_mode, c, c_invert, d, d_invert, shift, invert);
|
||||
if (invert) display_warning("grColorCombineExt : inverted result");
|
||||
if (shift) display_warning("grColorCombineExt : shift = %d", shift);
|
||||
if (invert) WriteTrace(TraceGlitch, TraceWarning, "grColorCombineExt : inverted result");
|
||||
if (shift) WriteTrace(TraceGlitch, TraceWarning, "grColorCombineExt : shift = %d", shift);
|
||||
|
||||
color_combiner_key = 0x80000000 | (a & 0x1F) | ((a_mode & 3) << 5) |
|
||||
((b & 0x1F) << 7) | ((b_mode & 3) << 12) |
|
||||
|
@ -1772,7 +1772,7 @@ FxU32 shift, FxBool invert)
|
|||
strcat(fragment_shader_color_combiner, "vec4 cs_a = ctexture1; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("grColorCombineExt : a = %x", a);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grColorCombineExt : a = %x", a);
|
||||
strcat(fragment_shader_color_combiner, "vec4 cs_a = vec4(0.0); \n");
|
||||
}
|
||||
|
||||
|
@ -1791,7 +1791,7 @@ FxU32 shift, FxBool invert)
|
|||
strcat(fragment_shader_color_combiner, "vec4 c_a = -cs_a; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("grColorCombineExt : a_mode = %x", a_mode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "a_mode = %x", a_mode);
|
||||
strcat(fragment_shader_color_combiner, "vec4 c_a = vec4(0.0); \n");
|
||||
}
|
||||
|
||||
|
@ -1819,7 +1819,7 @@ FxU32 shift, FxBool invert)
|
|||
strcat(fragment_shader_color_combiner, "vec4 cs_b = ctexture1; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("grColorCombineExt : b = %x", b);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grColorCombineExt : b = %x", b);
|
||||
strcat(fragment_shader_color_combiner, "vec4 cs_b = vec4(0.0); \n");
|
||||
}
|
||||
|
||||
|
@ -1838,7 +1838,7 @@ FxU32 shift, FxBool invert)
|
|||
strcat(fragment_shader_color_combiner, "vec4 c_b = -cs_b; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("grColorCombineExt : b_mode = %x", b_mode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grColorCombineExt : b_mode = %x", b_mode);
|
||||
strcat(fragment_shader_color_combiner, "vec4 c_b = vec4(0.0); \n");
|
||||
}
|
||||
|
||||
|
@ -1875,7 +1875,7 @@ FxU32 shift, FxBool invert)
|
|||
strcat(fragment_shader_color_combiner, "vec4 c_c = ctexture1; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("grColorCombineExt : c = %x", c);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grColorCombineExt : c = %x", c);
|
||||
strcat(fragment_shader_color_combiner, "vec4 c_c = vec4(0.0); \n");
|
||||
}
|
||||
|
||||
|
@ -1900,7 +1900,7 @@ FxU32 shift, FxBool invert)
|
|||
strcat(fragment_shader_color_combiner, "vec4 c_d = gl_Color; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("grColorCombineExt : d = %x", d);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grColorCombineExt : d = %x", d);
|
||||
strcat(fragment_shader_color_combiner, "vec4 c_d = vec4(0.0); \n");
|
||||
}
|
||||
|
||||
|
@ -1920,8 +1920,8 @@ GrACUColor_t d, FxBool d_invert,
|
|||
FxU32 shift, FxBool invert)
|
||||
{
|
||||
WriteTrace(TraceResolution, TraceDebug, "a: %d a_mode: %d b: %d b_mode: %d c: %d c_invert: %d d: %d d_invert: %d shift: %d invert: %d", a, a_mode, b, b_mode, c, c_invert, d, d_invert, shift, invert);
|
||||
if (invert) display_warning("grAlphaCombineExt : inverted result");
|
||||
if (shift) display_warning("grAlphaCombineExt : shift = %d", shift);
|
||||
if (invert) WriteTrace(TraceGlitch, TraceWarning, "grAlphaCombineExt : inverted result");
|
||||
if (shift) WriteTrace(TraceGlitch, TraceWarning, "grAlphaCombineExt : shift = %d", shift);
|
||||
|
||||
alpha_combiner_key = 0x80000000 | (a & 0x1F) | ((a_mode & 3) << 5) |
|
||||
((b & 0x1F) << 7) | ((b_mode & 3) << 12) |
|
||||
|
@ -1945,7 +1945,7 @@ FxU32 shift, FxBool invert)
|
|||
strcat(fragment_shader_alpha_combiner, "float as_a = gl_Color.a; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("grAlphaCombineExt : a = %x", a);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grAlphaCombineExt : a = %x", a);
|
||||
strcat(fragment_shader_alpha_combiner, "float as_a = 0.0; \n");
|
||||
}
|
||||
|
||||
|
@ -1964,7 +1964,7 @@ FxU32 shift, FxBool invert)
|
|||
strcat(fragment_shader_alpha_combiner, "float a_a = -as_a; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("grAlphaCombineExt : a_mode = %x", a_mode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grAlphaCombineExt : a_mode = %x", a_mode);
|
||||
strcat(fragment_shader_alpha_combiner, "float a_a = 0.0; \n");
|
||||
}
|
||||
|
||||
|
@ -1983,7 +1983,7 @@ FxU32 shift, FxBool invert)
|
|||
strcat(fragment_shader_alpha_combiner, "float as_b = gl_Color.a; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("grAlphaCombineExt : b = %x", b);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grAlphaCombineExt : b = %x", b);
|
||||
strcat(fragment_shader_alpha_combiner, "float as_b = 0.0; \n");
|
||||
}
|
||||
|
||||
|
@ -2002,7 +2002,7 @@ FxU32 shift, FxBool invert)
|
|||
strcat(fragment_shader_alpha_combiner, "float a_b = -as_b; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("grAlphaCombineExt : b_mode = %x", b_mode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grAlphaCombineExt : b_mode = %x", b_mode);
|
||||
strcat(fragment_shader_alpha_combiner, "float a_b = 0.0; \n");
|
||||
}
|
||||
|
||||
|
@ -2030,7 +2030,7 @@ FxU32 shift, FxBool invert)
|
|||
strcat(fragment_shader_alpha_combiner, "float a_c = gl_Color.a; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("grAlphaCombineExt : c = %x", c);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grAlphaCombineExt : c = %x", c);
|
||||
strcat(fragment_shader_alpha_combiner, "float a_c = 0.0; \n");
|
||||
}
|
||||
|
||||
|
@ -2052,7 +2052,7 @@ FxU32 shift, FxBool invert)
|
|||
strcat(fragment_shader_alpha_combiner, "float a_d = as_b; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("grAlphaCombineExt : d = %x", d);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grAlphaCombineExt : d = %x", d);
|
||||
strcat(fragment_shader_alpha_combiner, "float a_d = 0.0; \n");
|
||||
}
|
||||
|
||||
|
@ -2075,8 +2075,8 @@ FxU32 shift, FxBool invert)
|
|||
int num_tex;
|
||||
WriteTrace(TraceResolution, TraceDebug, "tmu: %d a: %d a_mode: %d b: %d b_mode: %d c: %d c_invert: %d d: %d d_invert: %d shift: %d invert: %d", tmu, a, a_mode, b, b_mode, c, c_invert, d, d_invert, shift, invert);
|
||||
|
||||
if (invert) display_warning("grTexColorCombineExt : inverted result");
|
||||
if (shift) display_warning("grTexColorCombineExt : shift = %d", shift);
|
||||
if (invert) WriteTrace(TraceGlitch, TraceWarning, "grTexColorCombineExt : inverted result");
|
||||
if (shift) WriteTrace(TraceGlitch, TraceWarning, "grTexColorCombineExt : shift = %d", shift);
|
||||
|
||||
if (tmu == GR_TMU0) num_tex = 1;
|
||||
else num_tex = 0;
|
||||
|
@ -2157,7 +2157,7 @@ FxU32 shift, FxBool invert)
|
|||
strcat(fragment_shader_texture1, "vec4 ctex1s_a = vec4(ccolor1.a); \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("grTexColorCombineExt : a = %x", a);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexColorCombineExt : a = %x", a);
|
||||
if (num_tex == 0)
|
||||
strcat(fragment_shader_texture0, "vec4 ctex0s_a = vec4(0.0); \n");
|
||||
else
|
||||
|
@ -2191,7 +2191,7 @@ FxU32 shift, FxBool invert)
|
|||
strcat(fragment_shader_texture1, "vec4 ctex1_a = -ctex1s_a; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("grTexColorCombineExt : a_mode = %x", a_mode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexColorCombineExt : a_mode = %x", a_mode);
|
||||
if (num_tex == 0)
|
||||
strcat(fragment_shader_texture0, "vec4 ctex0_a = vec4(0.0); \n");
|
||||
else
|
||||
|
@ -2255,7 +2255,7 @@ FxU32 shift, FxBool invert)
|
|||
strcat(fragment_shader_texture1, "vec4 ctex1s_b = ccolor1; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("grTexColorCombineExt : b = %x", b);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexColorCombineExt : b = %x", b);
|
||||
if (num_tex == 0)
|
||||
strcat(fragment_shader_texture0, "vec4 ctex0s_b = vec4(0.0); \n");
|
||||
else
|
||||
|
@ -2289,7 +2289,7 @@ FxU32 shift, FxBool invert)
|
|||
strcat(fragment_shader_texture1, "vec4 ctex1_b = -ctex1s_b; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("grTexColorCombineExt : b_mode = %x", b_mode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexColorCombineExt : b_mode = %x", b_mode);
|
||||
if (num_tex == 0)
|
||||
strcat(fragment_shader_texture0, "vec4 ctex0_b = vec4(0.0); \n");
|
||||
else
|
||||
|
@ -2365,7 +2365,7 @@ FxU32 shift, FxBool invert)
|
|||
strcat(fragment_shader_texture1, "vec4 ctex1_c = ccolor1; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("grTexColorCombineExt : c = %x", c);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexColorCombineExt : c = %x", c);
|
||||
if (num_tex == 0)
|
||||
strcat(fragment_shader_texture0, "vec4 ctex0_c = vec4(0.0); \n");
|
||||
else
|
||||
|
@ -2407,7 +2407,7 @@ FxU32 shift, FxBool invert)
|
|||
strcat(fragment_shader_texture1, "vec4 ctex1_d = vec4(readtex1.a); \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("grTexColorCombineExt : d = %x", d);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexColorCombineExt : d = %x", d);
|
||||
if (num_tex == 0)
|
||||
strcat(fragment_shader_texture0, "vec4 ctex0_d = vec4(0.0); \n");
|
||||
else
|
||||
|
@ -2440,8 +2440,8 @@ FxU32 shift, FxBool invert)
|
|||
int num_tex;
|
||||
WriteTrace(TraceResolution, TraceDebug, "tmu: %d a: %d a_mode: %d b: %d b_mode: %d c: %d c_invert: %d d: %d d_invert: %d shift, invert: %d", tmu, a, a_mode, b, b_mode, c, c_invert, d, d_invert, shift, invert);
|
||||
|
||||
if (invert) display_warning("grTexAlphaCombineExt : inverted result");
|
||||
if (shift) display_warning("grTexAlphaCombineExt : shift = %d", shift);
|
||||
if (invert) WriteTrace(TraceGlitch, TraceWarning, "grTexAlphaCombineExt : inverted result");
|
||||
if (shift) WriteTrace(TraceGlitch, TraceWarning, "grTexAlphaCombineExt : shift = %d", shift);
|
||||
|
||||
if (tmu == GR_TMU0) num_tex = 1;
|
||||
else num_tex = 0;
|
||||
|
@ -2488,7 +2488,7 @@ FxU32 shift, FxBool invert)
|
|||
strcat(fragment_shader_texture1, "ctex1s_a.a = ccolor1.a; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("grTexAlphaCombineExt : a = %x", a);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexAlphaCombineExt : a = %x", a);
|
||||
if (num_tex == 0)
|
||||
strcat(fragment_shader_texture0, "ctex0s_a.a = 0.0; \n");
|
||||
else
|
||||
|
@ -2522,7 +2522,7 @@ FxU32 shift, FxBool invert)
|
|||
strcat(fragment_shader_texture1, "ctex1_a.a = -ctex1s_a.a; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("grTexAlphaCombineExt : a_mode = %x", a_mode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexAlphaCombineExt : a_mode = %x", a_mode);
|
||||
if (num_tex == 0)
|
||||
strcat(fragment_shader_texture0, "ctex0_a.a = 0.0; \n");
|
||||
else
|
||||
|
@ -2556,7 +2556,7 @@ FxU32 shift, FxBool invert)
|
|||
strcat(fragment_shader_texture1, "ctex1s_b.a = ccolor1.a; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("grTexAlphaCombineExt : b = %x", b);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexAlphaCombineExt : b = %x", b);
|
||||
if (num_tex == 0)
|
||||
strcat(fragment_shader_texture0, "ctex0s_b.a = 0.0; \n");
|
||||
else
|
||||
|
@ -2590,7 +2590,7 @@ FxU32 shift, FxBool invert)
|
|||
strcat(fragment_shader_texture1, "ctex1_b.a = -ctex1s_b.a; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("grTexAlphaCombineExt : b_mode = %x", b_mode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexAlphaCombineExt : b_mode = %x", b_mode);
|
||||
if (num_tex == 0)
|
||||
strcat(fragment_shader_texture0, "ctex0_b.a = 0.0; \n");
|
||||
else
|
||||
|
@ -2642,7 +2642,7 @@ FxU32 shift, FxBool invert)
|
|||
strcat(fragment_shader_texture1, "ctex1_c.a = ccolor1.a; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("grTexAlphaCombineExt : c = %x", c);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexAlphaCombineExt : c = %x", c);
|
||||
if (num_tex == 0)
|
||||
strcat(fragment_shader_texture0, "ctex0_c.a = 0.0; \n");
|
||||
else
|
||||
|
@ -2690,7 +2690,7 @@ FxU32 shift, FxBool invert)
|
|||
strcat(fragment_shader_texture1, "ctex1_d.a = readtex1.a; \n");
|
||||
break;
|
||||
default:
|
||||
display_warning("grTexAlphaCombineExt : d = %x", d);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexAlphaCombineExt : d = %x", d);
|
||||
if (num_tex == 0)
|
||||
strcat(fragment_shader_texture0, "ctex0_d.a = 0.0; \n");
|
||||
else
|
||||
|
@ -2758,7 +2758,7 @@ GrColor_t value)
|
|||
}
|
||||
break;
|
||||
default:
|
||||
display_warning("grConstantColorValue: unknown color format : %x", lfb_color_fmt);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grConstantColorValue: unknown color format : %x", lfb_color_fmt);
|
||||
}
|
||||
|
||||
if (num_tex == 0)
|
||||
|
|
|
@ -67,7 +67,7 @@ grCoordinateSpace(GrCoordinateSpaceMode_t mode)
|
|||
case GR_WINDOW_COORDS:
|
||||
break;
|
||||
default:
|
||||
display_warning("unknwown coordinate space : %x", mode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknwown coordinate space : %x", mode);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -106,7 +106,7 @@ grVertexLayout(FxU32 param, FxI32 offset, FxU32 mode)
|
|||
st1_off = offset;
|
||||
break;
|
||||
default:
|
||||
display_warning("unknown grVertexLayout parameter : %x", param);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown grVertexLayout parameter : %x", param);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -140,7 +140,7 @@ grCullMode(GrCullMode_t mode)
|
|||
glEnable(GL_CULL_FACE);
|
||||
break;
|
||||
default:
|
||||
display_warning("unknown cull mode : %x", mode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown cull mode : %x", mode);
|
||||
}
|
||||
grDisplayGLError("grCullMode");
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ grDepthBufferMode(GrDepthBufferMode_t mode)
|
|||
w_buffer_mode = 0;
|
||||
break;
|
||||
default:
|
||||
display_warning("unknown depth buffer mode : %x", mode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown depth buffer mode : %x", mode);
|
||||
}
|
||||
grDisplayGLError("grDepthBufferMode");
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ grDepthBufferFunction(GrCmpFnc_t function)
|
|||
break;
|
||||
|
||||
default:
|
||||
display_warning("unknown depth buffer function : %x", function);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown depth buffer function : %x", function);
|
||||
}
|
||||
grDisplayGLError("grDepthBufferFunction");
|
||||
}
|
||||
|
@ -625,7 +625,7 @@ grDrawVertexArray(FxU32 mode, FxU32 Count, void *pointers2)
|
|||
glBegin(GL_TRIANGLE_FAN);
|
||||
break;
|
||||
default:
|
||||
display_warning("grDrawVertexArray : unknown mode : %x", mode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grDrawVertexArray : unknown mode : %x", mode);
|
||||
}
|
||||
|
||||
for (i = 0; i < Count; i++)
|
||||
|
@ -700,7 +700,7 @@ grDrawVertexArrayContiguous(FxU32 mode, FxU32 Count, void *pointers, FxU32 strid
|
|||
glBegin(GL_TRIANGLE_FAN);
|
||||
break;
|
||||
default:
|
||||
display_warning("grDrawVertexArrayContiguous : unknown mode : %x", mode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grDrawVertexArrayContiguous : unknown mode : %x", mode);
|
||||
}
|
||||
|
||||
for (i = 0; i < Count; i++)
|
||||
|
|
|
@ -538,22 +538,6 @@ unsigned short depthBuffer[2048 * 2048];
|
|||
|
||||
//#define VOODOO1
|
||||
|
||||
void display_warning(const char *text, ...)
|
||||
{
|
||||
static int first_message = 100;
|
||||
if (first_message)
|
||||
{
|
||||
char buf[1000];
|
||||
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, text);
|
||||
vsprintf(buf, text, ap);
|
||||
va_end(ap);
|
||||
first_message--;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
void display_error()
|
||||
{
|
||||
|
@ -572,7 +556,7 @@ grSstOrigin(GrOriginLocation_t origin)
|
|||
{
|
||||
WriteTrace(TraceGlitch, TraceDebug, "origin = %d", origin);
|
||||
if (origin != GR_ORIGIN_UPPER_LEFT)
|
||||
display_warning("grSstOrigin : %x", origin);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grSstOrigin : %x", origin);
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
|
@ -864,7 +848,7 @@ int nAuxBuffers)
|
|||
height = 2048;
|
||||
break;
|
||||
default:
|
||||
display_warning("unknown SstWinOpen resolution : %x", screen_resolution);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown SstWinOpen resolution : %x", screen_resolution);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -910,7 +894,7 @@ int nAuxBuffers)
|
|||
// primary monitor only
|
||||
if (!g_FullScreenResolutions.changeDisplaySettings(screen_resolution))
|
||||
{
|
||||
display_warning("can't change to fullscreen mode");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "can't change to fullscreen mode");
|
||||
}
|
||||
|
||||
windowedMenu = GetMenu(hwnd_win);
|
||||
|
@ -935,7 +919,7 @@ int nAuxBuffers)
|
|||
|
||||
if ((hDC = GetDC(hwnd_win)) == NULL)
|
||||
{
|
||||
display_warning("GetDC on main window failed");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "GetDC on main window failed");
|
||||
return FXFALSE;
|
||||
}
|
||||
|
||||
|
@ -946,18 +930,18 @@ int nAuxBuffers)
|
|||
}
|
||||
if (pfm == 0)
|
||||
{
|
||||
display_warning("ChoosePixelFormat failed");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "ChoosePixelFormat failed");
|
||||
return FXFALSE;
|
||||
}
|
||||
if (SetPixelFormat(hDC, pfm, &pfd) == 0)
|
||||
{
|
||||
display_warning("SetPixelFormat failed");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "SetPixelFormat failed");
|
||||
return FXFALSE;
|
||||
}
|
||||
|
||||
if ((hGLRC = wglCreateContext(hDC)) == 0)
|
||||
{
|
||||
display_warning("wglCreateContext failed!");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "wglCreateContext failed!");
|
||||
grSstWinClose(0);
|
||||
return FXFALSE;
|
||||
}
|
||||
|
@ -968,7 +952,7 @@ int nAuxBuffers)
|
|||
{
|
||||
if (!wglMakeCurrent(hDC, hGLRC))
|
||||
{
|
||||
display_warning("wglMakeCurrent failed!");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "wglMakeCurrent failed!");
|
||||
grSstWinClose(0);
|
||||
return FXFALSE;
|
||||
}
|
||||
|
@ -982,7 +966,7 @@ int nAuxBuffers)
|
|||
|
||||
/* Initialize SDL */
|
||||
printf("(II) Initializing SDL video subsystem...\n");
|
||||
if(SDL_InitSubSystem(SDL_INIT_VIDEO) == -1)
|
||||
if (SDL_InitSubSystem(SDL_INIT_VIDEO) == -1)
|
||||
{
|
||||
printf("(EE) Error initializing SDL video subsystem: %s\n", SDL_GetError());
|
||||
return false;
|
||||
|
@ -1058,18 +1042,18 @@ int nAuxBuffers)
|
|||
glViewport(0, viewport_offset, width, height);
|
||||
#endif // _WIN32
|
||||
lfb_color_fmt = color_format;
|
||||
if (origin_location != GR_ORIGIN_UPPER_LEFT) display_warning("origin must be in upper left corner");
|
||||
if (nColBuffers != 2) display_warning("number of color buffer is not 2");
|
||||
if (nAuxBuffers != 1) display_warning("number of auxiliary buffer is not 1");
|
||||
if (origin_location != GR_ORIGIN_UPPER_LEFT) WriteTrace(TraceGlitch, TraceWarning, "origin must be in upper left corner");
|
||||
if (nColBuffers != 2) WriteTrace(TraceGlitch, TraceWarning, "number of color buffer is not 2");
|
||||
if (nAuxBuffers != 1) WriteTrace(TraceGlitch, TraceWarning, "number of auxiliary buffer is not 1");
|
||||
|
||||
if (isExtensionSupported("GL_ARB_texture_env_combine") == 0 &&
|
||||
isExtensionSupported("GL_EXT_texture_env_combine") == 0 &&
|
||||
show_warning)
|
||||
display_warning("Your video card doesn't support GL_ARB_texture_env_combine extension");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "Your video card doesn't support GL_ARB_texture_env_combine extension");
|
||||
if (isExtensionSupported("GL_ARB_multitexture") == 0 && show_warning)
|
||||
display_warning("Your video card doesn't support GL_ARB_multitexture extension");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "Your video card doesn't support GL_ARB_multitexture extension");
|
||||
if (isExtensionSupported("GL_ARB_texture_mirrored_repeat") == 0 && show_warning)
|
||||
display_warning("Your video card doesn't support GL_ARB_texture_mirrored_repeat extension");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "Your video card doesn't support GL_ARB_texture_mirrored_repeat extension");
|
||||
show_warning = 0;
|
||||
|
||||
#ifdef _WIN32
|
||||
|
@ -1084,7 +1068,7 @@ int nAuxBuffers)
|
|||
|
||||
nbTextureUnits = 0;
|
||||
glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &nbTextureUnits);
|
||||
if (nbTextureUnits == 1) display_warning("You need a video card that has at least 2 texture units");
|
||||
if (nbTextureUnits == 1) WriteTrace(TraceGlitch, TraceWarning, "You need a video card that has at least 2 texture units");
|
||||
|
||||
nbAuxBuffers = 0;
|
||||
glGetIntegerv(GL_AUX_BUFFERS, &nbAuxBuffers);
|
||||
|
@ -1204,9 +1188,9 @@ int nAuxBuffers)
|
|||
}
|
||||
|
||||
if (isExtensionSupported("GL_EXT_texture_compression_s3tc") == 0 && show_warning)
|
||||
display_warning("Your video card doesn't support GL_EXT_texture_compression_s3tc extension");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "Your video card doesn't support GL_EXT_texture_compression_s3tc extension");
|
||||
if (isExtensionSupported("GL_3DFX_texture_compression_FXT1") == 0 && show_warning)
|
||||
display_warning("Your video card doesn't support GL_3DFX_texture_compression_FXT1 extension");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "Your video card doesn't support GL_3DFX_texture_compression_FXT1 extension");
|
||||
|
||||
#ifdef _WIN32
|
||||
glCompressedTexImage2DARB = (PFNGLCOMPRESSEDTEXIMAGE2DPROC)wglGetProcAddress("glCompressedTexImage2DARB");
|
||||
|
@ -1315,7 +1299,7 @@ int nAuxBuffers)
|
|||
glTexImage2D(GL_PROXY_TEXTURE_2D, 0, GL_RGBA, 16, 16, 0, GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV, NULL);
|
||||
glGetTexLevelParameteriv(GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_INTERNAL_FORMAT, &ifmt);
|
||||
if (ifmt != GL_RGB5_A1) {
|
||||
display_warning("ATI SUCKS %x\n", ifmt);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "ATI SUCKS %x\n", ifmt);
|
||||
ati_sucks = 1;
|
||||
}
|
||||
else
|
||||
|
@ -1362,7 +1346,7 @@ grSstWinClose(GrContext_t context)
|
|||
|
||||
if (clear_texbuff)
|
||||
{
|
||||
for (i=0; i<nb_fb; i++)
|
||||
for (i = 0; i < nb_fb; i++)
|
||||
{
|
||||
glDeleteTextures( 1, &(fbs[i].texid) );
|
||||
glDeleteFramebuffersEXT(1, &(fbs[i].fbid));
|
||||
|
@ -1385,7 +1369,7 @@ grSstWinClose(GrContext_t context)
|
|||
wglMakeCurrent(hDC, NULL);
|
||||
wglDeleteContext(hGLRC);
|
||||
hGLRC = NULL;
|
||||
}
|
||||
}
|
||||
if (fullscreen)
|
||||
{
|
||||
ChangeDisplaySettings(NULL, 0);
|
||||
|
@ -1404,7 +1388,7 @@ grSstWinClose(GrContext_t context)
|
|||
m_pScreen = NULL;
|
||||
#endif
|
||||
return FXTRUE;
|
||||
}
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL grTextureBufferExt(GrChipID_t tmu,
|
||||
FxU32 startAddress,
|
||||
|
@ -1418,7 +1402,7 @@ FX_ENTRY void FX_CALL grTextureBufferExt(GrChipID_t tmu,
|
|||
static int fbs_init = 0;
|
||||
|
||||
WriteTrace(TraceGlitch, TraceDebug, "tmu: %d startAddress: %d lodmin: %d lodmax: %d aspect: %d fmt: %d evenOdd: %d", tmu, startAddress, lodmin, lodmax, aspect, fmt, evenOdd);
|
||||
if (lodmin != lodmax) display_warning("grTextureBufferExt : loading more than one LOD");
|
||||
if (lodmin != lodmax) WriteTrace(TraceGlitch, TraceWarning, "grTextureBufferExt : loading more than one LOD");
|
||||
if (!use_fbo) {
|
||||
if (!render_to_texture) { //initialization
|
||||
return;
|
||||
|
@ -1785,7 +1769,7 @@ grGetProcAddress(char *procName)
|
|||
return (GrProc)grQueryResolutionsExt;
|
||||
if (!strcmp(procName, "grGetGammaTableExt"))
|
||||
return (GrProc)grGetGammaTableExt;
|
||||
display_warning("grGetProcAddress : %s", procName);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grGetProcAddress : %s", procName);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1902,7 +1886,7 @@ grGet(FxU32 pname, FxU32 plength, FxI32 *params)
|
|||
return 4;
|
||||
break;
|
||||
default:
|
||||
display_warning("unknown pname in grGet : %x", pname);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown pname in grGet : %x", pname);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -1944,7 +1928,7 @@ grGetString(FxU32 pname)
|
|||
}
|
||||
break;
|
||||
default:
|
||||
display_warning("unknown grGetString selector : %x", pname);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown grGetString selector : %x", pname);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -2223,7 +2207,7 @@ grRenderBuffer(GrBuffer_t buffer)
|
|||
render_to_texture = 1;
|
||||
break;
|
||||
default:
|
||||
display_warning("grRenderBuffer : unknown buffer : %x", buffer);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grRenderBuffer : unknown buffer : %x", buffer);
|
||||
}
|
||||
grDisplayGLError("grRenderBuffer");
|
||||
}
|
||||
|
@ -2272,7 +2256,7 @@ grBufferClear(GrColor_t color, GrAlpha_t alpha, FxU32 depth)
|
|||
alpha / 255.0f);
|
||||
break;
|
||||
default:
|
||||
display_warning("grBufferClear: unknown color format : %x", lfb_color_fmt);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grBufferClear: unknown color format : %x", lfb_color_fmt);
|
||||
}
|
||||
|
||||
if (w_buffer_mode)
|
||||
|
@ -2295,7 +2279,7 @@ grBufferSwap(FxU32 swap_interval)
|
|||
WriteTrace(TraceGlitch, TraceDebug, "swap_interval: %d", swap_interval);
|
||||
//printf("swap\n");
|
||||
if (render_to_texture) {
|
||||
display_warning("swap while render_to_texture\n");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "swap while render_to_texture\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2326,7 +2310,7 @@ grBufferSwap(FxU32 swap_interval)
|
|||
case 'w': {
|
||||
static int wireframe;
|
||||
wireframe = !wireframe;
|
||||
glPolygonMode(GL_FRONT_AND_BACK, wireframe? GL_LINE : GL_FILL);
|
||||
glPolygonMode(GL_FRONT_AND_BACK, wireframe ? GL_LINE : GL_FILL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -2346,7 +2330,7 @@ GrLfbInfo_t *info)
|
|||
WriteTrace(TraceGlitch, TraceDebug, "type: %d buffer: %d writeMode: %d origin: %d pixelPipeline: %d", type, buffer, writeMode, origin, pixelPipeline);
|
||||
if (type == GR_LFB_WRITE_ONLY)
|
||||
{
|
||||
display_warning("grLfbLock : write only");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grLfbLock : write only");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2362,7 +2346,7 @@ GrLfbInfo_t *info)
|
|||
glReadBuffer(GL_BACK);
|
||||
break;
|
||||
default:
|
||||
display_warning("grLfbLock : unknown buffer : %x", buffer);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grLfbLock : unknown buffer : %x", buffer);
|
||||
}
|
||||
|
||||
if (buffer != GR_BUFFER_AUXBUFFER)
|
||||
|
@ -2409,7 +2393,7 @@ GrLfbInfo_t *info)
|
|||
|
||||
grDisplayGLError("grLfbLock");
|
||||
return FXTRUE;
|
||||
}
|
||||
}
|
||||
|
||||
FX_ENTRY FxBool FX_CALL
|
||||
grLfbUnlock(GrLock_t type, GrBuffer_t buffer)
|
||||
|
@ -2417,7 +2401,7 @@ grLfbUnlock(GrLock_t type, GrBuffer_t buffer)
|
|||
WriteTrace(TraceGlitch, TraceDebug, "type: %d, buffer: %d", type, buffer);
|
||||
if (type == GR_LFB_WRITE_ONLY)
|
||||
{
|
||||
display_warning("grLfbUnlock : write only");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grLfbUnlock : write only");
|
||||
}
|
||||
return FXTRUE;
|
||||
}
|
||||
|
@ -2446,7 +2430,7 @@ FxU32 dst_stride, void *dst_data)
|
|||
glReadBuffer(current_buffer);
|
||||
break;*/
|
||||
default:
|
||||
display_warning("grReadRegion : unknown buffer : %x", src_buffer);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grReadRegion : unknown buffer : %x", src_buffer);
|
||||
}
|
||||
|
||||
if (src_buffer != GR_BUFFER_AUXBUFFER)
|
||||
|
@ -2517,7 +2501,7 @@ FxI32 src_stride, void *src_data)
|
|||
glDrawBuffer(current_buffer);
|
||||
break;
|
||||
default:
|
||||
display_warning("grLfbWriteRegion : unknown buffer : %x", dst_buffer);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grLfbWriteRegion : unknown buffer : %x", dst_buffer);
|
||||
}
|
||||
|
||||
if (dst_buffer != GR_BUFFER_AUXBUFFER)
|
||||
|
@ -2570,7 +2554,7 @@ FxI32 src_stride, void *src_data)
|
|||
}
|
||||
break;
|
||||
default:
|
||||
display_warning("grLfbWriteRegion : unknown format : %d", src_format);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grLfbWriteRegion : unknown format : %d", src_format);
|
||||
}
|
||||
|
||||
#ifdef VPDEBUG
|
||||
|
@ -2602,10 +2586,10 @@ FxI32 src_stride, void *src_data)
|
|||
float *buf = (float*)malloc(src_width*(src_height + (viewport_offset))*sizeof(float));
|
||||
|
||||
if (src_format != GR_LFBWRITEMODE_ZA16)
|
||||
display_warning("unknown depth buffer write format:%x", src_format);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "unknown depth buffer write format:%x", src_format);
|
||||
|
||||
if (dst_x || dst_y)
|
||||
display_warning("dst_x:%d, dst_y:%d\n", dst_x, dst_y);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "dst_x:%d, dst_y:%d\n", dst_x, dst_y);
|
||||
|
||||
for (j = 0; j < src_height; j++)
|
||||
{
|
||||
|
@ -2620,7 +2604,7 @@ FxI32 src_stride, void *src_data)
|
|||
if (dumping) {
|
||||
unsigned char * buf2 = (unsigned char *)malloc(src_width*(src_height + (viewport_offset)));
|
||||
for (i = 0; i < src_width*src_height; i++)
|
||||
buf2[i] = buf[i]*255.0f;
|
||||
buf2[i] = buf[i] * 255.0f;
|
||||
ilTexImage(src_width, src_height, 1, 1, IL_LUMINANCE, IL_UNSIGNED_BYTE, buf2);
|
||||
char name[128];
|
||||
static int id;
|
||||
|
@ -2646,7 +2630,7 @@ FxI32 src_stride, void *src_data)
|
|||
|
||||
grDisplayGLError("grLfbWriteRegion");
|
||||
return FXTRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/* wrapper-specific glide extensions */
|
||||
|
||||
|
@ -2676,8 +2660,8 @@ FX_ENTRY FxBool FX_CALL grKeyPressedExt(FxU32 key)
|
|||
}
|
||||
else
|
||||
{
|
||||
Uint8 *keystates = SDL_GetKeyState( NULL );
|
||||
if( keystates[ key ] )
|
||||
Uint8 *keystates = SDL_GetKeyState(NULL);
|
||||
if (keystates[key])
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
@ -2708,14 +2692,14 @@ grQueryResolutions(const GrResolution *resTemplate, GrResolution *output)
|
|||
int i;
|
||||
int n = 0;
|
||||
WriteTrace(TraceGlitch, TraceDebug, "-");
|
||||
display_warning("grQueryResolutions");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grQueryResolutions");
|
||||
if ((unsigned int)resTemplate->resolution != GR_QUERY_ANY)
|
||||
{
|
||||
res_inf = res_sup = resTemplate->resolution;
|
||||
}
|
||||
if ((unsigned int)resTemplate->refresh == GR_QUERY_ANY) display_warning("querying any refresh rate");
|
||||
if ((unsigned int)resTemplate->numAuxBuffers == GR_QUERY_ANY) display_warning("querying any numAuxBuffers");
|
||||
if ((unsigned int)resTemplate->numColorBuffers == GR_QUERY_ANY) display_warning("querying any numColorBuffers");
|
||||
if ((unsigned int)resTemplate->refresh == GR_QUERY_ANY) WriteTrace(TraceGlitch, TraceWarning, "querying any refresh rate");
|
||||
if ((unsigned int)resTemplate->numAuxBuffers == GR_QUERY_ANY) WriteTrace(TraceGlitch, TraceWarning, "querying any numAuxBuffers");
|
||||
if ((unsigned int)resTemplate->numColorBuffers == GR_QUERY_ANY) WriteTrace(TraceGlitch, TraceWarning, "querying any numColorBuffers");
|
||||
|
||||
if (output == NULL) return res_sup - res_inf + 1;
|
||||
for (i = res_inf; i <= res_sup; i++)
|
||||
|
@ -2732,7 +2716,7 @@ grQueryResolutions(const GrResolution *resTemplate, GrResolution *output)
|
|||
FX_ENTRY FxBool FX_CALL
|
||||
grReset(FxU32 /*what*/)
|
||||
{
|
||||
display_warning("grReset");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grReset");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -2755,13 +2739,13 @@ grDisable(GrEnableMode_t mode)
|
|||
FX_ENTRY void FX_CALL
|
||||
grDisableAllEffects(void)
|
||||
{
|
||||
display_warning("grDisableAllEffects");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grDisableAllEffects");
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grErrorSetCallback(GrErrorCallbackFnc_t /*fnc*/)
|
||||
{
|
||||
display_warning("grErrorSetCallback");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grErrorSetCallback");
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
|
@ -2782,7 +2766,7 @@ FX_ENTRY void FX_CALL
|
|||
grTexMultibase(GrChipID_t /*tmu*/,
|
||||
FxBool /*enable*/)
|
||||
{
|
||||
display_warning("grTexMultibase");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexMultibase");
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
|
@ -2790,7 +2774,7 @@ grTexMipMapMode(GrChipID_t /*tmu*/,
|
|||
GrMipMapMode_t /*mode*/,
|
||||
FxBool /*lodBlend*/)
|
||||
{
|
||||
display_warning("grTexMipMapMode");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexMipMapMode");
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
|
@ -2799,14 +2783,14 @@ void * /*data*/,
|
|||
int /*start*/,
|
||||
int /*end*/)
|
||||
{
|
||||
display_warning("grTexDownloadTablePartial");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexDownloadTablePartial");
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grTexDownloadTable(GrTexTable_t /*type*/,
|
||||
void * /*data*/)
|
||||
{
|
||||
display_warning("grTexDownloadTable");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexDownloadTable");
|
||||
}
|
||||
|
||||
FX_ENTRY FxBool FX_CALL
|
||||
|
@ -2821,7 +2805,7 @@ void * /*data*/,
|
|||
int /*start*/,
|
||||
int /*end*/)
|
||||
{
|
||||
display_warning("grTexDownloadMipMapLevelPartial");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexDownloadMipMapLevelPartial");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -2835,37 +2819,37 @@ GrTextureFormat_t /*format*/,
|
|||
FxU32 /*evenOdd*/,
|
||||
void * /*data*/)
|
||||
{
|
||||
display_warning("grTexDownloadMipMapLevel");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexDownloadMipMapLevel");
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grTexNCCTable(GrNCCTable_t /*table*/)
|
||||
{
|
||||
display_warning("grTexNCCTable");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexNCCTable");
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grViewport(FxI32 /*x*/, FxI32 /*y*/, FxI32 /*width*/, FxI32 /*height*/)
|
||||
{
|
||||
display_warning("grViewport");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grViewport");
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grDepthRange(FxFloat /*n*/, FxFloat /*f*/)
|
||||
{
|
||||
display_warning("grDepthRange");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grDepthRange");
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grSplash(float /*x*/, float /*y*/, float /*width*/, float /*height*/, FxU32 /*frame*/)
|
||||
{
|
||||
display_warning("grSplash");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grSplash");
|
||||
}
|
||||
|
||||
FX_ENTRY FxBool FX_CALL
|
||||
grSelectContext(GrContext_t /*context*/)
|
||||
{
|
||||
display_warning("grSelectContext");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grSelectContext");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -2875,61 +2859,61 @@ const void * /*a*/, const void * /*b*/, const void * /*c*/,
|
|||
FxBool /*ab_antialias*/, FxBool /*bc_antialias*/, FxBool /*ca_antialias*/
|
||||
)
|
||||
{
|
||||
display_warning("grAADrawTriangle");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grAADrawTriangle");
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grAlphaControlsITRGBLighting(FxBool /*enable*/)
|
||||
{
|
||||
display_warning("grAlphaControlsITRGBLighting");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grAlphaControlsITRGBLighting");
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grGlideSetVertexLayout(const void * /*layout*/)
|
||||
{
|
||||
display_warning("grGlideSetVertexLayout");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grGlideSetVertexLayout");
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grGlideGetVertexLayout(void * /*layout*/)
|
||||
{
|
||||
display_warning("grGlideGetVertexLayout");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grGlideGetVertexLayout");
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grGlideSetState(const void * /*state*/)
|
||||
{
|
||||
display_warning("grGlideSetState");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grGlideSetState");
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grGlideGetState(void * /*state*/)
|
||||
{
|
||||
display_warning("grGlideGetState");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grGlideGetState");
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grLfbWriteColorFormat(GrColorFormat_t /*colorFormat*/)
|
||||
{
|
||||
display_warning("grLfbWriteColorFormat");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grLfbWriteColorFormat");
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grLfbWriteColorSwizzle(FxBool /*swizzleBytes*/, FxBool /*swapWords*/)
|
||||
{
|
||||
display_warning("grLfbWriteColorSwizzle");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grLfbWriteColorSwizzle");
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grLfbConstantDepth(FxU32 /*depth*/)
|
||||
{
|
||||
display_warning("grLfbConstantDepth");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grLfbConstantDepth");
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grLfbConstantAlpha(GrAlpha_t /*alpha*/)
|
||||
{
|
||||
display_warning("grLfbConstantAlpha");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grLfbConstantAlpha");
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
|
@ -2939,7 +2923,7 @@ FxU32 /*startAddress*/,
|
|||
FxU32 /*evenOdd*/,
|
||||
GrTexInfo * /*info*/)
|
||||
{
|
||||
display_warning("grTexMultibaseAddress");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexMultibaseAddress");
|
||||
}
|
||||
|
||||
inline void MySleep(FxU32 ms)
|
||||
|
@ -2968,7 +2952,7 @@ static void CorrectGamma(const FxU16 aGammaRamp[3][256])
|
|||
|
||||
res = SDL_SetGammaRamp(aGammaRamp[0], aGammaRamp[1], aGammaRamp[2]);
|
||||
WriteTrace(TraceGlitch, TraceDebug, "SDL_SetGammaRamp returned %d\r\n", res);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
|
@ -3011,7 +2995,7 @@ grGetGammaTableExt(FxU32 /*nentries*/, FxU32 *red, FxU32 *green, FxU32 *blue)
|
|||
blue[i] = aGammaRamp[2][i] >> 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
guGammaCorrectionRGB(FxFloat gammaR, FxFloat gammaG, FxFloat gammaB)
|
||||
|
@ -3032,27 +3016,27 @@ guGammaCorrectionRGB(FxFloat gammaR, FxFloat gammaG, FxFloat gammaB)
|
|||
FX_ENTRY void FX_CALL
|
||||
grDitherMode(GrDitherMode_t /*mode*/)
|
||||
{
|
||||
display_warning("grDitherMode");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grDitherMode");
|
||||
}
|
||||
|
||||
void grChromaRangeExt(GrColor_t /*color0*/, GrColor_t /*color1*/, FxU32 /*mode*/)
|
||||
{
|
||||
display_warning("grChromaRangeExt");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grChromaRangeExt");
|
||||
}
|
||||
|
||||
void grChromaRangeModeExt(GrChromakeyMode_t /*mode*/)
|
||||
{
|
||||
display_warning("grChromaRangeModeExt");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grChromaRangeModeExt");
|
||||
}
|
||||
|
||||
void grTexChromaRangeExt(GrChipID_t /*tmu*/, GrColor_t /*color0*/, GrColor_t /*color1*/, GrTexChromakeyMode_t /*mode*/)
|
||||
{
|
||||
display_warning("grTexChromaRangeExt");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexChromaRangeExt");
|
||||
}
|
||||
|
||||
void grTexChromaModeExt(GrChipID_t /*tmu*/, GrChromakeyMode_t /*mode*/)
|
||||
{
|
||||
display_warning("grTexChromaRangeModeExt");
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexChromaRangeModeExt");
|
||||
}
|
||||
|
||||
static const char * GL_errors[7 + 1] = {
|
||||
|
@ -3124,7 +3108,7 @@ void dump_start()
|
|||
init = 1;
|
||||
ilInit();
|
||||
ilEnable(IL_FILE_OVERWRITE);
|
||||
}
|
||||
}
|
||||
dumping = 1;
|
||||
tl_i = 0;
|
||||
}
|
||||
|
|
|
@ -164,7 +164,7 @@ GrTexInfo *info)
|
|||
{
|
||||
WriteTrace(TraceGlitch, TraceDebug, "evenOdd = %d", evenOdd);
|
||||
int width, height;
|
||||
if (info->largeLodLog2 != info->smallLodLog2) display_warning("grTexTextureMemRequired : loading more than one LOD");
|
||||
if (info->largeLodLog2 != info->smallLodLog2) WriteTrace(TraceGlitch, TraceWarning, "grTexTextureMemRequired : loading more than one LOD");
|
||||
|
||||
if (info->aspectRatioLog2 < 0)
|
||||
{
|
||||
|
@ -202,7 +202,7 @@ GrTexInfo *info)
|
|||
case GR_TEXFMT_ARGB_CMP_FXT1:
|
||||
return ((((width + 0x7)&~0x7)*((height + 0x3)&~0x3)) >> 1);
|
||||
default:
|
||||
display_warning("grTexTextureMemRequired : unknown texture format: %x", info->format);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexTextureMemRequired : unknown texture format: %x", info->format);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ GrAspectRatio_t aspect, GrTextureFormat_t fmt)
|
|||
{
|
||||
WriteTrace(TraceGlitch, TraceDebug, "lodmin = %d, lodmax: %d aspect: %d fmt: %d", lodmin, lodmax, aspect, fmt);
|
||||
int width, height;
|
||||
if (lodmax != lodmin) display_warning("grTexCalcMemRequired : loading more than one LOD");
|
||||
if (lodmax != lodmin) WriteTrace(TraceGlitch, TraceWarning, "grTexCalcMemRequired : loading more than one LOD");
|
||||
|
||||
if (aspect < 0)
|
||||
{
|
||||
|
@ -252,7 +252,7 @@ GrAspectRatio_t aspect, GrTextureFormat_t fmt)
|
|||
case GR_TEXFMT_ARGB_CMP_FXT1:
|
||||
return ((((width + 0x7)&~0x7)*((height + 0x3)&~0x3)) >> 1);
|
||||
default:
|
||||
display_warning("grTexTextureMemRequired : unknown texture format: %x", fmt);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexTextureMemRequired : unknown texture format: %x", fmt);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ int grTexFormatSize(int fmt)
|
|||
factor = 8;
|
||||
break;
|
||||
default:
|
||||
display_warning("grTexFormatSize : unknown texture format: %x", fmt);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexFormatSize : unknown texture format: %x", fmt);
|
||||
}
|
||||
return factor;
|
||||
}
|
||||
|
@ -377,7 +377,7 @@ int grTexFormat2GLPackedFmt(int fmt, int * gltexfmt, int * glpixfmt, int * glpac
|
|||
*glpackfmt = GL_COMPRESSED_RGBA_FXT1_3DFX; // XXX: what should we do about GL_COMPRESSED_RGB_FXT1_3DFX?
|
||||
break;
|
||||
default:
|
||||
display_warning("grTexFormat2GLPackedFmt : unknown texture format: %x", fmt);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexFormat2GLPackedFmt : unknown texture format: %x", fmt);
|
||||
}
|
||||
return factor;
|
||||
}
|
||||
|
@ -394,7 +394,7 @@ GrTexInfo *info)
|
|||
int factor;
|
||||
int glformat = 0;
|
||||
int gltexfmt = 0, glpixfmt = 0, glpackfmt = 0;
|
||||
if (info->largeLodLog2 != info->smallLodLog2) display_warning("grTexDownloadMipMap : loading more than one LOD");
|
||||
if (info->largeLodLog2 != info->smallLodLog2) WriteTrace(TraceGlitch, TraceWarning, "grTexDownloadMipMap : loading more than one LOD");
|
||||
|
||||
if (info->aspectRatioLog2 < 0)
|
||||
{
|
||||
|
@ -595,7 +595,7 @@ GrTexInfo *info)
|
|||
glformat = GL_COMPRESSED_RGBA_FXT1_3DFX;
|
||||
break;
|
||||
default:
|
||||
display_warning("grTexDownloadMipMap : unknown texture format: %x", info->format);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexDownloadMipMap : unknown texture format: %x", info->format);
|
||||
factor = 0;
|
||||
}
|
||||
}
|
||||
|
@ -740,14 +740,14 @@ float detail_max
|
|||
{
|
||||
if (!lod_bias && !detail_scale && !detail_max) return;
|
||||
else
|
||||
display_warning("grTexDetailControl : %d, %d, %f", lod_bias, detail_scale, detail_max);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexDetailControl : %d, %d, %f", lod_bias, detail_scale, detail_max);
|
||||
}
|
||||
lambda = detail_max;
|
||||
if (lambda > 1.0f)
|
||||
{
|
||||
lambda = 1.0f - (255.0f - lambda);
|
||||
}
|
||||
if (lambda > 1.0f) display_warning("lambda:%f", lambda);
|
||||
if (lambda > 1.0f) WriteTrace(TraceGlitch, TraceWarning, "lambda:%f", lambda);
|
||||
|
||||
set_lambda();
|
||||
}
|
||||
|
@ -817,7 +817,7 @@ GrTextureClampMode_t t_clampmode
|
|||
wrap_s0 = GL_MIRRORED_REPEAT_ARB;
|
||||
break;
|
||||
default:
|
||||
display_warning("grTexClampMode : unknown s_clampmode : %x", s_clampmode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexClampMode : unknown s_clampmode : %x", s_clampmode);
|
||||
}
|
||||
switch (t_clampmode)
|
||||
{
|
||||
|
@ -831,7 +831,7 @@ GrTextureClampMode_t t_clampmode
|
|||
wrap_t0 = GL_MIRRORED_REPEAT_ARB;
|
||||
break;
|
||||
default:
|
||||
display_warning("grTexClampMode : unknown t_clampmode : %x", t_clampmode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexClampMode : unknown t_clampmode : %x", t_clampmode);
|
||||
}
|
||||
glActiveTextureARB(GL_TEXTURE0_ARB);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, wrap_s0);
|
||||
|
@ -851,7 +851,7 @@ GrTextureClampMode_t t_clampmode
|
|||
wrap_s1 = GL_MIRRORED_REPEAT_ARB;
|
||||
break;
|
||||
default:
|
||||
display_warning("grTexClampMode : unknown s_clampmode : %x", s_clampmode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexClampMode : unknown s_clampmode : %x", s_clampmode);
|
||||
}
|
||||
switch (t_clampmode)
|
||||
{
|
||||
|
@ -865,7 +865,7 @@ GrTextureClampMode_t t_clampmode
|
|||
wrap_t1 = GL_MIRRORED_REPEAT_ARB;
|
||||
break;
|
||||
default:
|
||||
display_warning("grTexClampMode : unknown t_clampmode : %x", t_clampmode);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexClampMode : unknown t_clampmode : %x", t_clampmode);
|
||||
}
|
||||
glActiveTextureARB(GL_TEXTURE1_ARB);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, wrap_s1);
|
||||
|
|
|
@ -11,6 +11,8 @@ void dump_stop();
|
|||
extern int dumping;
|
||||
#endif
|
||||
|
||||
#include <Glide64/trace.h>
|
||||
|
||||
#define zscale 1.0f
|
||||
|
||||
typedef struct _wrapper_config
|
||||
|
@ -82,8 +84,6 @@ extern "C" {
|
|||
#endif // _WIN32
|
||||
#include "glide.h"
|
||||
|
||||
void display_warning(const unsigned char *text, ...);
|
||||
void display_warning(const char *text, ...);
|
||||
void init_geometry();
|
||||
void init_textures();
|
||||
void init_combiner();
|
||||
|
@ -242,49 +242,52 @@ FX_ENTRY void FX_CALL
|
|||
grConstantColorValueExt(GrChipID_t tmu,
|
||||
GrColor_t value);
|
||||
|
||||
#define CHECK_FRAMEBUFFER_STATUS() \
|
||||
{\
|
||||
GLenum status; \
|
||||
status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); \
|
||||
/*display_warning("%x\n", status);*/\
|
||||
switch(status) { \
|
||||
case GL_FRAMEBUFFER_COMPLETE_EXT: \
|
||||
/*display_warning("framebuffer complete!\n");*/\
|
||||
break; \
|
||||
case GL_FRAMEBUFFER_UNSUPPORTED_EXT: \
|
||||
display_warning("framebuffer GL_FRAMEBUFFER_UNSUPPORTED_EXT\n");\
|
||||
/* you gotta choose different formats */ \
|
||||
/*assert(0);*/ \
|
||||
break; \
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT: \
|
||||
display_warning("framebuffer INCOMPLETE_ATTACHMENT\n");\
|
||||
break; \
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT: \
|
||||
display_warning("framebuffer FRAMEBUFFER_MISSING_ATTACHMENT\n");\
|
||||
break; \
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT: \
|
||||
display_warning("framebuffer FRAMEBUFFER_DIMENSIONS\n");\
|
||||
break; \
|
||||
/*case GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT: \
|
||||
display_warning("framebuffer INCOMPLETE_DUPLICATE_ATTACHMENT\n");\
|
||||
break;*/ \
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT: \
|
||||
display_warning("framebuffer INCOMPLETE_FORMATS\n");\
|
||||
break; \
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT: \
|
||||
display_warning("framebuffer INCOMPLETE_DRAW_BUFFER\n");\
|
||||
break; \
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT: \
|
||||
display_warning("framebuffer INCOMPLETE_READ_BUFFER\n");\
|
||||
break; \
|
||||
case GL_FRAMEBUFFER_BINDING_EXT: \
|
||||
display_warning("framebuffer BINDING_EXT\n");\
|
||||
break; \
|
||||
default: \
|
||||
break; \
|
||||
/* programming error; will fail on all hardware */ \
|
||||
/*assert(0);*/ \
|
||||
}\
|
||||
static void CHECK_FRAMEBUFFER_STATUS(void)
|
||||
{
|
||||
GLenum status;
|
||||
status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
|
||||
|
||||
WriteTrace(TraceGlitch, TraceDebug, "status: %X", status);
|
||||
switch (status)
|
||||
{
|
||||
case GL_FRAMEBUFFER_COMPLETE_EXT:
|
||||
WriteTrace(TraceGlitch, TraceDebug, "framebuffer complete!");
|
||||
break;
|
||||
case GL_FRAMEBUFFER_UNSUPPORTED_EXT:
|
||||
WriteTrace(TraceGlitch, TraceWarning, "framebuffer GL_FRAMEBUFFER_UNSUPPORTED_EXT");
|
||||
/* you gotta choose different formats */
|
||||
/*assert(0);*/
|
||||
break;
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT:
|
||||
WriteTrace(TraceGlitch, TraceWarning, "framebuffer INCOMPLETE_ATTACHMENT");
|
||||
break;
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT:
|
||||
WriteTrace(TraceGlitch, TraceWarning, "framebuffer FRAMEBUFFER_MISSING_ATTACHMENT");
|
||||
break;
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT:
|
||||
WriteTrace(TraceGlitch, TraceWarning, "framebuffer FRAMEBUFFER_DIMENSIONS");
|
||||
break;
|
||||
/*case GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT:
|
||||
WriteTrace(TraceGlitch, TraceWarning, "framebuffer INCOMPLETE_DUPLICATE_ATTACHMENT");
|
||||
break;*/
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT:
|
||||
WriteTrace(TraceGlitch, TraceWarning, "framebuffer INCOMPLETE_FORMATS");
|
||||
break;
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT:
|
||||
WriteTrace(TraceGlitch, TraceWarning, "framebuffer INCOMPLETE_DRAW_BUFFER");
|
||||
break;
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT:
|
||||
WriteTrace(TraceGlitch, TraceWarning, "framebuffer INCOMPLETE_READ_BUFFER");
|
||||
break;
|
||||
case GL_FRAMEBUFFER_BINDING_EXT:
|
||||
WriteTrace(TraceGlitch, TraceWarning, "framebuffer BINDING_EXT");
|
||||
break;
|
||||
default:
|
||||
WriteTrace(TraceGlitch, TraceError, "Unhandled status: %X", status);
|
||||
break;
|
||||
/* programming error; will fail on all hardware */
|
||||
/*assert(0);*/
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue