fix crash with transform-cache 0

This commit is contained in:
David Rose 2013-03-15 14:27:28 +00:00
parent 517ab5d56f
commit bb6f151ea7
4 changed files with 7 additions and 8 deletions

View File

@ -961,7 +961,7 @@ get_current_lens() const {
// Description: Returns the inverse of the transform returned by // Description: Returns the inverse of the transform returned by
// get_cs_transform(). // get_cs_transform().
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
INLINE const TransformState *GraphicsStateGuardian:: INLINE CPT(TransformState) GraphicsStateGuardian::
get_inv_cs_transform() const { get_inv_cs_transform() const {
return _inv_cs_transform; return _inv_cs_transform;
} }

View File

@ -1889,7 +1889,7 @@ get_render_buffer(int buffer_type, const FrameBufferProperties &prop) {
// scene for a camera with the indicated coordinate // scene for a camera with the indicated coordinate
// system. // system.
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
const TransformState *GraphicsStateGuardian:: CPT(TransformState) GraphicsStateGuardian::
get_cs_transform_for(CoordinateSystem cs) const { get_cs_transform_for(CoordinateSystem cs) const {
if (_internal_coordinate_system == CS_default || if (_internal_coordinate_system == CS_default ||
_internal_coordinate_system == cs) { _internal_coordinate_system == cs) {
@ -1911,7 +1911,7 @@ get_cs_transform_for(CoordinateSystem cs) const {
// get_internal_coordinate_system()). This is used for // get_internal_coordinate_system()). This is used for
// rendering. // rendering.
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
const TransformState *GraphicsStateGuardian:: CPT(TransformState) GraphicsStateGuardian::
get_cs_transform() const { get_cs_transform() const {
return _cs_transform; return _cs_transform;
} }

View File

@ -300,9 +300,9 @@ public:
INLINE int get_current_tex_view_offset() const; INLINE int get_current_tex_view_offset() const;
INLINE const Lens *get_current_lens() const; INLINE const Lens *get_current_lens() const;
virtual const TransformState *get_cs_transform_for(CoordinateSystem cs) const; virtual CPT(TransformState) get_cs_transform_for(CoordinateSystem cs) const;
virtual const TransformState *get_cs_transform() const; virtual CPT(TransformState) get_cs_transform() const;
INLINE const TransformState *get_inv_cs_transform() const; INLINE CPT(TransformState) get_inv_cs_transform() const;
void do_issue_clip_plane(); void do_issue_clip_plane();
void do_issue_color(); void do_issue_color();

View File

@ -18,6 +18,7 @@
#include "pandabase.h" #include "pandabase.h"
#include "typedWritableReferenceCount.h" #include "typedWritableReferenceCount.h"
#include "nodeCachedReferenceCount.h"
#include "luse.h" #include "luse.h"
#include "lightMutex.h" #include "lightMutex.h"
@ -212,8 +213,6 @@ public:
(Texture *tex, int z, const DisplayRegion *dr, const RenderBuffer &rb)=0; (Texture *tex, int z, const DisplayRegion *dr, const RenderBuffer &rb)=0;
virtual CoordinateSystem get_internal_coordinate_system() const=0; virtual CoordinateSystem get_internal_coordinate_system() const=0;
virtual const TransformState *get_cs_transform_for(CoordinateSystem cs) const=0;
virtual const TransformState *get_cs_transform() const=0;
virtual void bind_light(PointLight *light_obj, const NodePath &light, virtual void bind_light(PointLight *light_obj, const NodePath &light,
int light_id) { } int light_id) { }