-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Implemented support for mipmap generation #973
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
Conversation
|
Looks good overall. Some remarks:
|
While hasMipmap() is not really necessary, it might be convenient for the user if their architecture requires them to be able to tell if mipmaps need to be regenerated or not. If we don't track this state, they will have to themselves, and I assume it is simpler for us to do directly in Also,
From what I can tell (you can see this in the comment which I forgot to change when I removed GLU), the only reason for the manual management in that example was because we wanted to use GLU to generate the mipmap. Since GLU got removed, and we can even generate the mipmap ourselves now, there is no point to manually manage texture creation. And besides... this is a better example of interoperability between SFML and OpenGL if you ask me. 😉
Well... it depends on what we tell users who don't bother calling What makes it even worse is that the current mipmap implementation doesn't even work unless the FBO implementation is available in the first place, so the case where it would actually make sense (the default implementation) doesn't even happen in practice.
It does get invalidated. I just omitted the additional texture saving etc. that is present in |
Not sure. In most scenarios, users will know exactly when to regenerate mipmaps without tracking a state (after the call to load or update, or every frame). I'd really prefer to go with the minimal API first, and add this kind of function (which is pure convenience) later if really needed.
I thought about it again and reached the same conclusion. I even knew that you would answer that 😛
So far, we have always enforced the call to
Sorry, I missed that in the diff. And don't forget my last point, I guess I added it after you read my post:
|
1e6096c to
52d4813
Compare
|
The issues should be fixed now. |
|
👍 Does this need more testing on OpenGL ES platforms? |
3f52366 to
2347d8e
Compare
|
Rebased and added missing define for OpenGL ES platforms. Could use some OpenGL ES testing. @MarioLiebisch, @BlueCobold |
|
Will see if I can find some time this weekend to check for iOS. |
|
Bump. |
|
Working flawlessly on Arch Linux. 👍 🐈 |
|
@MarioLiebisch, @BlueCobold Any testing on this? |
2347d8e to
7a3cc22
Compare
|
Since iOS/Android are still experimental, should we proceed to and merge this? |
|
Is there a minimal sample to test this? Then it would be far easier for me to check if it's working - basically just compile the libs and test it. |
|
The OpenGL example uses the mipmaps, so you could just built these, or does that not work for iOS? |
|
I'll check. |
|
Any results so far @BlueCobold? What about @MarioLiebisch? |
|
@binary1248 Could you rebase the PR? Also could we potentially move on without proper OpenGL ES testing? |
… sf::RenderTexture. (#123)
|
Done. |
|
This PR has been added to my merge list, meaning it will be merged soon, unless someone raises any concerns. |
This is the GL_EXT_framebuffer_object variant that relies on explicit generation by the user rather than implicit generation every time the base level image is modified.
Proper support for sf::RenderTexture has also been implemented.
Supersedes #498, implements #123.