You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I wanted to create a big checker board pattern and cover the screen with it, it requires a lot of rectangles. It is slow to generate and draw that many quads every frame(i already use some caches).
In addition I wanted to flip an image visually without messing with the image crate or messing with the image data, I want to be able to negate the uv coordinates and flip the image easily.
Describe the solution you'd like
The default texture wrap mode is GL_CLAMP_TO_EDGE
I suggest an option in the NativeOptions to set the repeat texture property or maybe to set the texture wrap mode:
enumTextureWrapMode{Repeat,MirroredRepeat,ClampToEdge,ClampToBorder(Color32)}structNativeOptions{
...
texture_wrap_mode:TextureWrapMode// defaults to ClampToEdge// or
repeat_textures:bool// defaults to false
...
}
It can be done with calling some OpenGL functions:
Describe alternatives you've considered
I considered manipulating pixels to do what I want but it would be too slow to do that, and I only need it visually, I dont need to use the flipped image for something else.
I also tried generating the checkboard pattern using the mesh API with rectangles. While it works, the performance isn't good enough for me and its not a major part of the thing I am working on.
Additional context
This is what happens when I try to flip the texture with uv:
I'm having similar issues for a project I am working on rendering textured meshes with tiling textures, when the uv coords are above or below 0 it just repeats instead of wrapping, would be great if this was an option for the Mesh struct for texture_wrap_mode
Is your feature request related to a problem? Please describe.
I wanted to create a big checker board pattern and cover the screen with it, it requires a lot of rectangles. It is slow to generate and draw that many quads every frame(i already use some caches).
In addition I wanted to flip an image visually without messing with the image crate or messing with the image data, I want to be able to negate the uv coordinates and flip the image easily.
Describe the solution you'd like
The default texture wrap mode is
GL_CLAMP_TO_EDGE
I suggest an option in the
NativeOptions
to set the repeat texture property or maybe to set the texture wrap mode:It can be done with calling some OpenGL functions:
for the clamp to border, the color can be set like that:
Describe alternatives you've considered
I considered manipulating pixels to do what I want but it would be too slow to do that, and I only need it visually, I dont need to use the flipped image for something else.
I also tried generating the checkboard pattern using the mesh API with rectangles. While it works, the performance isn't good enough for me and its not a major part of the thing I am working on.
Additional context
This is what happens when I try to flip the texture with uv:
Thank you for taking the time to review my feature request :)
The text was updated successfully, but these errors were encountered: