OGRE
1.8
Object-Oriented Graphics Rendering Engine
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
OgreGLHardwareOcclusionQuery.h
Go to the documentation of this file.
1
/*
2
-----------------------------------------------------------------------------
3
This source file is part of OGRE
4
(Object-oriented Graphics Rendering Engine)
5
For the latest info, see http://www.ogre3d.org
6
7
Copyright (c) 2000-2013 Torus Knot Software Ltd
8
9
Permission is hereby granted, free of charge, to any person obtaining a copy
10
of this software and associated documentation files (the "Software"), to deal
11
in the Software without restriction, including without limitation the rights
12
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
copies of the Software, and to permit persons to whom the Software is
14
furnished to do so, subject to the following conditions:
15
16
The above copyright notice and this permission notice shall be included in
17
all copies or substantial portions of the Software.
18
19
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
THE SOFTWARE.
26
-----------------------------------------------------------------------------
27
*/
28
29
/*
30
The nVidia occlusion query extension is defined in glext.h so you don't
31
need anything else. You do need to look up the function, we provide a
32
GLSupport class to do this, which has platform implementations for
33
getProcAddress. Check the way that extensions like glActiveTextureARB are
34
initialised and used in glRenderSystem and copy what is done there.
35
36
37
38
To do: fix so dx7 and DX9 checks and flags if HW Occlusion is supported
39
See the openGl dito for ideas what to do.
40
41
*/
42
43
44
45
//GL_ActiveTextureARB_Func* glActiveTextureARB_ptr = (GL_ActiveTextureARB_Func)mGLSupport->getProcAddress("glActiveTextureARB");
46
47
#ifndef __GLHARDWAREOCCLUSIONQUERY_H__
48
#define __GLHARDWAREOCCLUSIONQUERY_H__
49
50
#include "
OgreGLPrerequisites.h
"
51
#include "
OgreHardwareOcclusionQuery.h
"
52
53
54
namespace
Ogre {
55
56
57
// If you use multiple rendering passes you can test only the first pass and all other passes don't have to be rendered
58
// if the first pass result has too few pixels visible.
59
60
// Be sure to render all occluder first and whats out so the RenderQue don't switch places on
61
// the occluding objects and the tested objects because it thinks it's more effective..
62
63
72
class
_OgreGLExport
GLHardwareOcclusionQuery
:
public
HardwareOcclusionQuery
73
{
74
//----------------------------------------------------------------------
75
// Public methods
76
//--
77
public
:
82
GLHardwareOcclusionQuery
();
86
~
GLHardwareOcclusionQuery
();
87
88
//------------------------------------------------------------------
89
// Occlusion query functions (see base class documentation for this)
90
//--
91
void
beginOcclusionQuery();
92
void
endOcclusionQuery();
93
bool
pullOcclusionQuery(
unsigned
int
* NumOfFragments);
94
bool
isStillOutstanding(
void
);
95
96
97
//----------------------------------------------------------------------
98
// private members
99
//--
100
private
:
101
102
GLuint
mQueryID
;
103
};
104
105
}
106
107
#endif
108
Ogre::GLHardwareOcclusionQuery
This is a class that is the base class of the query class for hardware occlusion. ...
Definition:
OgreGLHardwareOcclusionQuery.h:72
_OgreGLExport
#define _OgreGLExport
Definition:
OgreGLPrerequisites.h:96
OgreHardwareOcclusionQuery.h
Ogre::HardwareOcclusionQuery
This is a abstract class that that provides the interface for the query class for hardware occlusion...
Definition:
OgreHardwareOcclusionQuery.h:51
Ogre::GLHardwareOcclusionQuery::mQueryID
GLuint mQueryID
Definition:
OgreGLHardwareOcclusionQuery.h:102
OgreGLPrerequisites.h
RenderSystems
GL
include
OgreGLHardwareOcclusionQuery.h
Generated on Fri Jun 20 2014 00:48:10 for OGRE by
1.8.7