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
path: root/source
diff options
context:
space:
mode:
authorMike Erwin <significant.bit@gmail.com>2015-11-24 10:20:38 +0300
committerMike Erwin <significant.bit@gmail.com>2015-11-24 10:21:07 +0300
commit291afea8ccdea57d4b2a51f134e9f53deeff964e (patch)
tree9e3b6368fa383b1aef835aa8bdeb7f55671579e1 /source
parent4ebede5d1f4db09091df69aa6e19b08b4b0fa535 (diff)
OpenGL: clean up use of old extensions
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c8
-rw-r--r--source/blender/blenkernel/intern/editderivedmesh.c8
-rw-r--r--source/blender/editors/interface/interface.c6
-rw-r--r--source/blender/editors/interface/interface_regions.c6
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c10
-rw-r--r--source/blender/gpu/GPU_extensions.h3
-rw-r--r--source/blender/gpu/GPU_select.h5
-rw-r--r--source/blender/gpu/intern/gpu_compositing.c20
-rw-r--r--source/blender/gpu/intern/gpu_debug.c4
-rw-r--r--source/blender/gpu/intern/gpu_draw.c42
-rw-r--r--source/blender/gpu/intern/gpu_extensions.c7
-rw-r--r--source/blender/gpu/intern/gpu_select.c24
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c10
13 files changed, 60 insertions, 93 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index 0c10a40e432..c705c7adedb 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -3431,7 +3431,7 @@ void DM_draw_attrib_vertex(DMVertexAttribs *attribs, int a, int index, int vert,
if (attribs->orco.gl_texco)
glTexCoord3fv(orco);
else
- glVertexAttrib3fvARB(attribs->orco.gl_index, orco);
+ glVertexAttrib3fv(attribs->orco.gl_index, orco);
}
/* uv texture coordinates */
@@ -3449,7 +3449,7 @@ void DM_draw_attrib_vertex(DMVertexAttribs *attribs, int a, int index, int vert,
if (attribs->tface[b].gl_texco)
glTexCoord2fv(uv);
else
- glVertexAttrib2fvARB(attribs->tface[b].gl_index, uv);
+ glVertexAttrib2fv(attribs->tface[b].gl_index, uv);
}
/* vertex colors */
@@ -3464,14 +3464,14 @@ void DM_draw_attrib_vertex(DMVertexAttribs *attribs, int a, int index, int vert,
col[0] = 0; col[1] = 0; col[2] = 0; col[3] = 0;
}
- glVertexAttrib4ubvARB(attribs->mcol[b].gl_index, col);
+ glVertexAttrib4ubv(attribs->mcol[b].gl_index, col);
}
/* tangent for normal mapping */
if (attribs->tottang) {
/*const*/ float (*array)[4] = attribs->tang.array;
const float *tang = (array) ? array[loop] : zero;
- glVertexAttrib4fvARB(attribs->tang.gl_index, tang);
+ glVertexAttrib4fv(attribs->tang.gl_index, tang);
}
}
diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c
index 88ae279050c..7fd241eb8e3 100644
--- a/source/blender/blenkernel/intern/editderivedmesh.c
+++ b/source/blender/blenkernel/intern/editderivedmesh.c
@@ -1226,7 +1226,7 @@ static void emdm_pass_attrib_vertex_glsl(const DMVertexAttribs *attribs, const B
if (attribs->orco.gl_texco)
glTexCoord3fv(orco);
else
- glVertexAttrib3fvARB(attribs->orco.gl_index, orco);
+ glVertexAttrib3fv(attribs->orco.gl_index, orco);
}
for (i = 0; i < attribs->tottface; i++) {
const float *uv;
@@ -1242,7 +1242,7 @@ static void emdm_pass_attrib_vertex_glsl(const DMVertexAttribs *attribs, const B
if (attribs->tface[i].gl_texco)
glTexCoord2fv(uv);
else
- glVertexAttrib2fvARB(attribs->tface[i].gl_index, uv);
+ glVertexAttrib2fv(attribs->tface[i].gl_index, uv);
}
for (i = 0; i < attribs->totmcol; i++) {
GLubyte col[4];
@@ -1253,7 +1253,7 @@ static void emdm_pass_attrib_vertex_glsl(const DMVertexAttribs *attribs, const B
else {
col[0] = 0; col[1] = 0; col[2] = 0; col[3] = 0;
}
- glVertexAttrib4ubvARB(attribs->mcol[i].gl_index, col);
+ glVertexAttrib4ubv(attribs->mcol[i].gl_index, col);
}
if (attribs->tottang) {
const float *tang;
@@ -1263,7 +1263,7 @@ static void emdm_pass_attrib_vertex_glsl(const DMVertexAttribs *attribs, const B
else {
tang = zero;
}
- glVertexAttrib4fvARB(attribs->tang.gl_index, tang);
+ glVertexAttrib4fv(attribs->tang.gl_index, tang);
}
}
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 5ad8acb46ab..e03273aa474 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -1344,9 +1344,9 @@ void UI_block_draw(const bContext *C, uiBlock *block)
UI_block_end(C, block);
/* disable AA, makes widgets too blurry */
- multisample_enabled = glIsEnabled(GL_MULTISAMPLE_ARB);
+ multisample_enabled = glIsEnabled(GL_MULTISAMPLE);
if (multisample_enabled)
- glDisable(GL_MULTISAMPLE_ARB);
+ glDisable(GL_MULTISAMPLE);
/* we set this only once */
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
@@ -1396,7 +1396,7 @@ void UI_block_draw(const bContext *C, uiBlock *block)
glPopMatrix();
if (multisample_enabled)
- glEnable(GL_MULTISAMPLE_ARB);
+ glEnable(GL_MULTISAMPLE);
ui_draw_links(block);
}
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index f394240c411..3a24625c36c 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -238,9 +238,9 @@ static void ui_tooltip_region_draw_cb(const bContext *UNUSED(C), ARegion *ar)
int i, multisample_enabled;
/* disable AA, makes widgets too blurry */
- multisample_enabled = glIsEnabled(GL_MULTISAMPLE_ARB);
+ multisample_enabled = glIsEnabled(GL_MULTISAMPLE);
if (multisample_enabled)
- glDisable(GL_MULTISAMPLE_ARB);
+ glDisable(GL_MULTISAMPLE);
wmOrtho2_region_ui(ar);
@@ -342,7 +342,7 @@ static void ui_tooltip_region_draw_cb(const bContext *UNUSED(C), ARegion *ar)
BLF_disable(blf_mono_font, BLF_WORD_WRAP);
if (multisample_enabled)
- glEnable(GL_MULTISAMPLE_ARB);
+ glEnable(GL_MULTISAMPLE);
}
static void ui_tooltip_region_free_cb(ARegion *ar)
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 7079ad04a8b..784c7bef7f7 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -1360,9 +1360,9 @@ static void backdrawview3d(Scene *scene, ARegion *ar, View3D *v3d)
/* dithering and AA break color coding, so disable */
glDisable(GL_DITHER);
- multisample_enabled = glIsEnabled(GL_MULTISAMPLE_ARB);
+ multisample_enabled = glIsEnabled(GL_MULTISAMPLE);
if (multisample_enabled)
- glDisable(GL_MULTISAMPLE_ARB);
+ glDisable(GL_MULTISAMPLE);
if (U.ogl_multisamples != USER_MULTISAMPLE_NONE) {
/* for multisample we use an offscreen FBO. multisample drawing can fail
@@ -1424,7 +1424,7 @@ static void backdrawview3d(Scene *scene, ARegion *ar, View3D *v3d)
glDisable(GL_DEPTH_TEST);
glEnable(GL_DITHER);
if (multisample_enabled)
- glEnable(GL_MULTISAMPLE_ARB);
+ glEnable(GL_MULTISAMPLE);
if (rv3d->rflag & RV3D_CLIPPING)
ED_view3d_clipping_disable();
@@ -3886,7 +3886,7 @@ static void view3d_main_area_draw_objects(const bContext *C, Scene *scene, View3
/* enables anti-aliasing for 3D view drawing */
if (U.ogl_multisamples != USER_MULTISAMPLE_NONE) {
- glEnable(GL_MULTISAMPLE_ARB);
+ glEnable(GL_MULTISAMPLE);
}
/* main drawing call */
@@ -3899,7 +3899,7 @@ static void view3d_main_area_draw_objects(const bContext *C, Scene *scene, View3
/* Disable back anti-aliasing */
if (U.ogl_multisamples != USER_MULTISAMPLE_NONE) {
- glDisable(GL_MULTISAMPLE_ARB);
+ glDisable(GL_MULTISAMPLE);
}
if (v3d->lay_used != lay_used) { /* happens when loading old files or loading with UI load */
diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_extensions.h
index 685ae59c47b..e07f9025090 100644
--- a/source/blender/gpu/GPU_extensions.h
+++ b/source/blender/gpu/GPU_extensions.h
@@ -61,7 +61,6 @@ void GPU_extensions_disable(void);
bool GPU_glsl_support(void);
bool GPU_non_power_of_two_support(void);
-bool GPU_vertex_buffer_support(void);
bool GPU_display_list_support(void);
bool GPU_bicubic_bump_support(void);
bool GPU_geometry_shader_support(void);
@@ -195,7 +194,7 @@ typedef enum GPUProgramType {
GPU_PROGRAM_TYPE_FRAGMENT = 0
} GPUProgramType;
-
+/* TODO: remove ARB program support (recode smoke shader in GLSL) */
GPUProgram *GPU_program_shader_create(GPUProgramType type, const char *code);
void GPU_program_free(GPUProgram *program);
void GPU_program_parameter_4f(GPUProgram *program, unsigned int location, float x, float y, float z, float w);
diff --git a/source/blender/gpu/GPU_select.h b/source/blender/gpu/GPU_select.h
index 09137fc998b..5dff7116336 100644
--- a/source/blender/gpu/GPU_select.h
+++ b/source/blender/gpu/GPU_select.h
@@ -52,10 +52,7 @@ bool GPU_select_load_id(unsigned int id);
* if dopass is true, we will do a second pass with occlusion queries to get the closest hit */
unsigned int GPU_select_end(void);
-/* does the GPU support occlusion queries? */
-bool GPU_select_query_check_support(void);
-
-/* is occlusion query supported and user activated? */
+/* has user activated? */
bool GPU_select_query_check_active(void);
#endif
diff --git a/source/blender/gpu/intern/gpu_compositing.c b/source/blender/gpu/intern/gpu_compositing.c
index e8795a0e00e..1ad35c1edae 100644
--- a/source/blender/gpu/intern/gpu_compositing.c
+++ b/source/blender/gpu/intern/gpu_compositing.c
@@ -179,14 +179,13 @@ GPUFX *GPU_fx_compositor_create(void)
{
GPUFX *fx = MEM_callocN(sizeof(GPUFX), "GPUFX compositor");
- if (GLEW_ARB_vertex_buffer_object) {
- glGenBuffersARB(1, &fx->vbuffer);
- glBindBuffer(GL_ARRAY_BUFFER, fx->vbuffer);
- glBufferDataARB(GL_ARRAY_BUFFER_ARB, 16 * sizeof(float), NULL, GL_STATIC_DRAW);
- glBufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, 8 * sizeof(float), fullscreencos);
- glBufferSubDataARB(GL_ARRAY_BUFFER_ARB, 8 * sizeof(float), 8 * sizeof(float), fullscreenuvs);
- glBindBuffer(GL_ARRAY_BUFFER, 0);
- }
+ glGenBuffers(1, &fx->vbuffer);
+ glBindBuffer(GL_ARRAY_BUFFER, fx->vbuffer);
+ glBufferData(GL_ARRAY_BUFFER, 16 * sizeof(float), NULL, GL_STATIC_DRAW);
+ glBufferSubData(GL_ARRAY_BUFFER, 0, 8 * sizeof(float), fullscreencos);
+ glBufferSubData(GL_ARRAY_BUFFER, 8 * sizeof(float), 8 * sizeof(float), fullscreenuvs);
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
+
return fx;
}
@@ -275,8 +274,7 @@ static void cleanup_fx_gl_data(GPUFX *fx, bool do_fbo)
void GPU_fx_compositor_destroy(GPUFX *fx)
{
cleanup_fx_gl_data(fx, true);
- if (GLEW_ARB_vertex_buffer_object)
- glDeleteBuffersARB(1, &fx->vbuffer);
+ glDeleteBuffers(1, &fx->vbuffer);
MEM_freeN(fx);
}
@@ -306,7 +304,7 @@ bool GPU_fx_compositor_initialize_passes(
fx->effects = 0;
- if (!GPU_non_power_of_two_support() || !GLEW_EXT_framebuffer_object || !GLEW_ARB_fragment_shader)
+ if (!GPU_non_power_of_two_support() || !GLEW_EXT_framebuffer_object)
return false;
if (!fx_settings) {
diff --git a/source/blender/gpu/intern/gpu_debug.c b/source/blender/gpu/intern/gpu_debug.c
index 29b7ff11586..ce1ddafa3e4 100644
--- a/source/blender/gpu/intern/gpu_debug.c
+++ b/source/blender/gpu/intern/gpu_debug.c
@@ -457,7 +457,7 @@ void GPU_state_print(void)
gpu_state_print_fl(GL_FOG_INDEX);
gpu_state_print_fl(GL_FOG_MODE);
gpu_state_print_fl(GL_FOG_START);
- gpu_state_print_fl(GL_FRAGMENT_PROGRAM_ARB);
+ gpu_state_print_fl(GL_FRAGMENT_PROGRAM_ARB); /* TODO: remove ARB program support */
gpu_state_print_fl(GL_FRAGMENT_SHADER_DERIVATIVE_HINT);
gpu_state_print_fl(GL_FRONT_FACE);
gpu_state_print_fl(GL_GENERATE_MIPMAP_HINT);
@@ -560,7 +560,6 @@ void GPU_state_print(void)
gpu_state_print_fl(GL_MODELVIEW_MATRIX);
gpu_state_print_fl(GL_MODELVIEW_STACK_DEPTH);
gpu_state_print_fl(GL_MULTISAMPLE);
- gpu_state_print_fl(GL_MULTISAMPLE_ARB);
gpu_state_print_fl(GL_NAME_STACK_DEPTH);
gpu_state_print_fl(GL_NORMALIZE);
gpu_state_print_fl(GL_NORMAL_ARRAY);
@@ -686,7 +685,6 @@ void GPU_state_print(void)
gpu_state_print_fl(GL_TEXTURE_COORD_ARRAY_STRIDE);
gpu_state_print_fl(GL_TEXTURE_COORD_ARRAY_TYPE);
gpu_state_print_fl(GL_TEXTURE_CUBE_MAP);
- gpu_state_print_fl(GL_TEXTURE_CUBE_MAP_ARB);
gpu_state_print_fl(GL_TEXTURE_GEN_Q);
gpu_state_print_fl(GL_TEXTURE_GEN_R);
gpu_state_print_fl(GL_TEXTURE_GEN_S);
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index 3ad396a532c..f71733064c4 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -182,17 +182,17 @@ void GPU_render_text(
uv[2][1] = (uv_quad[2][1] - centery) * sizey + transy;
glBegin(GL_POLYGON);
- if (glattrib >= 0) glVertexAttrib2fvARB(glattrib, uv[0]);
+ if (glattrib >= 0) glVertexAttrib2fv(glattrib, uv[0]);
else glTexCoord2fv(uv[0]);
if (col) gpu_mcol(col[0]);
glVertex3f(sizex * v1[0] + movex, sizey * v1[1] + movey, v1[2]);
- if (glattrib >= 0) glVertexAttrib2fvARB(glattrib, uv[1]);
+ if (glattrib >= 0) glVertexAttrib2fv(glattrib, uv[1]);
else glTexCoord2fv(uv[1]);
if (col) gpu_mcol(col[1]);
glVertex3f(sizex * v2[0] + movex, sizey * v2[1] + movey, v2[2]);
- if (glattrib >= 0) glVertexAttrib2fvARB(glattrib, uv[2]);
+ if (glattrib >= 0) glVertexAttrib2fv(glattrib, uv[2]);
else glTexCoord2fv(uv[2]);
if (col) gpu_mcol(col[2]);
glVertex3f(sizex * v3[0] + movex, sizey * v3[1] + movey, v3[2]);
@@ -201,7 +201,7 @@ void GPU_render_text(
uv[3][0] = (uv_quad[3][0] - centerx) * sizex + transx;
uv[3][1] = (uv_quad[3][1] - centery) * sizey + transy;
- if (glattrib >= 0) glVertexAttrib2fvARB(glattrib, uv[3]);
+ if (glattrib >= 0) glVertexAttrib2fv(glattrib, uv[3]);
else glTexCoord2fv(uv[3]);
if (col) gpu_mcol(col[3]);
glVertex3f(sizex * v4[0] + movex, sizey * v4[1] + movey, v4[2]);
@@ -2039,33 +2039,31 @@ int GPU_scene_object_lights(Scene *scene, Object *ob, int lay, float viewmat[4][
static void gpu_multisample(bool enable)
{
- if (GLEW_VERSION_1_3 || GLEW_ARB_multisample) {
#ifdef __linux__
- /* changing multisample from the default (enabled) causes problems on some
- * systems (NVIDIA/Linux) when the pixel format doesn't have a multisample buffer */
- bool toggle_ok = true;
+ /* changing multisample from the default (enabled) causes problems on some
+ * systems (NVIDIA/Linux) when the pixel format doesn't have a multisample buffer */
+ bool toggle_ok = true;
- if (GPU_type_matches(GPU_DEVICE_NVIDIA, GPU_OS_UNIX, GPU_DRIVER_ANY)) {
- int samples = 0;
- glGetIntegerv(GL_SAMPLES, &samples);
+ if (GPU_type_matches(GPU_DEVICE_NVIDIA, GPU_OS_UNIX, GPU_DRIVER_ANY)) {
+ int samples = 0;
+ glGetIntegerv(GL_SAMPLES, &samples);
- if (samples == 0)
- toggle_ok = false;
- }
+ if (samples == 0)
+ toggle_ok = false;
+ }
- if (toggle_ok) {
- if (enable)
- glEnable(GL_MULTISAMPLE);
- else
- glDisable(GL_MULTISAMPLE);
- }
-#else
+ if (toggle_ok) {
if (enable)
glEnable(GL_MULTISAMPLE);
else
glDisable(GL_MULTISAMPLE);
-#endif
}
+#else
+ if (enable)
+ glEnable(GL_MULTISAMPLE);
+ else
+ glDisable(GL_MULTISAMPLE);
+#endif
}
/* Default OpenGL State */
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index 270cf6c70d7..3ff8ab5b4c8 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -283,11 +283,6 @@ bool GPU_non_power_of_two_support(void)
return !GG.npotdisabled;
}
-bool GPU_vertex_buffer_support(void)
-{
- return true;
-}
-
bool GPU_display_list_support(void)
{
return !GG.dlistsdisabled;
@@ -1780,7 +1775,7 @@ void GPU_program_unbind(GPUProgram *program)
GPUProgram *GPU_program_shader_create(GPUProgramType type, const char *code)
{
- /* TODO(merwin): remove ARB shader support (recode smoke shader in GLSL) */
+ /* TODO(merwin): remove ARB program support (recode smoke shader in GLSL) */
GPUProgram *program;
GLint error_pos, is_native;
diff --git a/source/blender/gpu/intern/gpu_select.c b/source/blender/gpu/intern/gpu_select.c
index 4978229a350..44847dd5a48 100644
--- a/source/blender/gpu/intern/gpu_select.c
+++ b/source/blender/gpu/intern/gpu_select.c
@@ -95,7 +95,7 @@ void GPU_select_begin(unsigned int *buffer, unsigned int bufsize, rctf *input, c
g_query_state.queries = MEM_mallocN(g_query_state.num_of_queries * sizeof(*g_query_state.queries), "gpu selection queries");
g_query_state.id = MEM_mallocN(g_query_state.num_of_queries * sizeof(*g_query_state.id), "gpu selection ids");
- glGenQueriesARB(g_query_state.num_of_queries, g_query_state.queries);
+ glGenQueries(g_query_state.num_of_queries, g_query_state.queries);
glPushAttrib(GL_DEPTH_BUFFER_BIT | GL_VIEWPORT_BIT);
/* disable writing to the framebuffer */
@@ -144,17 +144,17 @@ bool GPU_select_load_id(unsigned int id)
}
else {
if (g_query_state.query_issued) {
- glEndQueryARB(GL_SAMPLES_PASSED_ARB);
+ glEndQuery(GL_SAMPLES_PASSED);
}
/* if required, allocate extra queries */
if (g_query_state.active_query == g_query_state.num_of_queries) {
g_query_state.num_of_queries += ALLOC_QUERIES;
g_query_state.queries = MEM_reallocN(g_query_state.queries, g_query_state.num_of_queries * sizeof(*g_query_state.queries));
g_query_state.id = MEM_reallocN(g_query_state.id, g_query_state.num_of_queries * sizeof(*g_query_state.id));
- glGenQueriesARB(ALLOC_QUERIES, &g_query_state.queries[g_query_state.active_query]);
+ glGenQueries(ALLOC_QUERIES, &g_query_state.queries[g_query_state.active_query]);
}
- glBeginQueryARB(GL_SAMPLES_PASSED_ARB, g_query_state.queries[g_query_state.active_query]);
+ glBeginQuery(GL_SAMPLES_PASSED, g_query_state.queries[g_query_state.active_query]);
g_query_state.id[g_query_state.active_query] = id;
g_query_state.active_query++;
g_query_state.query_issued = true;
@@ -184,12 +184,12 @@ unsigned int GPU_select_end(void)
int i;
if (g_query_state.query_issued) {
- glEndQueryARB(GL_SAMPLES_PASSED_ARB);
+ glEndQuery(GL_SAMPLES_PASSED);
}
for (i = 0; i < g_query_state.active_query; i++) {
unsigned int result;
- glGetQueryObjectuivARB(g_query_state.queries[i], GL_QUERY_RESULT_ARB, &result);
+ glGetQueryObjectuiv(g_query_state.queries[i], GL_QUERY_RESULT, &result);
if (result > 0) {
if (g_query_state.mode != GPU_SELECT_NEAREST_SECOND_PASS) {
int maxhits = g_query_state.bufsize / 4;
@@ -221,7 +221,7 @@ unsigned int GPU_select_end(void)
}
}
- glDeleteQueriesARB(g_query_state.num_of_queries, g_query_state.queries);
+ glDeleteQueries(g_query_state.num_of_queries, g_query_state.queries);
MEM_freeN(g_query_state.queries);
MEM_freeN(g_query_state.id);
glPopAttrib();
@@ -233,16 +233,8 @@ unsigned int GPU_select_end(void)
return hits;
}
-
-bool GPU_select_query_check_support(void)
-{
- return GLEW_ARB_occlusion_query;
-}
-
-
bool GPU_select_query_check_active(void)
{
- return GLEW_ARB_occlusion_query &&
- ((U.gpu_select_method == USER_SELECT_USE_OCCLUSION_QUERY) ||
+ return ((U.gpu_select_method == USER_SELECT_USE_OCCLUSION_QUERY) ||
((U.gpu_select_method == USER_SELECT_AUTO) && GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_ANY, GPU_DRIVER_ANY)));
}
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 83c159a46dd..73d46fc7e45 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -381,11 +381,6 @@ static void rna_UserDef_viewport_lights_update(Main *bmain, Scene *scene, Pointe
rna_userdef_update(bmain, scene, ptr);
}
-static int rna_Scene_GPU_selection_supported(UserDef *UNUSED(U))
-{
- return GPU_select_query_check_support();
-}
-
static void rna_userdef_autosave_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
wmWindowManager *wm = bmain->wm.first;
@@ -4219,11 +4214,6 @@ static void rna_def_userdef_system(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Text Anti-aliasing", "Draw user interface text anti-aliased");
RNA_def_property_update(prop, 0, "rna_userdef_text_update");
- func = RNA_def_function(srna, "is_occlusion_query_supported", "rna_Scene_GPU_selection_supported");
- parm = RNA_def_boolean(func, "is_supported", 0, "Occlusion Query Support",
- "Check if GPU supports Occlusion Queries");
- RNA_def_function_return(func, parm);
-
prop = RNA_def_property(srna, "select_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "gpu_select_method");
RNA_def_property_enum_items(prop, gpu_select_method_items);