Torque3D Documentation / _generateds / gfxD3D11OcclusionQuery.h

gfxD3D11OcclusionQuery.h

Engine/source/gfx/D3D11/gfxD3D11OcclusionQuery.h

More...

Classes:

Detailed Description

 1
 2//-----------------------------------------------------------------------------
 3// Copyright (c) 2015 GarageGames, LLC
 4//
 5// Permission is hereby granted, free of charge, to any person obtaining a copy
 6// of this software and associated documentation files (the "Software"), to
 7// deal in the Software without restriction, including without limitation the
 8// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 9// sell copies of the Software, and to permit persons to whom the Software is
10// furnished to do so, subject to the following conditions:
11//
12// The above copyright notice and this permission notice shall be included in
13// all copies or substantial portions of the Software.
14//
15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21// IN THE SOFTWARE.
22//-----------------------------------------------------------------------------
23
24#ifndef _GFX_D3D11_OCCLUSIONQUERY_H_
25#define _GFX_D3D11_OCCLUSIONQUERY_H_
26
27#include "gfx/D3D11/gfxD3D11Device.h"
28#include "gfx/gfxOcclusionQuery.h"
29
30#ifdef TORQUE_GATHER_METRICS
31   #include "platform/platformTimer.h"
32#endif
33
34class GFXD3D11OcclusionQuery : public GFXOcclusionQuery
35{
36private:
37   mutable ID3D11Query *mQuery;
38   bool mTesting;
39#ifdef TORQUE_GATHER_METRICS
40   U32 mBeginFrame;
41   U32 mTimeSinceEnd;
42   PlatformTimer *mTimer;
43#endif
44
45public:
46   GFXD3D11OcclusionQuery(GFXDevice *device);
47   virtual ~GFXD3D11OcclusionQuery();
48
49   virtual bool begin();
50   virtual void end();   
51   virtual OcclusionQueryStatus getStatus(bool block, U32 *data = NULL);
52
53   // GFXResource
54   virtual void zombify();   
55   virtual void resurrect();
56   virtual const String describeSelf() const;
57};
58
59#endif
60