Changeset 115 for trunk/VUT/work/ogre_changes/RenderSystems/GL/include
- Timestamp:
- 05/30/05 03:20:23 (20 years ago)
- Location:
- trunk/VUT/work/ogre_changes/RenderSystems/GL/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/work/ogre_changes/RenderSystems/GL/include/OgreGLHardwareOcclusionQuery.h
r92 r115 88 88 void beginOcclusionQuery(); 89 89 void endOcclusionQuery(); 90 91 #ifdef GTP_VISIBILITY_MODIFIED_OGRE92 bool pullOcclusionQuery( unsigned int* NumOfFragments, const bool waitForResult,93 const HW_OCCLUSIONQUERY flag );94 bool pullOcclusionQuery( unsigned int* NumOfFragments, const bool waitForResult );95 #else96 bool pullOcclusionQuery( unsigned int* NumOfFragments );97 90 bool pullOcclusionQuery( unsigned int* NumOfFragments, const HW_OCCLUSIONQUERY flag ); 98 #endif // GTP_VISIBILITY_MODIFIED_OGRE 99 100 unsigned int getLastQuerysPixelcount() { return m_uintPixelCount; } 91 unsigned int getLastQuerysPixelcount() { return mPixelCount; } 101 92 102 93 // This functions are optional, it's a simple filter that simply skipps some hardware occlusion tests on visable objects only … … 115 106 */ 116 107 117 void setSkipRate( int skip ) { m _Skip= skip; } // Using 2 only 50 % of the tests are actully made and 3 results in only 33% of the tests. So on.118 int getSkipRate() { return m _Skip; }108 void setSkipRate( int skip ) { mSkipInterval = skip; } // Using 2 only 50 % of the tests are actully made and 3 results in only 33% of the tests. So on. 109 int getSkipRate() { return mSkipInterval; } 119 110 120 111 #ifdef GTP_VISIBILITY_MODIFIED_OGRE 112 bool pullOcclusionQuery( unsigned int* NumOfFragments, const bool waitForResult, const HW_OCCLUSIONQUERY flag = HWOCCLUSIONQUERY_FLUSH ); 113 #endif // GTP_VISIBILITY_MODIFIED_OGRE 121 114 //---------------------------------------------------------------------- 122 115 // Protected members … … 124 117 protected: 125 118 126 unsigned int m _uintPixelCount;127 unsigned int m_uintQuery[1];119 unsigned int mPixelCount; 120 GLuint mQueryID; 128 121 bool m_bOcclusionQuery; 129 int m _SkipCounter; // m_SkipConter = m_SkipConter % m_Skip; if ( m_SkipConter == 0 && m_uintPixelCount !=0 ) TestHWOcclusion else just return130 static int m_Skip; // This is shared by all instancies131 bool m _bHWOcclusionSupport;122 int mSkipCounter; 123 int mSkipInterval; 124 bool mHasOcclusionSupport; 132 125 }; 133 134 126 135 127 } -
trunk/VUT/work/ogre_changes/RenderSystems/GL/include/OgreGLPrerequisites.h
r97 r115 70 70 extern GL_SecondaryColorPointerEXT_Func glSecondaryColorPointerEXT_ptr; 71 71 72 // Pointer to glSecondaryColor3fEXT function 73 typedef void (APIENTRY *GL_SecondaryColor3fEXT_Func)(GLfloat, GLfloat, GLfloat); 74 extern GL_SecondaryColor3fEXT_Func glSecondaryColor3fEXT_ptr; 75 72 76 // Pointer to glGenBuffersARB function 73 77 typedef void (APIENTRY *GL_GenBuffersARB_Func)(GLsizei, GLuint*); … … 208 212 extern GL_GetOcclusionQueryuivNV_Func glGetOcclusionQueryuivNV_ptr; 209 213 210 #ifdef GTP_VISIBILITY_MODIFIED_OGRE211 // Pointer to glGenQueriesARB function212 typedef void (APIENTRY *GL_GenQueriesARB_Func) (GLsizei n, GLuint *ids);213 extern GL_GenQueriesARB_Func glGenQueriesARB_ptr;214 215 // Pointer to glDeleteQueriesARB function216 typedef void (APIENTRY *GL_DeleteQueriesARB_Func) (GLsizei n, const GLuint *ids);217 extern GL_DeleteQueriesARB_Func glDeleteQueriesARB_ptr;218 219 // Pointer to glIsQueryARB function220 typedef GLboolean (APIENTRY *GL_IsQueryARB_Func) (GLuint id);221 extern GL_IsQueryARB_Func glIsQueryARB_ptr;222 223 // Pointer to glBeginQueryARB function224 typedef void (APIENTRY *GL_BeginQueryARB_Func) (GLenum target, GLuint id);225 extern GL_BeginQueryARB_Func glBeginQueryARB_ptr;226 227 // Pointer to glEndQueryARB function228 typedef void (APIENTRY *GL_EndQueryARB_Func) (GLenum target);229 extern GL_EndQueryARB_Func glEndQueryARB_ptr;230 231 // Pointer to glGetQueryivARB function232 typedef void (APIENTRY *GL_GetQueryivARB_Func) (GLuint id, GLenum pname, GLint *params);233 extern GL_GetQueryivARB_Func glGetQueryivARB_ptr;234 235 // Pointer to glGetQueryObjectivARB function236 typedef void (APIENTRY *GL_GetQueryObjectivARB_Func) (GLuint id, GLenum pname, GLint *params);237 extern GL_GetQueryObjectivARB_Func glGetQueryObjectivARB_ptr;238 239 // Pointer to glGetQueryObjectuivARB function240 typedef void (APIENTRY *GL_GetQueryObjectuivARB_Func) (GLuint id, GLenum pname, GLuint *params);241 extern GL_GetQueryObjectuivARB_Func glGetQueryObjectuivARB_ptr;242 243 #endif // GTP_VISIBILITY_MODIFIED_OGRE244 245 214 extern PFNGLCOMPRESSEDTEXIMAGE1DARBPROC glCompressedTexImage1DARB_ptr; 246 215 extern PFNGLCOMPRESSEDTEXIMAGE2DARBPROC glCompressedTexImage2DARB_ptr; … … 253 222 }; 254 223 224 // Pointer to glGenQueriesARB function 225 typedef void (APIENTRY *GL_GenQueriesARB_Func) (GLuint n, GLuint *ids); 226 extern GL_GenQueriesARB_Func glGenQueriesARB_ptr; 227 228 // Pointer to glDeleteQueriesARB function 229 typedef void (APIENTRY *GL_DeleteQueriesARB_Func) (GLuint n, const GLuint *ids); 230 extern GL_DeleteQueriesARB_Func glDeleteQueriesARB_ptr; 231 232 // Pointer to glBeginQueryARB function 233 typedef void (APIENTRY *GL_BeginQueryARB_Func) (GLenum target, GLuint id); 234 extern GL_BeginQueryARB_Func glBeginQueryARB_ptr; 235 236 // Pointer to glEndQueryARB function 237 typedef void (APIENTRY *GL_EndQueryARB_Func) (GLenum target); 238 extern GL_EndQueryARB_Func glEndQueryARB_ptr; 239 #ifdef GTP_VISIBILITY_MODIFIED_OGRE 240 // Pointer to glGetQueryivARB function 241 typedef void (APIENTRY *GL_GetQueryivARB_Func) (GLuint id, GLenum pname, GLint *params); 242 extern GL_GetQueryivARB_Func glGetQueryivARB_ptr; 243 244 // Pointer to glGetQueryObjectivARB function 245 typedef void (APIENTRY *GL_GetQueryObjectivARB_Func) (GLuint id, GLenum pname, GLint *params); 246 extern GL_GetQueryObjectivARB_Func glGetQueryObjectivARB_ptr; 247 #endif // GTP_VISIBILITY_MODIFIED_OGRE 248 // Pointer to glGetQueryObjectuivARB function 249 typedef void (APIENTRY *GL_GetQueryObjectuivARB_Func) (GLuint id, GLenum pname, GLuint *params); 250 extern GL_GetQueryObjectuivARB_Func glGetQueryObjectuivARB_ptr; 255 251 256 252
Note: See TracChangeset
for help on using the changeset viewer.