Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2017-05-19 15:15:49 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-05-19 15:15:49 +0300
commit2383667a2e67aeb645792b52ad508c2fd2178202 (patch)
tree342e28eda77f010cdf9f42f13963e65990a5a4c9 /intern/opensubdiv
parent3527739002407ac9b1698beb1cde58b0077e3b78 (diff)
Remove reference to WITH_LEGACY_OPENGL
We only keep this as a way to get GPU_stubs to run, in case we want to do a throughout cleanup in the codebase and want code using legacy calls to fail to build.
Diffstat (limited to 'intern/opensubdiv')
-rw-r--r--intern/opensubdiv/opensubdiv_gpu_capi.cc50
1 files changed, 0 insertions, 50 deletions
diff --git a/intern/opensubdiv/opensubdiv_gpu_capi.cc b/intern/opensubdiv/opensubdiv_gpu_capi.cc
index 32474d7cb60..811cd18745e 100644
--- a/intern/opensubdiv/opensubdiv_gpu_capi.cc
+++ b/intern/opensubdiv/opensubdiv_gpu_capi.cc
@@ -344,27 +344,6 @@ void bindProgram(OpenSubdiv_GLMesh *gl_mesh, int program)
glBindBufferBase(GL_UNIFORM_BUFFER, 0, g_lighting_ub);
/* Color */
-#ifdef WITH_LEGACY_OPENGL
- GLboolean use_lighting;
- glGetBooleanv(GL_LIGHTING, &use_lighting);
-
- if (use_lighting) {
- float color[4];
- glGetMaterialfv(GL_FRONT, GL_DIFFUSE, color);
- glUniform4fv(glGetUniformLocation(program, "diffuse"), 1, color);
-
- glGetMaterialfv(GL_FRONT, GL_SPECULAR, color);
- glUniform4fv(glGetUniformLocation(program, "specular"), 1, color);
-
- glGetMaterialfv(GL_FRONT, GL_SHININESS, color);
- glUniform1f(glGetUniformLocation(program, "shininess"), color[0]);
- }
- else {
- float color[4];
- glGetFloatv(GL_CURRENT_COLOR, color);
- glUniform4fv(glGetUniformLocation(program, "diffuse"), 1, color);
- }
-#else
{
/* TODO: stop using glGetMaterial */
float color[4];
@@ -377,7 +356,6 @@ void bindProgram(OpenSubdiv_GLMesh *gl_mesh, int program)
glGetMaterialfv(GL_FRONT, GL_SHININESS, color);
glUniform1f(glGetUniformLocation(program, "shininess"), color[0]);
}
-#endif
/* Face-vertex data */
if (gl_mesh->fvar_data != NULL) {
@@ -642,33 +620,6 @@ static GLuint prepare_patchDraw(OpenSubdiv_GLMesh *gl_mesh,
glGetIntegerv(GL_SHADE_MODEL, &model);
glGetBooleanv(GL_TEXTURE_2D, &use_texture_2d);
-#ifdef WITH_LEGACY_OPENGL
- glGetBooleanv(GL_LIGHTING, &use_lighting);
- if (model == GL_FLAT) {
- if (use_texture_2d) {
- program = use_lighting
- ? g_flat_fill_texture2d_program
- : g_flat_fill_texture2d_shadeless_program;
- }
- else {
- program = use_lighting
- ? g_flat_fill_solid_program
- : g_flat_fill_solid_shadeless_program;
- }
- }
- else {
- if (use_texture_2d) {
- program = use_lighting
- ? g_smooth_fill_texture2d_program
- : g_smooth_fill_texture2d_shadeless_program;
- }
- else {
- program = use_lighting
- ? g_smooth_fill_solid_program
- : g_smooth_fill_solid_shadeless_program;
- }
- }
-#else
if (model == GL_FLAT) {
if (use_texture_2d) {
program = g_flat_fill_texture2d_program;
@@ -685,7 +636,6 @@ static GLuint prepare_patchDraw(OpenSubdiv_GLMesh *gl_mesh,
program = g_smooth_fill_solid_program;
}
}
-#endif
}
else {