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
When a texture is used, such as when drawing a Bitmap, the texture.filter and texture.wrap values on that texture get overwritten by values from the Drawable's smooth and tileWrap properties. This was unexpected and put me in situations where I was assigning texture sampler settings that did nothing, and were instead being overwritten every frame by a prior unrelated Bitmap's draw. This is because the texture was assigned as a secondary texture on a shader used by SpriteBatch, meaning the SpriteBatch's tileWrap setting was only stomping the wrap property of the SpriteBatch's assigned texture, and not the extra texture used by the shader.
This splat happens in RenderContext.hx in beforeDraw.
I think the existence of these settings on the Drawable is unconventional and unexpected and would prefer to set them once on texture load and never again. The inconsistent naming scheme also bothers me.
Some possible adjustments:
eliminating the Drawable's smooth and tileWrap properties, so there is always one clear thing to assign
restoring the settings on the texture to what they were before they were squashed, to prevent situations where a Bitmap changes what a later SpriteBatch does.
The text was updated successfully, but these errors were encountered:
When a texture is used, such as when drawing a
Bitmap
, thetexture.filter
andtexture.wrap
values on that texture get overwritten by values from theDrawable
'ssmooth
andtileWrap
properties. This was unexpected and put me in situations where I was assigning texture sampler settings that did nothing, and were instead being overwritten every frame by a prior unrelated Bitmap's draw. This is because the texture was assigned as a secondary texture on a shader used bySpriteBatch
, meaning theSpriteBatch
'stileWrap
setting was only stomping the wrap property of theSpriteBatch
's assigned texture, and not the extra texture used by the shader.This splat happens in RenderContext.hx in
beforeDraw
.I think the existence of these settings on the
Drawable
is unconventional and unexpected and would prefer to set them once on texture load and never again. The inconsistent naming scheme also bothers me.Some possible adjustments:
Drawable
'ssmooth
andtileWrap
properties, so there is always one clear thing to assignBitmap
changes what a laterSpriteBatch
does.The text was updated successfully, but these errors were encountered: