71 bool isInstanced()
const {
return (myInstanceParms.size()>0); }
74 bool initSceneSetForRender(
83 bool isDirty()
const {
return myDirtyFlag; }
89 unsigned shadowmap_size,
93 bool is_raytrace) = 0;
101 unsigned shadowmap_index) {}
104 virtual bool needsShadowMap() = 0;
105 virtual bool hasShadowMap() = 0;
114 unsigned shadowmap_size,
118 unsigned shadowmap_index) {}
131 { myShadowMask=
mask; }
141 void *light_block,
int light_size,
142 void *shadow_block,
int shadow_size);
148 bool is_cube =
false);
208 static inline void intrusive_ptr_add_ref(
GR_Light *gl) { gl->
incref(); }
209 static inline void intrusive_ptr_release(
GR_Light *gl) { gl->
decref(); }
222 {
return getLight(myShadowingLight).get(); }
228 auto entry = myLightMap.find(
id);
229 return (entry != myLightMap.end());
235 auto entry = myLightMap.find(
id);
236 if(entry != myLightMap.end())
237 return myList(entry->second);
247 myLightMap[
id] =
int(myList.entries());
248 myList.append(new_light);
252 auto entry = myLightMap.find(
id);
253 if(entry != myLightMap.end())
255 int index = entry->second;
257 myList.removeIndex(index);
258 for(
int i=0; i<myList.entries(); i++)
259 myLightMap[myList(i)->id()] = i;
265 void removeAllBut(
const UT_Set<int> &active_lights);
268 bool myUseHeadlights =
false;
271 int myShadowingLight = -1;
A collection of Vulkan UBO, SSBO, and Image shader bindings (descriptor set)
void setLightID(exint id)
virtual void finishGsplatShadowRenders(RE_RenderContext)
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
void setCanShadow(bool e)
UT_UniquePtr< RV_ShaderBlock > myShadowBlock
UT_UniquePtr< RV_ShaderBlock > myInstanceBlock
Base class for various things that can appear in a scene outside of geometry.
virtual void startGsplatShadowRender(RE_RenderContext, unsigned shadowmap_index)
const UT_StringHolder & shadowMask() const
Opaque reference to a texture stored in the RV_TextureCache.
GR_LightPtr getLightByIndex(int index) const
virtual void clearShadowMap()
bool hasLight(int id) const
UT_IntrusivePtr< GR_Light > GR_LightPtr
virtual unsigned setupGsplatShadowRenders(RE_RenderContext, GR_RenderMode &out_render_mode, bool scene_changed, unsigned shadowmap_size, const GR_DistantShadowMapParms &)
UT_NON_COPYABLE(GR_SceneItem)
Temporary container for either a RV_Render and an RE_Render.
virtual void clearGsplatShadowMap()
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
void setShadowEnabled(bool s)
void add(int id, GR_Light *new_light)
virtual void startShadowRender(RE_RenderContext rc, unsigned shadowmap_index)
GLint GLint GLsizei GLint GLenum GLenum type
GR_LightPtr getLight(int id) const
const GR_Light * getShadowingLight() const
virtual bool canRayTraceShadow() const
Base class for all light types.
RV_API void cleanupShaders()
const UT_StringHolder & lightLink() const
Wrapper around hboost::intrusive_ptr.
UT_UniquePtr< RV_ShaderBlock > myLightBlock
GLuint const GLchar * name
bool useHeadlights() const
void setLightLink(const UT_StringHolder &link)
virtual void finishGsplatShadowRender(RE_RenderContext)
GA_API const UT_StringHolder transform
Handle to the main interface of Vulkan.
that also have some descendant prim *whose name begins with which in turn has a child named baz where *the predicate active
virtual bool hasGsplatShadowMap()
virtual void attachShadowMap(RE_RenderContext)
RV_API bool initShaders(RV_Instance *inst)
GA_API const UT_StringHolder parms
virtual void finishShadowRenders(RE_RenderContext)
UT_StringHolder myShadowMask
UT_UniquePtr< RV_ShaderVariableSet > myLightSet
void setShadowingLight(int id)
bool shadowEnabled() const
void setHeadlight(bool e)
virtual void finishShadowRender(RE_RenderContext)
virtual void attachGsplatShadowMap(RE_RenderContext)
virtual void setShadowMask(const UT_StringHolder &mask)
void setUseHeadlights(bool v)