Only enable multitexturing if a texture is bound to unit 1

This commit is contained in:
Luke Benstead 2017-05-31 13:34:30 +01:00
parent 1307f43bc5
commit 6829dcada4

View File

@ -843,12 +843,15 @@ static GLuint _glKosArraysApplyClipping(GLfloat *uvsrc, GLuint uvstride, GLenum
static inline void _glKosArraysApplyMultiTexture(GLenum mode, GLuint count) {
if(GL_KOS_VERTEX_PTR_MODE & GL_KOS_USE_TEXTURE1) {
_glKosPushMultiTexObject(_glKosBoundMultiTexID(),
(pvr_vertex_t *)_glKosVertexBufPointer(),
count);
GL_TEXTURE_OBJECT* tex = _glKosBoundMultiTexID();
if(tex) {
_glKosPushMultiTexObject(tex,
(pvr_vertex_t *)_glKosVertexBufPointer(),
count);
if(mode == GL_QUADS)
_glKosArraysSwizzleQuadsMultiTex(count);
if(mode == GL_QUADS)
_glKosArraysSwizzleQuadsMultiTex(count);
}
}
}