void OGLRender::DisableMultiTexture() { glActiveTexture(GL_TEXTURE1); EnableTexUnit(1, false); glActiveTexture(GL_TEXTURE0); EnableTexUnit(0, false); glActiveTexture(GL_TEXTURE0); EnableTexUnit(0, true); }
void OGLRender::InitCombinerBlenderForSimpleRectDraw(uint32_t tile) { //glEnable(GL_CULL_FACE); EnableTexUnit(0, false); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); //glEnable(GL_ALPHA_TEST); }
void OGLRender::SetTextureVFlag(TextureUVFlag dwFlag, uint32 dwTile) { TileVFlags[dwTile] = dwFlag; if( dwTile == gRSP.curTile ) // For basic OGL, only support the 1st texel { COGLTexture* pTexture = g_textures[gRSP.curTile].m_pCOGLTexture; if( pTexture ) { EnableTexUnit(0,TRUE); BindTexture(pTexture->m_dwTextureName, 0); } SetTexWrapT(0, OGLXUVFlagMaps[dwFlag].realFlag); } }
void COGLExtRender::SetTextureUFlag(TextureUVFlag dwFlag, uint32 dwTile) { TileUFlags[dwTile] = dwFlag; if( !m_bEnableMultiTexture ) { OGLRender::SetTextureUFlag(dwFlag, dwTile); return; } int tex; if( dwTile == gRSP.curTile ) tex=0; else if( dwTile == ((gRSP.curTile+1)&7) ) tex=1; else { if( dwTile == ((gRSP.curTile+2)&7) ) tex=2; else if( dwTile == ((gRSP.curTile+3)&7) ) tex=3; else { TRACE2("Incorrect tile number for OGL SetTextureUFlag: cur=%d, tile=%d", gRSP.curTile, dwTile); return; } } for( int textureNo=0; textureNo<8; textureNo++) { if( m_textureUnitMap[textureNo] == tex ) { pglActiveTexture(GL_TEXTURE0_ARB+textureNo); OPENGL_CHECK_ERRORS; COGLTexture* pTexture = g_textures[(gRSP.curTile+tex)&7].m_pCOGLTexture; if( pTexture ) { EnableTexUnit(textureNo,TRUE); BindTexture(pTexture->m_dwTextureName, textureNo); } SetTexWrapS(textureNo, OGLXUVFlagMaps[dwFlag].realFlag); } } }