// This is so weird that I can not do vertex transform by myself. I have to use // OpenGL internal transform bool OGLRender::RenderFlushTris() { if( !gRDP.bFogEnableInBlender && gRSP.bFogEnabled ) { TurnFogOnOff(false); } ApplyZBias(m_dwZBias); // set the bias factors glViewportWrapper(windowSetting.vpLeftW, windowSetting.uDisplayHeight - windowSetting.vpTopW - windowSetting.vpHeightW, windowSetting.vpWidthW, windowSetting.vpHeightW, false); //if options.bOGLVertexClipper == false ) { glDrawElements( GL_TRIANGLES, gRSP.numVertices, GL_UNSIGNED_SHORT, g_vtxIndex ); } if( !gRDP.bFogEnableInBlender && gRSP.bFogEnabled ) { TurnFogOnOff(true); } return true; }
// This is so weired that I can not do vertex transform by myself. I have to use // OpenGL internal transform bool OGLRender::RenderFlushTris() { if( !m_bSupportFogCoordExt ) SetFogFlagForNegativeW(); else { if( !gRDP.bFogEnableInBlender && gRSP.bFogEnabled ) { TurnFogOnOff(false); } } ApplyZBias(m_dwZBias); // set the bias factors glViewportWrapper(windowSetting.vpLeftW, windowSetting.uDisplayHeight-windowSetting.vpTopW-windowSetting.vpHeightW+windowSetting.statusBarHeightToUse, windowSetting.vpWidthW, windowSetting.vpHeightW, false); OPENGL_CHECK_ERRORS; //if options.bOGLVertexClipper == FALSE ) { glDrawElements( GL_TRIANGLES, gRSP.numVertices, GL_UNSIGNED_SHORT, g_vtxIndex ); OPENGL_CHECK_ERRORS; } /* else { //ClipVertexesOpenGL(); // Redo the index // Set the array glVertexPointer( 4, GL_FLOAT, sizeof(float)*5, &(g_vtxProjected5Clipped[0][0]) ); glEnableClientState( GL_VERTEX_ARRAY ); pglClientActiveTextureARB( GL_TEXTURE0_ARB ); glTexCoordPointer( 2, GL_FLOAT, sizeof( TLITVERTEX ), &(g_clippedVtxBuffer[0].tcord[0].u) ); glEnableClientState( GL_TEXTURE_COORD_ARRAY ); pglClientActiveTextureARB( GL_TEXTURE1_ARB ); glTexCoordPointer( 2, GL_FLOAT, sizeof( TLITVERTEX ), &(g_clippedVtxBuffer[0].tcord[1].u) ); glEnableClientState( GL_TEXTURE_COORD_ARRAY ); glDrawElements( GL_TRIANGLES, gRSP.numVertices, GL_UNSIGNED_INT, g_vtxIndex ); // Reset the array pglClientActiveTextureARB( GL_TEXTURE0_ARB ); glTexCoordPointer( 2, GL_FLOAT, sizeof( TLITVERTEX ), &(g_vtxBuffer[0].tcord[0].u) ); glEnableClientState( GL_TEXTURE_COORD_ARRAY ); pglClientActiveTextureARB( GL_TEXTURE1_ARB ); glTexCoordPointer( 2, GL_FLOAT, sizeof( TLITVERTEX ), &(g_vtxBuffer[0].tcord[1].u) ); glEnableClientState( GL_TEXTURE_COORD_ARRAY ); glVertexPointer( 4, GL_FLOAT, sizeof(float)*5, &(g_vtxProjected5[0][0]) ); glEnableClientState( GL_VERTEX_ARRAY ); } */ if( !m_bSupportFogCoordExt ) RestoreFogFlag(); else { if( !gRDP.bFogEnableInBlender && gRSP.bFogEnabled ) { TurnFogOnOff(true); } } return true; }