Fixed typo causing compilation error on iOS
Corrected inversion of skybox on OSX --HG-- branch : nfb
This commit is contained in:
@@ -77,7 +77,7 @@ bool KRTextureTGA::uploadTexture(GLenum target, int lod_max_dim, int ¤t_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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user