diff --git a/panda/src/glstuff/glGeomMunger_src.cxx b/panda/src/glstuff/glGeomMunger_src.cxx index 91888e2822..1dbf889454 100644 --- a/panda/src/glstuff/glGeomMunger_src.cxx +++ b/panda/src/glstuff/glGeomMunger_src.cxx @@ -36,9 +36,9 @@ CLP(GeomMunger)(GraphicsStateGuardian *gsg, const RenderState *state) : _flags = 0; - if (CLP(interleaved_arrays)) { + if (gl_interleaved_arrays) { _flags |= F_interleaved_arrays; - } else if (CLP(parallel_arrays)) { + } else if (gl_parallel_arrays) { _flags |= F_parallel_arrays; } } diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.I b/panda/src/glstuff/glGraphicsStateGuardian_src.I index 0a260d32ae..bebd422988 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.I +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.I @@ -161,7 +161,7 @@ get_gl_version_minor() const { INLINE void CLP(GraphicsStateGuardian):: maybe_gl_finish() const { #ifdef DO_PSTATS - if (CLP(finish)) { + if (gl_finish) { glFinish(); } #endif diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index af2329da04..3379aa2aab 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -306,11 +306,11 @@ CLP(GraphicsStateGuardian)(GraphicsEngine *engine, GraphicsPipe *pipe) : _is_hardware = true; // calling glGetError() forces a sync, this turns it off if you want to. - _track_errors = !CLP(force_no_error); - _allow_flush = !CLP(force_no_flush); + _track_errors = !gl_force_no_error; + _allow_flush = !gl_force_no_flush; #ifdef DO_PSTATS - if (CLP(finish)) { + if (gl_finish) { GLCAT.warning() << "The config variable gl-finish is set True. This may have a substantial negative impact your render performance.\n"; } @@ -510,7 +510,7 @@ reset() { In the meantime, you must put both "matrix-palette 1" and "gl-matrix-palette 1" in your Config.prc to exercise the new code. */ - if (!CLP(matrix_palette)) { + if (!gl_matrix_palette) { if (_supports_matrix_palette) { if (GLCAT.is_debug()) { GLCAT.debug() << "Forcing off matrix palette support.\n"; @@ -777,7 +777,7 @@ reset() { _supports_rescale_normal = true; #else _supports_rescale_normal = - CLP(support_rescale_normal) && + gl_support_rescale_normal && (has_extension("GL_EXT_rescale_normal") || is_at_least_gl_version(1, 2)); #endif @@ -1269,7 +1269,7 @@ reset() { #endif _supports_occlusion_query = false; - if (CLP(support_occlusion_query)) { + if (gl_support_occlusion_query) { if (is_at_least_gl_version(1, 5)) { _supports_occlusion_query = true; @@ -1389,7 +1389,7 @@ reset() { _border_clamp = _edge_clamp; #ifndef OPENGLES - if (CLP(support_clamp_to_border) && + if (gl_support_clamp_to_border && (has_extension("GL_ARB_texture_border_clamp") || is_at_least_gl_version(1, 3))) { _border_clamp = GL_CLAMP_TO_BORDER; @@ -1756,7 +1756,7 @@ reset() { report_my_gl_errors(); #ifndef OPENGLES_2 - if (CLP(cheap_textures)) { + if (gl_cheap_textures) { GLCAT.info() << "Setting glHint() for fastest textures.\n"; glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST); @@ -1981,7 +1981,7 @@ clear(DrawableRegion *clearable) { if (clearable->get_clear_color_active()) { LColor v = clearable->get_clear_color(); glClearColor(v[0],v[1],v[2],v[3]); - if (CLP(color_mask)) { + if (gl_color_mask) { glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); } _state_mask.clear_bit(ColorWriteAttrib::get_class_slot()); @@ -2187,7 +2187,7 @@ begin_frame(Thread *current_thread) { #ifndef NDEBUG _show_texture_usage = false; - if (CLP(show_texture_usage)) { + if (gl_show_texture_usage) { // When this is true, then every other second, we show the usage // textures instead of the real textures. double now = ClockObject::get_global_clock()->get_frame_time(); @@ -2196,7 +2196,7 @@ begin_frame(Thread *current_thread) { _show_texture_usage = true; _show_texture_usage_index = this_second >> 1; - int max_size = CLP(show_texture_usage_max_size); + int max_size = gl_show_texture_usage_max_size; if (max_size != _show_texture_usage_max_size) { // Remove the cache of usage textures; we've changed the max // size. @@ -2561,7 +2561,7 @@ begin_draw_primitives(const GeomPipelineReader *geom_reader, // If it has been modified, or this is the first time, then we // need to build the display list up. - if (CLP(compile_and_execute)) { + if (gl_compile_and_execute) { glNewList(_geom_display_list, GL_COMPILE_AND_EXECUTE); } else { glNewList(_geom_display_list, GL_COMPILE); @@ -2884,7 +2884,7 @@ update_standard_vertex_arrays(bool force) { void CLP(GraphicsStateGuardian):: unbind_buffers() { if (_current_vbuffer_index != 0) { - if (GLCAT.is_spam() && CLP(debug_buffers)) { + if (GLCAT.is_spam() && gl_debug_buffers) { GLCAT.spam() << "unbinding vertex buffer\n"; } @@ -2892,7 +2892,7 @@ unbind_buffers() { _current_vbuffer_index = 0; } if (_current_ibuffer_index != 0) { - if (GLCAT.is_spam() && CLP(debug_buffers)) { + if (GLCAT.is_spam() && gl_debug_buffers) { GLCAT.spam() << "unbinding index buffer\n"; } @@ -3450,7 +3450,7 @@ end_draw_primitives() { glEndList(); _load_display_list_pcollector.stop(); - if (!CLP(compile_and_execute)) { + if (!gl_compile_and_execute) { glCallList(_geom_display_list); } _primitive_batches_display_list_pcollector.add_level(1); @@ -3747,7 +3747,7 @@ prepare_vertex_buffer(GeomVertexArrayData *data) { CLP(VertexBufferContext) *gvbc = new CLP(VertexBufferContext)(this, _prepared_objects, data); _glGenBuffers(1, &gvbc->_index); - if (GLCAT.is_debug() && CLP(debug_buffers)) { + if (GLCAT.is_debug() && gl_debug_buffers) { GLCAT.debug() << "creating vertex buffer " << (int)gvbc->_index << ": " << data->get_num_rows() << " vertices " @@ -3780,7 +3780,7 @@ apply_vertex_buffer(VertexBufferContext *vbc, CLP(VertexBufferContext) *gvbc = DCAST(CLP(VertexBufferContext), vbc); if (_current_vbuffer_index != gvbc->_index) { - if (GLCAT.is_spam() && CLP(debug_buffers)) { + if (GLCAT.is_spam() && gl_debug_buffers) { GLCAT.spam() << "binding vertex buffer " << (int)gvbc->_index << "\n"; } @@ -3791,7 +3791,7 @@ apply_vertex_buffer(VertexBufferContext *vbc, if (gvbc->was_modified(reader)) { int num_bytes = reader->get_data_size_bytes(); - if (GLCAT.is_debug() && CLP(debug_buffers)) { + if (GLCAT.is_debug() && gl_debug_buffers) { GLCAT.debug() << "copying " << num_bytes << " bytes into vertex buffer " << (int)gvbc->_index << "\n"; @@ -3836,7 +3836,7 @@ release_vertex_buffer(VertexBufferContext *vbc) { CLP(VertexBufferContext) *gvbc = DCAST(CLP(VertexBufferContext), vbc); - if (GLCAT.is_debug() && CLP(debug_buffers)) { + if (GLCAT.is_debug() && gl_debug_buffers) { GLCAT.debug() << "deleting vertex buffer " << (int)gvbc->_index << "\n"; } @@ -3846,7 +3846,7 @@ release_vertex_buffer(VertexBufferContext *vbc) { // help out a flaky driver, and we need to keep our internal state // consistent anyway. if (_current_vbuffer_index == gvbc->_index) { - if (GLCAT.is_spam() && CLP(debug_buffers)) { + if (GLCAT.is_spam() && gl_debug_buffers) { GLCAT.spam() << "unbinding vertex buffer\n"; } @@ -3890,11 +3890,11 @@ setup_array_data(const unsigned char *&client_pointer, return (client_pointer != NULL); } if (!vertex_buffers || _geom_display_list != 0 || - array_reader->get_usage_hint() < CLP(min_buffer_usage_hint)) { + array_reader->get_usage_hint() < gl_min_buffer_usage_hint) { // The array specifies client rendering only, or buffer objects // are configured off. if (_current_vbuffer_index != 0) { - if (GLCAT.is_spam() && CLP(debug_buffers)) { + if (GLCAT.is_spam() && gl_debug_buffers) { GLCAT.spam() << "unbinding vertex buffer\n"; } @@ -3936,7 +3936,7 @@ prepare_index_buffer(GeomPrimitive *data) { CLP(IndexBufferContext) *gibc = new CLP(IndexBufferContext)(this, _prepared_objects, data); _glGenBuffers(1, &gibc->_index); - if (GLCAT.is_debug() && CLP(debug_buffers)) { + if (GLCAT.is_debug() && gl_debug_buffers) { GLCAT.debug() << "creating index buffer " << (int)gibc->_index << ": " << data->get_num_vertices() << " indices (" @@ -3972,7 +3972,7 @@ apply_index_buffer(IndexBufferContext *ibc, CLP(IndexBufferContext) *gibc = DCAST(CLP(IndexBufferContext), ibc); if (_current_ibuffer_index != gibc->_index) { - if (GLCAT.is_spam() && CLP(debug_buffers)) { + if (GLCAT.is_spam() && gl_debug_buffers) { GLCAT.spam() << "binding index buffer " << (int)gibc->_index << "\n"; } @@ -3983,7 +3983,7 @@ apply_index_buffer(IndexBufferContext *ibc, if (gibc->was_modified(reader)) { int num_bytes = reader->get_data_size_bytes(); - if (GLCAT.is_debug() && CLP(debug_buffers)) { + if (GLCAT.is_debug() && gl_debug_buffers) { GLCAT.debug() << "copying " << num_bytes << " bytes into index buffer " << (int)gibc->_index << "\n"; @@ -4028,7 +4028,7 @@ release_index_buffer(IndexBufferContext *ibc) { CLP(IndexBufferContext) *gibc = DCAST(CLP(IndexBufferContext), ibc); - if (GLCAT.is_debug() && CLP(debug_buffers)) { + if (GLCAT.is_debug() && gl_debug_buffers) { GLCAT.debug() << "deleting index buffer " << (int)gibc->_index << "\n"; } @@ -4038,7 +4038,7 @@ release_index_buffer(IndexBufferContext *ibc) { // help out a flaky driver, and we need to keep our internal state // consistent anyway. if (_current_ibuffer_index == gibc->_index) { - if (GLCAT.is_spam() && CLP(debug_buffers)) { + if (GLCAT.is_spam() && gl_debug_buffers) { GLCAT.spam() << "unbinding index buffer\n"; } @@ -4086,7 +4086,7 @@ setup_primitive(const unsigned char *&client_pointer, // The array specifies client rendering only, or buffer objects // are configured off. if (_current_ibuffer_index != 0) { - if (GLCAT.is_spam() && CLP(debug_buffers)) { + if (GLCAT.is_spam() && gl_debug_buffers) { GLCAT.spam() << "unbinding index buffer\n"; } @@ -4224,7 +4224,7 @@ framebuffer_copy_to_texture(Texture *tex, int view, int z, const DisplayRegion *dr, const RenderBuffer &rb) { nassertr(tex != NULL && dr != NULL, false); set_read_buffer(rb._buffer_type); - if (CLP(color_mask)) { + if (gl_color_mask) { glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); } @@ -4315,7 +4315,7 @@ framebuffer_copy_to_texture(Texture *tex, int view, int z, int height = tex->get_y_size(); int depth = tex->get_z_size(); - bool uses_mipmaps = tex->uses_mipmaps() && !CLP(ignore_mipmaps); + bool uses_mipmaps = tex->uses_mipmaps() && !gl_ignore_mipmaps; if (uses_mipmaps) { #ifndef OPENGLES_2 if (_supports_generate_mipmap) { @@ -4414,7 +4414,7 @@ framebuffer_copy_to_ram(Texture *tex, int view, int z, nassertr(tex != NULL && dr != NULL, false); set_read_buffer(rb._buffer_type); glPixelStorei(GL_PACK_ALIGNMENT, 1); - if (CLP(color_mask)) { + if (gl_color_mask) { glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); } @@ -5121,7 +5121,7 @@ do_issue_material() { glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, material->get_local()); glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, material->get_twoside()); - if (CLP(separate_specular_color)) { + if (gl_separate_specular_color) { glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR); } else { glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SINGLE_COLOR); @@ -5154,7 +5154,7 @@ do_issue_blending() { int color_write_slot = ColorWriteAttrib::get_class_slot(); enable_multisample_alpha_one(false); enable_multisample_alpha_mask(false); - if (CLP(color_mask)) { + if (gl_color_mask) { enable_blend(false); glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); } else { @@ -5164,7 +5164,7 @@ do_issue_blending() { } return; } else { - if (CLP(color_mask)) { + if (gl_color_mask) { glColorMask((color_channels & ColorWriteAttrib::C_red) != 0, (color_channels & ColorWriteAttrib::C_green) != 0, (color_channels & ColorWriteAttrib::C_blue) != 0, @@ -5526,7 +5526,7 @@ gl_get_error() const { bool CLP(GraphicsStateGuardian):: report_errors_loop(int line, const char *source_file, GLenum error_code, int &error_count) { - while ((CLP(max_errors) < 0 || error_count < CLP(max_errors)) && + while ((gl_max_errors < 0 || error_count < gl_max_errors) && (error_code != GL_NO_ERROR)) { GLCAT.error() << "at " << line << " of " << source_file << " : " @@ -5946,7 +5946,7 @@ set_draw_buffer(int rbtype) { #endif // OPENGLES // Also ensure that any global color channels are masked out. - if (CLP(color_mask)) { + if (gl_color_mask) { glColorMask((_color_write_mask & ColorWriteAttrib::C_red) != 0, (_color_write_mask & ColorWriteAttrib::C_green) != 0, (_color_write_mask & ColorWriteAttrib::C_blue) != 0, @@ -6136,7 +6136,7 @@ get_texture_target(Texture::TextureType texture_type) const { //////////////////////////////////////////////////////////////////// GLenum CLP(GraphicsStateGuardian):: get_texture_wrap_mode(Texture::WrapMode wm) const { - if (CLP(ignore_clamp)) { + if (gl_ignore_clamp) { return GL_REPEAT; } switch (wm) { @@ -6206,7 +6206,7 @@ get_panda_wrap_mode(GLenum wm) { //////////////////////////////////////////////////////////////////// GLenum CLP(GraphicsStateGuardian):: get_texture_filter_type(Texture::FilterType ft, bool ignore_mipmaps) { - if (CLP(ignore_filters)) { + if (gl_ignore_filters) { return GL_NEAREST; } else if (ignore_mipmaps) { @@ -8696,10 +8696,10 @@ specify_texture(CLP(TextureContext) *gtc) { Texture::FilterType minfilter = tex->get_effective_minfilter(); Texture::FilterType magfilter = tex->get_effective_magfilter(); - bool uses_mipmaps = Texture::is_mipmap(minfilter) && !CLP(ignore_mipmaps); + bool uses_mipmaps = Texture::is_mipmap(minfilter) && !gl_ignore_mipmaps; #ifndef NDEBUG - if (CLP(force_mipmaps)) { + if (gl_force_mipmaps) { minfilter = Texture::FT_linear_mipmap_linear; magfilter = Texture::FT_linear; uses_mipmaps = true; @@ -8965,10 +8965,10 @@ upload_texture(CLP(TextureContext) *gtc, bool force) { glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - bool uses_mipmaps = (tex->uses_mipmaps() && !CLP(ignore_mipmaps)) || CLP(force_mipmaps); + bool uses_mipmaps = (tex->uses_mipmaps() && !gl_ignore_mipmaps) || gl_force_mipmaps; #ifndef NDEBUG - if (CLP(force_mipmaps)) { + if (gl_force_mipmaps) { uses_mipmaps = true; } #endif diff --git a/panda/src/glstuff/glIndexBufferContext_src.cxx b/panda/src/glstuff/glIndexBufferContext_src.cxx index 8111a06dd3..529d6cdad1 100644 --- a/panda/src/glstuff/glIndexBufferContext_src.cxx +++ b/panda/src/glstuff/glIndexBufferContext_src.cxx @@ -35,7 +35,7 @@ evict_lru() { // Make sure the buffer is unbound before we delete it. if (_glgsg->_current_ibuffer_index == _index) { - if (GLCAT.is_debug() && CLP(debug_buffers)) { + if (GLCAT.is_debug() && gl_debug_buffers) { GLCAT.debug() << "unbinding index buffer\n"; } diff --git a/panda/src/glstuff/glVertexBufferContext_src.cxx b/panda/src/glstuff/glVertexBufferContext_src.cxx index 1323f8dffc..73ef6ffa67 100644 --- a/panda/src/glstuff/glVertexBufferContext_src.cxx +++ b/panda/src/glstuff/glVertexBufferContext_src.cxx @@ -35,7 +35,7 @@ evict_lru() { // Make sure the buffer is unbound before we delete it. if (_glgsg->_current_vbuffer_index == _index) { - if (GLCAT.is_debug() && CLP(debug_buffers)) { + if (GLCAT.is_debug() && gl_debug_buffers) { GLCAT.debug() << "unbinding vertex buffer\n"; } diff --git a/panda/src/glstuff/glmisc_src.cxx b/panda/src/glstuff/glmisc_src.cxx index 566c292912..4f2e08dcc2 100644 --- a/panda/src/glstuff/glmisc_src.cxx +++ b/panda/src/glstuff/glmisc_src.cxx @@ -14,45 +14,45 @@ #include "pandaSystem.h" -ConfigVariableBool CLP(cheap_textures) +ConfigVariableBool gl_cheap_textures ("gl-cheap-textures", false, PRC_DESC("Configure this true to glHint the textures into the cheapest " "possible mode.")); -ConfigVariableBool CLP(ignore_clamp) +ConfigVariableBool gl_ignore_clamp ("gl-ignore-clamp", false, PRC_DESC("Configure this true to disable texture clamp mode (all textures " "repeat, a little cheaper for software renderers).")); -ConfigVariableBool CLP(support_clamp_to_border) +ConfigVariableBool gl_support_clamp_to_border ("gl-support-clamp-to-border", true, PRC_DESC("Configure this true to enable the use of the clamp_to_border " "extension if the GL claims to support it, or false not to " "use it even if it appears to be available. (On some OpenGL " "drivers, enabling this mode can force software rendering.)")); -ConfigVariableBool CLP(support_rescale_normal) +ConfigVariableBool gl_support_rescale_normal ("gl-support-rescale-normal", true, PRC_DESC("Configure this true to enable the use of the rescale_normal " "extension if the GL claims to support it, or false not to use " "it even if it appears to be available. (This appears to be " "buggy on some drivers.)")); -ConfigVariableBool CLP(ignore_filters) +ConfigVariableBool gl_ignore_filters ("gl-ignore-filters", false, PRC_DESC("Configure this true to disable any texture filters at all (forcing " "point sampling).")); -ConfigVariableBool CLP(ignore_mipmaps) +ConfigVariableBool gl_ignore_mipmaps ("gl-ignore-mipmaps", false, PRC_DESC("Configure this true to disable mipmapping only.")); -ConfigVariableBool CLP(force_mipmaps) +ConfigVariableBool gl_force_mipmaps ("gl-force-mipmaps", false, PRC_DESC("Configure this true to enable full trilinear mipmapping on every " "texture, whether it asks for it or not.")); -ConfigVariableBool CLP(show_texture_usage) +ConfigVariableBool gl_show_texture_usage ("gl-show-texture-usage", false, PRC_DESC("If you set this true, the screen will flash with textures drawn " "in a special mode that shows the mipmap detail level and texture " @@ -60,27 +60,27 @@ ConfigVariableBool CLP(show_texture_usage) "mipmap level 0, yellow for mipmap level 1, and red for all higher " "mipmap levels. Brighter colors represent larger textures.")); -ConfigVariableInt CLP(show_texture_usage_max_size) +ConfigVariableInt gl_show_texture_usage_max_size ("gl-show-texture-usage-max-size", 1024, PRC_DESC("Specifies the texture size (along one side) of the largest " "texture expected to be loaded. This controls the assignment " "of the texture color in gl-show-texture-usage mode; colors " "will be fully bright for textures of this size or larger.")); -ConfigVariableBool CLP(color_mask) +ConfigVariableBool gl_color_mask ("gl-color-mask", true, PRC_DESC("Configure this false if your GL's implementation of glColorMask() " "is broken (some are). This will force the use of a (presumably) " "more expensive blending operation instead.")); -ConfigVariableBool CLP(support_occlusion_query) +ConfigVariableBool gl_support_occlusion_query ("gl-support-occlusion-query", true, PRC_DESC("Configure this true to enable the use of the occlusion_query " "extension if the GL claims to support it, or false not to " "use it even if it appears to be available. (On some OpenGL " "drivers, enabling this mode can force software rendering.)")); -ConfigVariableBool CLP(compile_and_execute) +ConfigVariableBool gl_compile_and_execute ("gl-compile-and-execute", false, PRC_DESC("Configure this true if you know your GL's implementation of " "glNewList(n, GL_COMPILE_AND_EXECUTE) works. It is " @@ -90,7 +90,7 @@ ConfigVariableBool CLP(compile_and_execute) "for the first time, by allowing the display list to be " "rendered at the same time it is being compiled.")); -ConfigVariableBool CLP(interleaved_arrays) +ConfigVariableBool gl_interleaved_arrays ("gl-interleaved-arrays", false, PRC_DESC("Set this true to convert OpenGL geometry such that the " "primary data columns vertex, normal, color, and texcoord " @@ -98,20 +98,20 @@ ConfigVariableBool CLP(interleaved_arrays) "render geometry as it appears in the GeomVertexData. See " "also gl-parallel-arrays.")); -ConfigVariableBool CLP(parallel_arrays) +ConfigVariableBool gl_parallel_arrays ("gl-parallel-arrays", false, PRC_DESC("Set this true to convert OpenGL geometry such that each " "data column is a separate array, or false to " "render geometry as it appears in the GeomVertexData. See " "also gl-interleaved-arrays.")); -ConfigVariableInt CLP(max_errors) +ConfigVariableInt gl_max_errors ("gl-max-errors", 20, PRC_DESC("This is the limit on the number of OpenGL errors Panda will " "detect and report before it shuts down rendering. Set it to " "-1 for no limit.")); -ConfigVariableEnum CLP(min_buffer_usage_hint) +ConfigVariableEnum gl_min_buffer_usage_hint ("gl-min-buffer-usage-hint", GeomEnums::UH_stream, PRC_DESC("This specifies the first usage hint value that will be " "loaded as a vertex buffer, instead of directly from the " @@ -126,13 +126,13 @@ ConfigVariableEnum CLP(min_buffer_usage_hint) "of reusing the same buffers. Consider increasing " "released-vbuffer-cache-size instead.")); -ConfigVariableBool CLP(debug_buffers) +ConfigVariableBool gl_debug_buffers ("gl-debug-buffers", false, PRC_DESC("Set this true, in addition to enabling debug notify for " "glgsg, to enable debug messages about the creation and " "destruction of OpenGL vertex buffers.")); -ConfigVariableBool CLP(finish) +ConfigVariableBool gl_finish ("gl-finish", false, PRC_DESC("Set this true to force a call to glFinish() after every major " "graphics operation. This is likely to slow down rendering " @@ -140,23 +140,23 @@ ConfigVariableBool CLP(finish) "more accurately reflect where the graphics bottlenecks are. " "This variable is enabled only if PStats is compiled in.")); -ConfigVariableBool CLP(force_depth_stencil) +ConfigVariableBool gl_force_depth_stencil ("gl-force-depth-stencil", false, PRC_DESC("Temporary hack variable 7x00 vs 8x00 nVidia bug. See glGraphicsStateGuardian_src.cxx.")); -ConfigVariableBool CLP(matrix_palette) +ConfigVariableBool gl_matrix_palette ("gl-matrix-palette", false, PRC_DESC("Temporary hack variable protecting untested code. See glGraphicsStateGuardian_src.cxx.")); -ConfigVariableBool CLP(force_no_error) +ConfigVariableBool gl_force_no_error ("gl-force-no-error", false, PRC_DESC("Avoid reporting OpenGL errors, for a small performance benefit.")); -ConfigVariableBool CLP(force_no_flush) +ConfigVariableBool gl_force_no_flush ("gl-force-no-flush", false, PRC_DESC("Avoid calling glFlush(), for a potential performance benefit. This may be a little dangerous.")); -ConfigVariableBool CLP(separate_specular_color) +ConfigVariableBool gl_separate_specular_color ("gl-separate-specular-color", true, PRC_DESC("When separate specular mode is on, the specular component " "will be written to the secondary instead of the primary " @@ -164,7 +164,7 @@ ConfigVariableBool CLP(separate_specular_color) "words, the specular highlight will be unmodulated by the " "color of the texture.")); -extern ConfigVariableBool CLP(parallel_arrays); +extern ConfigVariableBool gl_parallel_arrays; void CLP(init_classes)() { CLP(GeomContext)::init_type(); diff --git a/panda/src/glstuff/glmisc_src.h b/panda/src/glstuff/glmisc_src.h index f2f71e4772..862fb9e102 100644 --- a/panda/src/glstuff/glmisc_src.h +++ b/panda/src/glstuff/glmisc_src.h @@ -40,28 +40,28 @@ //#define GSG_VERBOSE 1 -extern ConfigVariableBool CLP(cheap_textures); -extern ConfigVariableBool CLP(ignore_clamp); -extern ConfigVariableBool CLP(support_clamp_to_border); -extern ConfigVariableBool CLP(ignore_filters); -extern ConfigVariableBool CLP(ignore_mipmaps); -extern ConfigVariableBool CLP(force_mipmaps); -extern ConfigVariableBool CLP(show_texture_usage); -extern ConfigVariableInt CLP(show_texture_usage_max_size); -extern ConfigVariableBool CLP(color_mask); -extern ConfigVariableBool CLP(support_occlusion_query); -extern ConfigVariableBool CLP(compile_and_execute); -extern ConfigVariableBool CLP(interleaved_arrays); -extern ConfigVariableBool CLP(parallel_arrays); -extern ConfigVariableInt CLP(max_errors); -extern ConfigVariableEnum CLP(min_buffer_usage_hint); -extern ConfigVariableBool CLP(debug_buffers); -extern ConfigVariableBool CLP(finish); -extern ConfigVariableBool CLP(force_depth_stencil); -extern ConfigVariableBool CLP(matrix_palette); -extern ConfigVariableBool CLP(force_no_error); -extern ConfigVariableBool CLP(force_no_flush); -extern ConfigVariableBool CLP(separate_specular_color); +extern ConfigVariableBool gl_cheap_textures; +extern ConfigVariableBool gl_ignore_clamp; +extern ConfigVariableBool gl_support_clamp_to_border; +extern ConfigVariableBool gl_ignore_filters; +extern ConfigVariableBool gl_ignore_mipmaps; +extern ConfigVariableBool gl_force_mipmaps; +extern ConfigVariableBool gl_show_texture_usage; +extern ConfigVariableInt gl_show_texture_usage_max_size; +extern ConfigVariableBool gl_color_mask; +extern ConfigVariableBool gl_support_occlusion_query; +extern ConfigVariableBool gl_compile_and_execute; +extern ConfigVariableBool gl_interleaved_arrays; +extern ConfigVariableBool gl_parallel_arrays; +extern ConfigVariableInt gl_max_errors; +extern ConfigVariableEnum gl_min_buffer_usage_hint; +extern ConfigVariableBool gl_debug_buffers; +extern ConfigVariableBool gl_finish; +extern ConfigVariableBool gl_force_depth_stencil; +extern ConfigVariableBool gl_matrix_palette; +extern ConfigVariableBool gl_force_no_error; +extern ConfigVariableBool gl_force_no_flush; +extern ConfigVariableBool gl_separate_specular_color; extern EXPCL_GL void CLP(init_classes)();