mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 08:15:18 -04:00
display: fix ABI compat with GraphicsStateGuardian flash texture
This commit is contained in:
parent
ec6638314c
commit
1eeea718c5
@ -461,7 +461,6 @@ traverse_prepared_textures(GraphicsStateGuardian::TextureCallback *func,
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
/**
|
||||
* Sets the "flash texture". This is a debug feature; when enabled, the
|
||||
* specified texture will begin flashing in the scene, helping you to find it
|
||||
@ -481,31 +480,34 @@ traverse_prepared_textures(GraphicsStateGuardian::TextureCallback *func,
|
||||
*/
|
||||
void GraphicsStateGuardian::
|
||||
set_flash_texture(Texture *tex) {
|
||||
_flash_texture = tex;
|
||||
}
|
||||
#endif // NDEBUG
|
||||
|
||||
#ifndef NDEBUG
|
||||
_flash_texture = tex;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the "flash texture", so that no textures will flash. See
|
||||
* set_flash_texture().
|
||||
*/
|
||||
void GraphicsStateGuardian::
|
||||
clear_flash_texture() {
|
||||
_flash_texture = nullptr;
|
||||
}
|
||||
#endif // NDEBUG
|
||||
|
||||
#ifndef NDEBUG
|
||||
_flash_texture = nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current "flash texture", if any, or NULL if none. See
|
||||
* set_flash_texture().
|
||||
*/
|
||||
Texture *GraphicsStateGuardian::
|
||||
get_flash_texture() const {
|
||||
#ifndef NDEBUG
|
||||
return _flash_texture;
|
||||
#else
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
#endif // NDEBUG
|
||||
|
||||
/**
|
||||
* Sets the SceneSetup object that indicates the initial camera position, etc.
|
||||
|
@ -259,7 +259,7 @@ PUBLISHED:
|
||||
typedef bool TextureCallback(TextureContext *tc, void *callback_arg);
|
||||
void traverse_prepared_textures(TextureCallback *func, void *callback_arg);
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if !defined(NDEBUG) || !defined(CPPPARSER)
|
||||
void set_flash_texture(Texture *tex);
|
||||
void clear_flash_texture();
|
||||
Texture *get_flash_texture() const;
|
||||
@ -651,6 +651,8 @@ protected:
|
||||
|
||||
#ifndef NDEBUG
|
||||
PT(Texture) _flash_texture;
|
||||
#else
|
||||
PT(Texture) _flash_texture_unused;
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
Loading…
x
Reference in New Issue
Block a user