mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
init glShaderContext
This commit is contained in:
parent
85d75121c4
commit
59eaa16056
@ -357,8 +357,10 @@ reset() {
|
|||||||
GLint max_vertex_units;
|
GLint max_vertex_units;
|
||||||
GLP(GetIntegerv)(GL_MAX_VERTEX_UNITS_ARB, &max_vertex_units);
|
GLP(GetIntegerv)(GL_MAX_VERTEX_UNITS_ARB, &max_vertex_units);
|
||||||
_max_vertex_transforms = max_vertex_units;
|
_max_vertex_transforms = max_vertex_units;
|
||||||
GLCAT.debug()
|
if (GLCAT.is_debug()) {
|
||||||
<< "max vertex transforms = " << _max_vertex_transforms << "\n";
|
GLCAT.debug()
|
||||||
|
<< "max vertex transforms = " << _max_vertex_transforms << "\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_supports_matrix_palette = has_extension("GL_ARB_matrix_palette");
|
_supports_matrix_palette = has_extension("GL_ARB_matrix_palette");
|
||||||
@ -391,7 +393,9 @@ reset() {
|
|||||||
code. */
|
code. */
|
||||||
if (!ConfigVariableBool("gl-matrix-palette", false, PRC_DESC("Temporary hack variable protecting untested code. See glGraphicsStateGuardian_src.cxx."))) {
|
if (!ConfigVariableBool("gl-matrix-palette", false, PRC_DESC("Temporary hack variable protecting untested code. See glGraphicsStateGuardian_src.cxx."))) {
|
||||||
if (_supports_matrix_palette) {
|
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;
|
_supports_matrix_palette = false;
|
||||||
}
|
}
|
||||||
@ -400,8 +404,10 @@ reset() {
|
|||||||
GLint max_palette_matrices;
|
GLint max_palette_matrices;
|
||||||
GLP(GetIntegerv)(GL_MAX_PALETTE_MATRICES_ARB, &max_palette_matrices);
|
GLP(GetIntegerv)(GL_MAX_PALETTE_MATRICES_ARB, &max_palette_matrices);
|
||||||
_max_vertex_transform_indices = max_palette_matrices;
|
_max_vertex_transform_indices = max_palette_matrices;
|
||||||
GLCAT.debug()
|
if (GLCAT.is_debug()) {
|
||||||
<< "max vertex transform indices = " << _max_vertex_transform_indices << "\n";
|
GLCAT.debug()
|
||||||
|
<< "max vertex transform indices = " << _max_vertex_transform_indices << "\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_supports_draw_range_elements = false;
|
_supports_draw_range_elements = false;
|
||||||
@ -4057,10 +4063,12 @@ query_gl_version() {
|
|||||||
string_to_int(components[2], _gl_version_release);
|
string_to_int(components[2], _gl_version_release);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLCAT.debug()
|
if (GLCAT.is_debug()) {
|
||||||
<< "GL_VERSION = " << (const char *)text << ", decoded to "
|
GLCAT.debug()
|
||||||
<< _gl_version_major << "." << _gl_version_minor
|
<< "GL_VERSION = " << (const char *)text << ", decoded to "
|
||||||
<< "." << _gl_version_release << "\n";
|
<< _gl_version_major << "." << _gl_version_minor
|
||||||
|
<< "." << _gl_version_release << "\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,6 +90,7 @@ void CLP(init_classes)() {
|
|||||||
CLP(VertexBufferContext)::init_type();
|
CLP(VertexBufferContext)::init_type();
|
||||||
CLP(IndexBufferContext)::init_type();
|
CLP(IndexBufferContext)::init_type();
|
||||||
CLP(GeomMunger)::init_type();
|
CLP(GeomMunger)::init_type();
|
||||||
|
CLP(ShaderContext)::init_type();
|
||||||
|
|
||||||
PandaSystem *ps = PandaSystem::get_global_ptr();
|
PandaSystem *ps = PandaSystem::get_global_ptr();
|
||||||
ps->add_system(GLSYSTEM_NAME);
|
ps->add_system(GLSYSTEM_NAME);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user