Fixed typo causing compilation error on iOS

Corrected inversion of skybox on OSX

--HG--
branch : nfb
This commit is contained in:
2014-01-25 18:43:34 -08:00
parent d906f67f76
commit 77550118f0
2 changed files with 3 additions and 3 deletions

View File

@@ -77,7 +77,7 @@ bool KRTextureTGA::uploadTexture(GLenum target, int lod_max_dim, int &current_lo
TGA_HEADER *pHeader = (TGA_HEADER *)m_pData->getStart();
unsigned char *pData = (unsigned char *)pHeader + (long)pHeader->idlength + (long)pHeader->colourmaplength * (long)pHeader->colourmaptype + sizeof(TGA_HEADER);
#if TARGET_OS_IPHONEz
#if TARGET_OS_IPHONE
GLenum base_internal_format = GL_BGRA;
#else
GLenum base_internal_format = pHeader->bitsperpixel == 24 ? GL_BGR : GL_BGRA;

View File

@@ -42,8 +42,8 @@ uniform mediump vec4 viewport;
void main()
{
gl_Position = vec4(vertex_position.xy, 1.0, 1.0);
vec4 t = inv_mvp_matrix_no_translate * vec4(vertex_position.xy, 1.0, 1.0);
t /= t.w;
t *= 1.0 / t.w;
texCoord = vec3(t);
}