mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
*** empty log message ***
This commit is contained in:
parent
a43b3e1df7
commit
3e5581c366
@ -31,6 +31,10 @@ bool gl_cull_traversal = config_glgsg.GetBool("gl-cull-traversal", true);
|
|||||||
// renderer.
|
// renderer.
|
||||||
bool gl_ignore_mipmaps = config_glgsg.GetBool("gl-ignore-mipmaps", false);
|
bool gl_ignore_mipmaps = config_glgsg.GetBool("gl-ignore-mipmaps", false);
|
||||||
|
|
||||||
|
// Configure this true to enable full trilinear mipmapping on every
|
||||||
|
// texture, whether it asks for it or not.
|
||||||
|
bool gl_force_mipmaps = config_glgsg.GetBool("gl-force-mipmaps", false);
|
||||||
|
|
||||||
// Configure this true to cause mipmaps to be rendered with phony
|
// Configure this true to cause mipmaps to be rendered with phony
|
||||||
// colors, using mipmap_level_*.rgb if they are available.
|
// colors, using mipmap_level_*.rgb if they are available.
|
||||||
bool gl_show_mipmaps = config_glgsg.GetBool("gl-show-mipmaps", false);
|
bool gl_show_mipmaps = config_glgsg.GetBool("gl-show-mipmaps", false);
|
||||||
|
@ -15,6 +15,7 @@ extern bool gl_show_transforms;
|
|||||||
extern bool gl_cheap_textures;
|
extern bool gl_cheap_textures;
|
||||||
extern bool gl_cull_traversal;
|
extern bool gl_cull_traversal;
|
||||||
extern bool gl_ignore_mipmaps;
|
extern bool gl_ignore_mipmaps;
|
||||||
|
extern bool gl_force_mipmaps;
|
||||||
extern bool gl_show_mipmaps;
|
extern bool gl_show_mipmaps;
|
||||||
|
|
||||||
// Ways to implement decals.
|
// Ways to implement decals.
|
||||||
|
@ -3382,10 +3382,18 @@ specify_texture(Texture *tex) {
|
|||||||
get_texture_wrap_mode(tex->get_wrapu()));
|
get_texture_wrap_mode(tex->get_wrapu()));
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T,
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T,
|
||||||
get_texture_wrap_mode(tex->get_wrapv()));
|
get_texture_wrap_mode(tex->get_wrapv()));
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
|
|
||||||
get_texture_filter_type(tex->get_minfilter()));
|
if (gl_force_mipmaps) {
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
|
||||||
get_texture_filter_type(tex->get_magfilter()));
|
GL_LINEAR_MIPMAP_LINEAR);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
|
||||||
|
get_texture_filter_type(tex->get_minfilter()));
|
||||||
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,
|
||||||
|
get_texture_filter_type(tex->get_magfilter()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -3411,7 +3419,7 @@ apply_texture_immediate(Texture *tex) {
|
|||||||
<< (int)type << ", " << tex->get_name() << ")\n";
|
<< (int)type << ", " << tex->get_name() << ")\n";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!gl_ignore_mipmaps) {
|
if (!gl_ignore_mipmaps || gl_force_mipmaps) {
|
||||||
bool use_mipmaps;
|
bool use_mipmaps;
|
||||||
switch (tex->get_minfilter()) {
|
switch (tex->get_minfilter()) {
|
||||||
case Texture::FT_nearest_mipmap_nearest:
|
case Texture::FT_nearest_mipmap_nearest:
|
||||||
@ -3425,7 +3433,7 @@ apply_texture_immediate(Texture *tex) {
|
|||||||
use_mipmaps = false;
|
use_mipmaps = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (use_mipmaps) {
|
if (use_mipmaps || gl_force_mipmaps) {
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
if (gl_show_mipmaps) {
|
if (gl_show_mipmaps) {
|
||||||
build_phony_mipmaps(tex);
|
build_phony_mipmaps(tex);
|
||||||
|
@ -168,10 +168,12 @@ public:
|
|||||||
virtual void begin_decal(GeomNode *) { }
|
virtual void begin_decal(GeomNode *) { }
|
||||||
virtual void end_decal(GeomNode *) { }
|
virtual void end_decal(GeomNode *) { }
|
||||||
|
|
||||||
public:
|
PUBLISHED:
|
||||||
static TypeHandle get_class_type() {
|
static TypeHandle get_class_type() {
|
||||||
return _type_handle;
|
return _type_handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
static void init_type() {
|
static void init_type() {
|
||||||
TypedReferenceCount::init_type();
|
TypedReferenceCount::init_type();
|
||||||
register_type(_type_handle, "GraphicsStateGuardianBase",
|
register_type(_type_handle, "GraphicsStateGuardianBase",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user