RenderingDevice: Pass mipmap count to texture_create_from_extension()#105570
RenderingDevice: Pass mipmap count to texture_create_from_extension()#105570Repiteo merged 1 commit intogodotengine:masterfrom
texture_create_from_extension()#105570Conversation
|
Alternatively, to maintain compatibility., parameter |
fcf71bf to
5facc51
Compare
|
You will need to add compatibility bindings since this breaks compatibility. How to do so is described here https://docs.godotengine.org/en/latest/contributing/development/handling_compatibility_breakages.html |
5facc51 to
f17dbd8
Compare
b2f0881 to
6d14273
Compare
|
Thanks, PR updated. |
6d14273 to
b9aac3c
Compare
|
Given the breaking nature of this, this could be further discussed by opening a proposal. Although, I'm not hearing objections, and I do understand that talks about RenderingDevice will probably fly over most people's heads |
Mickeon
left a comment
There was a problem hiding this comment.
Description is okay. Even without this PR it's very, very difficult to localize, but it's good to mention the new parameter at least.
|
The change looks scary, but this function in general was only exclusively used by the internal openxr module up until last September when I exposed it for use from a gdextension #96860, as up till then, that was not possible. This is why I suspect I am the only user. Regardless of the number of users, anyone who imports an external texture would also like to specify the mipmap count I believe, especially if that texture is to be shown in 3D. |
dsnopek
left a comment
There was a problem hiding this comment.
This looks OK to me!
As far as compatibility, I think this is fine with the compatibility methods for GDExtension. Given that you need to pass in a native handle, this API can't really be used from anything except GDExtension, so we shouldn't need to worry about GDScript breakage.
b9aac3c to
f4fd23d
Compare
f4fd23d to
6ae50ca
Compare
|
Sorry, missed the review(s) by @AThousandShips |
texture_create_from_extension()
|
Thanks! |
Godot hardcodes mipmap count in
texture_create_from_extension()godot/servers/rendering/rendering_device.cpp
Line 1195 in 2d3bdca
My texture is shown in 3D, and with Godot ignoring mips, it looks worse than needed. For that reason I introduced parameter
p_mipmapsto support specifying mipmap count.Changes the function signature, however I suspect not many are using it, apart from the internal openxr module.