Cocoa Port:

- Fix drawing bug where the wrong texture coordinates were being used when a display window is in Touch mode. (Regression from r5249.)
This commit is contained in:
rogerman 2015-08-25 23:44:19 +00:00
parent e344486e8a
commit c36c379e1f
1 changed files with 17 additions and 23 deletions

View File

@ -6673,7 +6673,7 @@ void OGLDisplayLayer::ProcessOGL()
GLfloat w1 = this->_texLoadedWidth[1];
GLfloat h1 = this->_texLoadedHeight[1];
if (this->_isTexVideoInputDataNative[0])
if (this->_isTexVideoInputDataNative[0] && (displayMode == DS_DISPLAY_TYPE_MAIN || displayMode == DS_DISPLAY_TYPE_DUAL))
{
if (!isUsingCPUPixelScaler)
{
@ -6685,8 +6685,6 @@ void OGLDisplayLayer::ProcessOGL()
}
}
else
{
if (displayMode == DS_DISPLAY_TYPE_MAIN || displayMode == DS_DISPLAY_TYPE_DUAL)
{
uint32_t *texData = this->_vf[0]->RunFilter();
texVideoPixelScalerID[0] = this->_texCPUFilterDstID[0];
@ -6697,9 +6695,8 @@ void OGLDisplayLayer::ProcessOGL()
h0 = this->_vf[0]->GetDstHeight();
}
}
}
if (this->_isTexVideoInputDataNative[1])
if (this->_isTexVideoInputDataNative[1] && (displayMode == DS_DISPLAY_TYPE_TOUCH || displayMode == DS_DISPLAY_TYPE_DUAL))
{
if (!isUsingCPUPixelScaler)
{
@ -6711,8 +6708,6 @@ void OGLDisplayLayer::ProcessOGL()
}
}
else
{
if (displayMode == DS_DISPLAY_TYPE_TOUCH || displayMode == DS_DISPLAY_TYPE_DUAL)
{
uint32_t *texData = this->_vf[1]->RunFilter();
texVideoPixelScalerID[1] = this->_texCPUFilterDstID[1];
@ -6723,7 +6718,6 @@ void OGLDisplayLayer::ProcessOGL()
h1 = this->_vf[1]->GetDstHeight();
}
}
}
// Output
this->_texVideoOutputID[0] = texVideoPixelScalerID[0];
@ -6763,7 +6757,7 @@ void OGLDisplayLayer::RenderOGL()
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, this->_texVideoOutputID[1]);
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, this->_displayTexFilter[1]);
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, this->_displayTexFilter[1]);
glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, 0);
glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, (GLubyte *)(6 * sizeof(GLubyte)));
break;
case DS_DISPLAY_TYPE_DUAL: