-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A couple of bugs I found in the loader.c #33
Comments
I really wonder how nobody got on these before.Like,no one loads anything but textures 2D ? :P |
Thank you for the bug report. Please send me a PR with the fixes.
The GL loadtests only test 2D textures but it is surprising nobody else spotted these errors. I'd be happy to accept a PR with additional tests. The tests for the new Vulkan loader (WIP over on https://github.com/msc-/KTX) include array and cube texture tests. |
Sorry, I don't have the sources on github.Have no time to set all the stuff
for PR. I can drop the whole loader.c here if you wish.
…On Jul 4, 2017 8:38 PM, "Mark Callow" ***@***.***> wrote:
Thank you for the bug report. Please send me a PR with the fixes.
really wonder how nobody got on these before.Like,no one loads anything
but textures 2D ? :P
The GL loadtests only test 2D textures but it is surprising nobody else
spotted these errors. I'd be happy to accept a PR with additional tests.
The tests for the new Vulkan loader (WIP over on
https://github.com/msc-/KTX) include array and cube texture tests.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#33 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAawgLv4dGJkMOfpmDs1Qn9GBojSo4Edks5sKnidgaJpZM4ONgUy>
.
|
If you have a fix for #1, please drop those lines here. No need for the whole thing. |
`
` |
This is fixed in the new code in branch |
Fixes item KhronosGroup#1 of issue KhronosGroup#33. Item KhronosGroup#2 did not occur in incoming.
Fixs item KhronosGroup#1 of issue KhronosGroup#33.
Fixes item KhronosGroup#1 of issue KhronosGroup#33. Item KhronosGroup#2 did not occur in incoming.
Fixs item KhronosGroup#1 of issue KhronosGroup#33.
Fixs item KhronosGroup#1 of issue KhronosGroup#33.
Fixs item KhronosGroup#1 of issue KhronosGroup#33.
1.When one loads an array texture, GL_TEXTURE_2D_ARRAY,in the loader.c it is bound to a default target which is probably GL_TEXTURE_2D.It is never bound to GL_TEXTURE_2D_ARRAY afterwards.It leads to INVALID OPERATION error when trying to rebound to GL_TEXTURE_2D_ARRAY later.Please fix it by binding the texture only after the correct target has been set. (lines 543 -555)
2.When loading a CUBE MAP,the loader iterates over the faces,right?That's fine.But then the texture target enum that the loader returns is not GL_TEXTURE_CUBE_MAP but the last face target enum.This one also leads to a crash when used by the caller to bind a target.
I fixed it like this:
if (errorCode == KTX_SUCCESS)
{
The text was updated successfully, but these errors were encountered: