Panda3D
dxOcclusionQueryContext9.h
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 dxOcclusionQueryContext9.h
10  * @author drose
11  * @date 2007-06-04
12  */
13 
14 #ifndef DXOCCLUSIONQUERYCONTEXT9_H
15 #define DXOCCLUSIONQUERYCONTEXT9_H
16 
17 #include "pandabase.h"
18 #include "occlusionQueryContext.h"
19 #include "deletedChain.h"
20 
22 
23 /**
24  *
25  */
26 class EXPCL_PANDADX DXOcclusionQueryContext9 : public OcclusionQueryContext {
27 public:
28  INLINE DXOcclusionQueryContext9(IDirect3DQuery9 *query);
29  virtual ~DXOcclusionQueryContext9();
30  ALLOC_DELETED_CHAIN(DXOcclusionQueryContext9);
31 
32  virtual bool is_answer_ready() const;
33  virtual void waiting_for_answer();
34  virtual int get_num_fragments() const;
35 
36  IDirect3DQuery9 *_query;
37 
38 public:
39  static TypeHandle get_class_type() {
40  return _type_handle;
41  }
42  static void init_type() {
43  OcclusionQueryContext::init_type();
44  register_type(_type_handle, "DXOcclusionQueryContext9",
45  OcclusionQueryContext::get_class_type());
46  }
47  virtual TypeHandle get_type() const {
48  return get_class_type();
49  }
50  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
51 
52 private:
53  static TypeHandle _type_handle;
54 };
55 
57 
58 #endif
virtual void waiting_for_answer()
Requests the graphics engine to expedite the pending answer–the application is now waiting until the ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
Definition: register_type.I:22
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual int get_num_fragments() const =0
Returns the number of fragments (pixels) of the specified geometry that passed the depth test.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual bool is_answer_ready() const =0
Returns true if the query's answer is ready, false otherwise.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Encapsulates all the communication with a particular instance of a given rendering backend.
Returned from a GSG in response to begin_occlusion_query() .
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81