Exemplo n.º 1
0
void GSShaderOGL::GS(GLuint s)
{
	if (GLState::gs != s)
	{
		GLState::gs = s;
		GLState::dirty_prog = true;
		if (GLLoader::found_GL_ARB_separate_shader_objects)
			gl_UseProgramStages(m_pipeline, GL_GEOMETRY_SHADER_BIT, s);
	}
}
Exemplo n.º 2
0
void GSShaderOGL::VS(GLuint s, GLuint sub_count)
{
	if (GLState::vs != s)
	{
		m_vs_sub_count = sub_count;

		GLState::vs = s;
		GLState::dirty_prog = true;
		GLState::dirty_subroutine_vs = true;
#ifndef ENABLE_GLES
		if (GLLoader::found_GL_ARB_separate_shader_objects)
			gl_UseProgramStages(m_pipeline, GL_VERTEX_SHADER_BIT, s);
#endif
	}
}
Exemplo n.º 3
0
void GSShaderOGL::PS(GLuint s, GLuint sub_count)
{
	if (GLState::ps != s)
	{
		m_ps_sub_count = sub_count;

		GLState::ps = s;
		GLState::dirty_prog = true;
		GLState::dirty_subroutine_ps = true;
		GLState::dirty_ressources = true;
#ifndef ENABLE_GLES
		if (GLLoader::found_GL_ARB_separate_shader_objects) {
			gl_UseProgramStages(m_pipeline, GL_FRAGMENT_SHADER_BIT, s);
		}
#endif
	}
}
Exemplo n.º 4
0
void GSShaderOGL::PS(GLuint s)
{
#ifdef _DEBUG
	if (true)
#else
	if (GLState::ps != s)
#endif
	{
		// In debug always sets the program. It allow to replace the program in apitrace easily.
		GLState::ps = s;
		GLState::dirty_prog = true;
		GLState::dirty_ressources = true;
		if (GLLoader::found_GL_ARB_separate_shader_objects) {
			gl_UseProgramStages(m_pipeline, GL_FRAGMENT_SHADER_BIT, s);
		}
	}
}