From 59eaa160562aba575f2eaa99b6777f654699439c Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 21 Mar 2006 01:40:33 +0000 Subject: [PATCH] init glShaderContext --- .../glstuff/glGraphicsStateGuardian_src.cxx | 26 ++++++++++++------- panda/src/glstuff/glmisc_src.cxx | 1 + 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 5448f2808f..3588062d8b 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -357,8 +357,10 @@ reset() { GLint max_vertex_units; GLP(GetIntegerv)(GL_MAX_VERTEX_UNITS_ARB, &max_vertex_units); _max_vertex_transforms = max_vertex_units; - GLCAT.debug() - << "max vertex transforms = " << _max_vertex_transforms << "\n"; + if (GLCAT.is_debug()) { + GLCAT.debug() + << "max vertex transforms = " << _max_vertex_transforms << "\n"; + } } _supports_matrix_palette = has_extension("GL_ARB_matrix_palette"); @@ -391,7 +393,9 @@ reset() { code. */ if (!ConfigVariableBool("gl-matrix-palette", false, PRC_DESC("Temporary hack variable protecting untested code. See glGraphicsStateGuardian_src.cxx."))) { if (_supports_matrix_palette) { - GLCAT.debug() << "Forcing off matrix palette support.\n"; + if (GLCAT.is_debug()) { + GLCAT.debug() << "Forcing off matrix palette support.\n"; + } } _supports_matrix_palette = false; } @@ -400,8 +404,10 @@ reset() { GLint max_palette_matrices; GLP(GetIntegerv)(GL_MAX_PALETTE_MATRICES_ARB, &max_palette_matrices); _max_vertex_transform_indices = max_palette_matrices; - GLCAT.debug() - << "max vertex transform indices = " << _max_vertex_transform_indices << "\n"; + if (GLCAT.is_debug()) { + GLCAT.debug() + << "max vertex transform indices = " << _max_vertex_transform_indices << "\n"; + } } _supports_draw_range_elements = false; @@ -4057,10 +4063,12 @@ query_gl_version() { string_to_int(components[2], _gl_version_release); } - GLCAT.debug() - << "GL_VERSION = " << (const char *)text << ", decoded to " - << _gl_version_major << "." << _gl_version_minor - << "." << _gl_version_release << "\n"; + if (GLCAT.is_debug()) { + GLCAT.debug() + << "GL_VERSION = " << (const char *)text << ", decoded to " + << _gl_version_major << "." << _gl_version_minor + << "." << _gl_version_release << "\n"; + } } } diff --git a/panda/src/glstuff/glmisc_src.cxx b/panda/src/glstuff/glmisc_src.cxx index a3c68604e2..64d9782229 100644 --- a/panda/src/glstuff/glmisc_src.cxx +++ b/panda/src/glstuff/glmisc_src.cxx @@ -90,6 +90,7 @@ void CLP(init_classes)() { CLP(VertexBufferContext)::init_type(); CLP(IndexBufferContext)::init_type(); CLP(GeomMunger)::init_type(); + CLP(ShaderContext)::init_type(); PandaSystem *ps = PandaSystem::get_global_ptr(); ps->add_system(GLSYSTEM_NAME);