Panda3D
panda
src
pgraph
geomDrawCallbackData.cxx
Go to the documentation of this file.
1
/**
2
* PANDA 3D SOFTWARE
3
* Copyright (c) Carnegie Mellon University. All rights reserved.
4
*
5
* All use of this software is subject to the terms of the revised BSD
6
* license. You should have received a copy of this license along
7
* with this source code in a file named "LICENSE."
8
*
9
* @file geomDrawCallbackData.cxx
10
* @author drose
11
* @date 2009-03-13
12
*/
13
14
#include "
geomDrawCallbackData.h
"
15
#include "
cullableObject.h
"
16
#include "
graphicsStateGuardianBase.h
"
17
18
TypeHandle
GeomDrawCallbackData::_type_handle;
19
20
/**
21
*
22
*/
23
void
GeomDrawCallbackData::
24
output(std::ostream &out)
const
{
25
out << get_type() <<
"("
<< (
void
*)_obj <<
", "
<< (
void
*)_gsg
26
<<
", "
<< _force <<
")"
;
27
}
28
29
/**
30
* You should make this call during the callback if you want to continue the
31
* normal rendering function that would have been done in the absence of a
32
* callback.
33
*
34
* Specifically, this method will add the Geoms in this node to the list of
35
* renderable objects for drawing. If this callback was made on a
36
* CallbackNode, it doesn't actually do anything, since only a GeomNode holds
37
* geoms.
38
*/
39
void
GeomDrawCallbackData::
40
upcall
() {
41
// Go ahead and draw the object, if we have one.
42
if
(_obj->_geom !=
nullptr
) {
43
if
(_lost_state) {
44
// Tell the GSG to forget its state.
45
_gsg->clear_state_and_transform();
46
}
47
48
_obj->_geom->
draw
(_gsg, _obj->_munged_data, _force,
49
Thread::get_current_thread
());
50
}
51
}
cullableObject.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Thread::get_current_thread
get_current_thread
Returns a pointer to the currently-executing Thread object.
Definition:
thread.h:109
TypeHandle
TypeHandle is the identifier used to differentiate C++ class types.
Definition:
typeHandle.h:81
GeomDrawCallbackData::upcall
virtual void upcall()
You should make this call during the callback if you want to continue the normal rendering function t...
Definition:
geomDrawCallbackData.cxx:40
CullableObject::draw
void draw(GraphicsStateGuardianBase *gsg, bool force, Thread *current_thread)
Draws the cullable object on the GSG immediately, in the GSG's current state.
Definition:
cullableObject.I:72
geomDrawCallbackData.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
graphicsStateGuardianBase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Generated on Sun Dec 27 2020 13:23:08 for Panda3D by
1.8.20