Panda3D
dxOcclusionQueryContext9.h
1 // Filename: dxOcclusionQueryContext9.h
2 // Created by: drose (04Jun07)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef DXOCCLUSIONQUERYCONTEXT9_H
16 #define DXOCCLUSIONQUERYCONTEXT9_H
17 
18 #include "pandabase.h"
19 #include "occlusionQueryContext.h"
20 #include "deletedChain.h"
21 
23 
24 ////////////////////////////////////////////////////////////////////
25 // Class : DXOcclusionQueryContext9
26 // Description :
27 ////////////////////////////////////////////////////////////////////
28 class EXPCL_PANDADX DXOcclusionQueryContext9 : public OcclusionQueryContext {
29 public:
30  INLINE DXOcclusionQueryContext9(IDirect3DQuery9 *query);
31  virtual ~DXOcclusionQueryContext9();
32  ALLOC_DELETED_CHAIN(DXOcclusionQueryContext9);
33 
34  virtual bool is_answer_ready() const;
35  virtual void waiting_for_answer();
36  virtual int get_num_fragments() const;
37 
38  IDirect3DQuery9 *_query;
39 
40 public:
41  static TypeHandle get_class_type() {
42  return _type_handle;
43  }
44  static void init_type() {
45  OcclusionQueryContext::init_type();
46  register_type(_type_handle, CLASSPREFIX_QUOTED "OcclusionQueryContext",
47  OcclusionQueryContext::get_class_type());
48  }
49  virtual TypeHandle get_type() const {
50  return get_class_type();
51  }
52  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
53 
54 private:
55  static TypeHandle _type_handle;
56 };
57 
58 #include "dxOcclusionQueryContext9.I"
59 
60 #endif
virtual void waiting_for_answer()
Requests the graphics engine to expedite the pending answer–the application is now waiting until the...
virtual int get_num_fragments() const =0
Returns the number of fragments (pixels) of the specified geometry that passed the depth test...
virtual bool is_answer_ready() const =0
Returns true if the query's answer is ready, false otherwise.
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:85