Skip to content

Commit 5141eb7

Browse files
committed
- changed check for valid texture on vertex_submit to avoid false postive error reporting
1 parent 3521c41 commit 5141eb7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

scripts/Builders/yyVBufferBuilder.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -385,10 +385,10 @@ function yyVBufferBuilder(_size) {
385385
// Check whether the webgl texture has been initialised yet and do so if not
386386
if (_texture && !_texture.WebGLTexture.webgl_textureid) {
387387
WebGL_BindTexture(_texture.TPE);
388-
if (!WebGL_IsTextureValid(_texture.WebGLTexture.webgl_textureid, WebGL_gpu_get_tex_mip_enable())) {
389-
yyError("vertex_submit: trying to use a texture that does not exist");
390-
return;
391-
}
388+
if(_texture.WebGLTexture.webgl_textureid.Image == undefined) {
389+
yyError("vertex_submit: trying to use an invalid texture");
390+
return;
391+
}
392392
}
393393
g_webGL.DispatchVBuffer(_primType, _texture.WebGLTexture.webgl_textureid, m_VBuffer, _offset, vertexCount);
394394
}
@@ -401,10 +401,10 @@ function yyVBufferBuilder(_size) {
401401
// Check whether the webgl texture has been initialised yet and do so if not
402402
if (_texture && !_texture.WebGLTexture.webgl_textureid) {
403403
WebGL_BindTexture(_texture.TPE);
404-
if (!WebGL_IsTextureValid(_texture.WebGLTexture.webgl_textureid, WebGL_gpu_get_tex_mip_enable())) {
405-
yyError("vertex_submit: trying to use a texture that does not exist");
406-
return;
407-
}
404+
if(_texture.WebGLTexture.webgl_textureid.Image == undefined) {
405+
yyError("vertex_submit: trying to use an invalid texture");
406+
return;
407+
}
408408
}
409409
pBuff = g_webGL.AllocVerts(_primType, _texture.WebGLTexture.webgl_textureid, m_FVF, vertexCount);
410410
}

0 commit comments

Comments
 (0)