Skip to content

Commit

Permalink
pgraphnodes: Add setter for shadow buffer sort
Browse files Browse the repository at this point in the history
  • Loading branch information
rdb committed Feb 22, 2025
1 parent 8de9859 commit f4da124
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions panda/src/pgraphnodes/lightLensNode.I
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ get_shadow_buffer_sort() const {
return _sb_sort;
}

/**
* Sets the sort of the shadow buffer to be created for this light source.
*/
INLINE void LightLensNode::
set_shadow_buffer_sort(int sort) {
_sb_sort = sort;
}

/**
* Returns the size of the shadow buffer to be created for this light source.
*/
Expand Down
2 changes: 2 additions & 0 deletions panda/src/pgraphnodes/lightLensNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class EXPCL_PANDA_PGRAPHNODES LightLensNode : public Light, public Camera {
void set_shadow_caster(bool caster, int buffer_xsize, int buffer_ysize, int sort = -10);

INLINE int get_shadow_buffer_sort() const;
INLINE void set_shadow_buffer_sort(int sort);

INLINE LVecBase2i get_shadow_buffer_size() const;
INLINE void set_shadow_buffer_size(const LVecBase2i &size);
Expand All @@ -50,6 +51,7 @@ class EXPCL_PANDA_PGRAPHNODES LightLensNode : public Light, public Camera {

PUBLISHED:
MAKE_PROPERTY(shadow_caster, is_shadow_caster);
MAKE_PROPERTY(shadow_buffer_sort, get_shadow_buffer_sort, set_shadow_buffer_sort);
MAKE_PROPERTY(shadow_buffer_size, get_shadow_buffer_size, set_shadow_buffer_size);

public:
Expand Down

0 comments on commit f4da124

Please sign in to comment.