OpenSceneGraph 3.6.5
ShadowTexture
Go to the documentation of this file.
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2 *
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version. The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * OpenSceneGraph Public License for more details.
12*/
13
14#ifndef OSGSHADOW_SHADOWETEXTURE
15#define OSGSHADOW_SHADOWETEXTURE 1
16
17#include <osg/Camera>
18#include <osg/Material>
19
21
22namespace osgShadow {
23
26{
27 public :
29
31
33
35 void setTextureUnit(unsigned int unit);
36
38 unsigned int getTextureUnit() const { return _textureUnit; }
39
40
42 virtual void init();
43
45 virtual void update(osg::NodeVisitor& nv);
46
48 virtual void cull(osgUtil::CullVisitor& cv);
49
51 virtual void cleanSceneGraph();
52
53
55 virtual void resizeGLObjectBuffers(unsigned int maxSize);
56
60 virtual void releaseGLObjects(osg::State* = 0) const;
61
62 protected :
63
64 virtual ~ShadowTexture() {}
65
71 unsigned int _textureUnit;
72};
73
74}
75
76#endif
The osgShadow library is a NodeKit that extends the core scene graph to add support for a range of sh...
Definition ConvexPolyhedron:33
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
Visitor for type safe operations on osg::Nodes.
Definition NodeVisitor:82
Smart pointer for handling referenced counted objects.
Definition ref_ptr:32
Encapsulates the current applied OpenGL modes, attributes and vertex arrays settings,...
Definition State:80
virtual void cull(osgUtil::CullVisitor &cv)
run the cull traversal of the ShadowedScene and set up the rendering for this ShadowTechnique.
osg::ref_ptr< osg::Camera > _camera
Definition ShadowTexture:66
virtual void releaseGLObjects(osg::State *=0) const
If State is non-zero, this function releases any associated OpenGL objects for the specified graphics...
META_Object(osgShadow, ShadowTexture)
osg::ref_ptr< osg::TexGen > _texgen
Definition ShadowTexture:67
unsigned int getTextureUnit() const
Get the texture unit that the shadow texture will be applied on.
Definition ShadowTexture:38
ShadowTexture(const ShadowTexture &es, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
virtual void update(osg::NodeVisitor &nv)
run the update traversal of the ShadowedScene and update any loca chached data structures.
void setTextureUnit(unsigned int unit)
Set the texture unit that the shadow texture will be applied on.
osg::ref_ptr< osg::Material > _material
Definition ShadowTexture:70
virtual void init()
initialize the ShadowedScene and local cached data structures.
virtual void cleanSceneGraph()
Clean scene graph from any shadow technique specific nodes, state and drawables.
virtual void resizeGLObjectBuffers(unsigned int maxSize)
Resize any per context GLObject buffers to specified size.
unsigned int _textureUnit
Definition ShadowTexture:71
osg::ref_ptr< osg::StateSet > _stateset
Definition ShadowTexture:69
virtual ~ShadowTexture()
Definition ShadowTexture:64
osg::ref_ptr< osg::Texture2D > _texture
Definition ShadowTexture:68
Basic NodeVisitor implementation for rendering a scene.
Definition CullVisitor:49
#define OSGSHADOW_EXPORT
Definition Export:39

osg logo
Generated at Wed Jul 23 2025 00:00:00 for the OpenSceneGraph by doxygen 1.14.0.