mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Remove unused code.
This commit is contained in:
parent
27cdae1e33
commit
bbcd0be949
|
@ -157,7 +157,6 @@ void DestroyShaderCombiner();
|
|||
void SetDepthFogCombiner();
|
||||
void SetMonochromeCombiner();
|
||||
#endif // GL_IMAGE_TEXTURES_SUPPORT
|
||||
bool SetDepthTextureCombiner();
|
||||
|
||||
//#define USE_TOONIFY
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@ static GLuint g_readtex_shader_object;
|
|||
static GLuint g_readtex_ms_shader_object;
|
||||
static GLuint g_dither_shader_object;
|
||||
static GLuint g_monochrome_image_program = 0;
|
||||
static GLuint g_depth_texture_program = 0;
|
||||
|
||||
#ifdef GL_IMAGE_TEXTURES_SUPPORT
|
||||
GLuint g_draw_shadow_map_program = 0;
|
||||
|
@ -230,24 +229,6 @@ void InitShaderCombiner()
|
|||
const int texLoc = glGetUniformLocation(g_monochrome_image_program, "uColorImage");
|
||||
glUniform1i(texLoc, 0);
|
||||
|
||||
if (config.generalEmulation.enableFragmentDepthWrite != 0 &&
|
||||
(config.generalEmulation.hacks&hack_LoadDepthTextures) != 0) {
|
||||
GLuint depth_texture_shader_object = _createShader(GL_FRAGMENT_SHADER, depth_texture_fragment_shader);
|
||||
g_depth_texture_program = glCreateProgram();
|
||||
glBindAttribLocation(g_depth_texture_program, SC_POSITION, "aPosition");
|
||||
glBindAttribLocation(g_depth_texture_program, SC_TEXCOORD0, "aTexCoord0");
|
||||
glAttachShader(g_depth_texture_program, g_vertex_shader_object);
|
||||
glAttachShader(g_depth_texture_program, depth_texture_shader_object);
|
||||
glLinkProgram(g_depth_texture_program);
|
||||
glDeleteShader(depth_texture_shader_object);
|
||||
assert(checkProgramLinkStatus(g_depth_texture_program));
|
||||
glUseProgram(g_depth_texture_program);
|
||||
int loc = glGetUniformLocation(g_depth_texture_program, "uTex0");
|
||||
glUniform1i(loc, 0);
|
||||
loc = glGetUniformLocation(g_depth_texture_program, "uRenderState");
|
||||
glUniform1i(loc, OGLRender::rsTexRect);
|
||||
}
|
||||
|
||||
glUseProgram(0);
|
||||
|
||||
#ifdef GL_IMAGE_TEXTURES_SUPPORT
|
||||
|
@ -289,8 +270,6 @@ void DestroyShaderCombiner() {
|
|||
glDeleteProgram(g_monochrome_image_program);
|
||||
g_monochrome_image_program = 0;
|
||||
noiseTex.destroy();
|
||||
glDeleteProgram(g_depth_texture_program);
|
||||
g_depth_texture_program = 0;
|
||||
|
||||
#ifdef GL_IMAGE_TEXTURES_SUPPORT
|
||||
DestroyZlutTexture();
|
||||
|
@ -912,13 +891,3 @@ void SetMonochromeCombiner()
|
|||
glUseProgram(g_monochrome_image_program);
|
||||
gDP.changed |= CHANGED_COMBINE;
|
||||
}
|
||||
|
||||
bool SetDepthTextureCombiner()
|
||||
{
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glDepthFunc(GL_ALWAYS);
|
||||
glDepthMask(TRUE);
|
||||
glUseProgram(g_depth_texture_program);
|
||||
gDP.changed |= CHANGED_COMBINE | CHANGED_RENDERMODE;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -705,16 +705,6 @@ MAIN_SHADER_VERSION
|
|||
;
|
||||
#endif
|
||||
|
||||
static const char* depth_texture_fragment_shader =
|
||||
MAIN_SHADER_VERSION
|
||||
"uniform sampler2D uTex0; \n"
|
||||
"in mediump vec2 vTexCoord0; \n"
|
||||
"void main() \n"
|
||||
"{ \n"
|
||||
" gl_FragDepth = texture(uTex0, vTexCoord0).r; \n"
|
||||
"} \n"
|
||||
;
|
||||
|
||||
const char * strTexrectDrawerVertexShader =
|
||||
MAIN_SHADER_VERSION
|
||||
"in highp vec4 aPosition; \n"
|
||||
|
|
Loading…
Reference in New Issue
Block a user