-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add support for runtime mipmap generation. #2
Comments
For Direct3D9, if IDirect3DBaseTexture9::GetAutoGenFilterType returns To generate sub-levels texture objects need to:
Then calls to IDirect3DBaseTexture9::GenerateMipSubLevels can be used to hint when sublevels should be generated, i.e. in |
For Direct3D11, calls to ID3D11DeviceContext::GenerateMips for non-render-target views have no effect, thus auto-generation must implemented by AGL. |
For OpenGL 2.1+, and OpenGL 3.3+, calls to Additionally, as a fallback, set the texture parameter |
For OpenGL ES 2.0 and OpenGL ES 3.0, just use |
Finally, for other backends (presumably including mantle), auto-generation must be implemented by AGL. |
Runtime mipmap generation should be exposed for texture objects.
The cleanest approach would be to provide a stateless method that explicitly generates mipmaps from the top-most level, i.e.,
agl_texture_generate_mipmaps()
. However, this violates the zero-copy design philosophy of AGL, and is impossible for immutable texture objects. Thus,agl_texture_data_1d/2d/3d()
should accept flags, of whichAUTO_GENERATE_MIPMAPS
should implement the desired behavior.Alternatively, a boolean texture parameter can be exposed that results in similar behavior:
The text was updated successfully, but these errors were encountered: