mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-18 12:43:44 -04:00
temp uniquify-transforms etc.
This commit is contained in:
parent
4eee3a23e9
commit
5518abb092
@ -258,6 +258,10 @@ validate_attribs() {
|
|||||||
CPT(RenderAttrib) RenderAttrib::
|
CPT(RenderAttrib) RenderAttrib::
|
||||||
return_new(RenderAttrib *attrib) {
|
return_new(RenderAttrib *attrib) {
|
||||||
nassertr(attrib != (RenderAttrib *)NULL, attrib);
|
nassertr(attrib != (RenderAttrib *)NULL, attrib);
|
||||||
|
static ConfigVariableBool uniquify_attribs("uniquify-attribs", true);
|
||||||
|
if (!uniquify_attribs) {
|
||||||
|
return attrib;
|
||||||
|
}
|
||||||
|
|
||||||
// This should be a newly allocated pointer, not one that was used
|
// This should be a newly allocated pointer, not one that was used
|
||||||
// for anything else.
|
// for anything else.
|
||||||
|
@ -1130,6 +1130,10 @@ bin_removed(int bin_index) {
|
|||||||
CPT(RenderState) RenderState::
|
CPT(RenderState) RenderState::
|
||||||
return_new(RenderState *state) {
|
return_new(RenderState *state) {
|
||||||
nassertr(state != (RenderState *)NULL, state);
|
nassertr(state != (RenderState *)NULL, state);
|
||||||
|
static ConfigVariableBool uniquify_states("uniquify-states", true);
|
||||||
|
if (!uniquify_states && !state->is_empty()) {
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
if (!state_cache) {
|
if (!state_cache) {
|
||||||
|
@ -1272,6 +1272,10 @@ init_states() {
|
|||||||
CPT(TransformState) TransformState::
|
CPT(TransformState) TransformState::
|
||||||
return_new(TransformState *state) {
|
return_new(TransformState *state) {
|
||||||
nassertr(state != (TransformState *)NULL, state);
|
nassertr(state != (TransformState *)NULL, state);
|
||||||
|
static ConfigVariableBool uniquify_transforms("uniquify-transforms", true);
|
||||||
|
if (!uniquify_transforms && !state->is_identity()) {
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
if (!transform_cache) {
|
if (!transform_cache) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user