Ignore:
Timestamp:
05/30/05 03:20:23 (19 years ago)
Author:
mattausch
Message:

added depth pass algorithm + delayed transparent object rendering (so depth ordering is right)

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  
    8888        void beginOcclusionQuery(); 
    8989        void endOcclusionQuery(); 
    90  
    91 #ifdef GTP_VISIBILITY_MODIFIED_OGRE 
    92         bool pullOcclusionQuery( unsigned int* NumOfFragments, const bool waitForResult, 
    93                                                          const HW_OCCLUSIONQUERY flag  );  
    94         bool pullOcclusionQuery( unsigned int* NumOfFragments, const bool waitForResult ); 
    95 #else 
    96         bool pullOcclusionQuery( unsigned int* NumOfFragments ); 
    9790        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; } 
    10192 
    10293        // This functions are optional, it's a simple filter that simply skipps some hardware occlusion tests on visable objects only 
     
    115106          */ 
    116107 
    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; }  
    119110 
    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 
    121114//---------------------------------------------------------------------- 
    122115// Protected members 
     
    124117protected: 
    125118 
    126         unsigned int    m_uintPixelCount; 
    127         unsigned int    m_uintQuery[1]; 
     119        unsigned int    mPixelCount; 
     120        GLuint                  mQueryID; 
    128121        bool                    m_bOcclusionQuery; 
    129         int                             m_SkipCounter;          // m_SkipConter =  m_SkipConter % m_Skip; if ( m_SkipConter == 0 && m_uintPixelCount !=0 ) TestHWOcclusion else just return  
    130         static int              m_Skip;                         // This is shared by all instancies 
    131         bool                    m_bHWOcclusionSupport; 
     122        int                             mSkipCounter; 
     123        int                             mSkipInterval; 
     124        bool                    mHasOcclusionSupport; 
    132125}; 
    133  
    134126 
    135127} 
  • trunk/VUT/work/ogre_changes/RenderSystems/GL/include/OgreGLPrerequisites.h

    r97 r115  
    7070extern GL_SecondaryColorPointerEXT_Func glSecondaryColorPointerEXT_ptr; 
    7171 
     72// Pointer to glSecondaryColor3fEXT function 
     73typedef void (APIENTRY *GL_SecondaryColor3fEXT_Func)(GLfloat, GLfloat, GLfloat); 
     74extern GL_SecondaryColor3fEXT_Func glSecondaryColor3fEXT_ptr; 
     75 
    7276// Pointer to glGenBuffersARB function 
    7377typedef void (APIENTRY *GL_GenBuffersARB_Func)(GLsizei, GLuint*); 
     
    208212extern GL_GetOcclusionQueryuivNV_Func glGetOcclusionQueryuivNV_ptr; 
    209213 
    210 #ifdef GTP_VISIBILITY_MODIFIED_OGRE 
    211 // Pointer to glGenQueriesARB function 
    212 typedef void (APIENTRY *GL_GenQueriesARB_Func) (GLsizei n, GLuint *ids); 
    213 extern GL_GenQueriesARB_Func glGenQueriesARB_ptr; 
    214  
    215 // Pointer to glDeleteQueriesARB function 
    216 typedef void (APIENTRY *GL_DeleteQueriesARB_Func) (GLsizei n, const GLuint *ids); 
    217 extern GL_DeleteQueriesARB_Func glDeleteQueriesARB_ptr; 
    218  
    219 // Pointer to glIsQueryARB function 
    220 typedef GLboolean (APIENTRY *GL_IsQueryARB_Func) (GLuint id); 
    221 extern GL_IsQueryARB_Func glIsQueryARB_ptr; 
    222  
    223 // Pointer to glBeginQueryARB function 
    224 typedef void (APIENTRY *GL_BeginQueryARB_Func) (GLenum target, GLuint id); 
    225 extern GL_BeginQueryARB_Func glBeginQueryARB_ptr; 
    226  
    227 // Pointer to glEndQueryARB function 
    228 typedef void (APIENTRY *GL_EndQueryARB_Func) (GLenum target); 
    229 extern GL_EndQueryARB_Func glEndQueryARB_ptr; 
    230  
    231 // Pointer to glGetQueryivARB function 
    232 typedef void (APIENTRY *GL_GetQueryivARB_Func) (GLuint id, GLenum pname, GLint *params); 
    233 extern GL_GetQueryivARB_Func glGetQueryivARB_ptr; 
    234  
    235 // Pointer to glGetQueryObjectivARB function 
    236 typedef void (APIENTRY *GL_GetQueryObjectivARB_Func) (GLuint id, GLenum pname, GLint *params); 
    237 extern GL_GetQueryObjectivARB_Func glGetQueryObjectivARB_ptr; 
    238  
    239 // Pointer to glGetQueryObjectuivARB function 
    240 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_OGRE 
    244  
    245214extern PFNGLCOMPRESSEDTEXIMAGE1DARBPROC glCompressedTexImage1DARB_ptr; 
    246215extern PFNGLCOMPRESSEDTEXIMAGE2DARBPROC glCompressedTexImage2DARB_ptr; 
     
    253222}; 
    254223 
     224// Pointer to glGenQueriesARB function 
     225typedef void (APIENTRY *GL_GenQueriesARB_Func) (GLuint n, GLuint *ids); 
     226extern GL_GenQueriesARB_Func glGenQueriesARB_ptr; 
     227 
     228// Pointer to glDeleteQueriesARB function 
     229typedef void (APIENTRY *GL_DeleteQueriesARB_Func) (GLuint n, const GLuint *ids); 
     230extern GL_DeleteQueriesARB_Func glDeleteQueriesARB_ptr; 
     231 
     232// Pointer to glBeginQueryARB function 
     233typedef void (APIENTRY *GL_BeginQueryARB_Func) (GLenum target, GLuint id); 
     234extern GL_BeginQueryARB_Func glBeginQueryARB_ptr; 
     235 
     236// Pointer to glEndQueryARB function 
     237typedef void (APIENTRY *GL_EndQueryARB_Func) (GLenum target); 
     238extern GL_EndQueryARB_Func glEndQueryARB_ptr; 
     239#ifdef GTP_VISIBILITY_MODIFIED_OGRE 
     240// Pointer to glGetQueryivARB function 
     241typedef void (APIENTRY *GL_GetQueryivARB_Func) (GLuint id, GLenum pname, GLint *params); 
     242extern GL_GetQueryivARB_Func glGetQueryivARB_ptr; 
     243 
     244// Pointer to glGetQueryObjectivARB function 
     245typedef void (APIENTRY *GL_GetQueryObjectivARB_Func) (GLuint id, GLenum pname, GLint *params); 
     246extern GL_GetQueryObjectivARB_Func glGetQueryObjectivARB_ptr; 
     247#endif // GTP_VISIBILITY_MODIFIED_OGRE 
     248// Pointer to glGetQueryObjectuivARB function 
     249typedef void (APIENTRY *GL_GetQueryObjectuivARB_Func) (GLuint id, GLenum pname, GLuint *params); 
     250extern GL_GetQueryObjectuivARB_Func glGetQueryObjectuivARB_ptr; 
    255251 
    256252 
Note: See TracChangeset for help on using the changeset viewer.