Closed Zoardedz closed 1 month ago
-I also used RenderDoc to check if the FPS text displays correctly when layered under the rectangle and it displayed the text like normal
If it helps, this is practically the draw function every IElement2D uses.
Is the render target here alpha-blended? Note that SpriteBatch defaults to using Premultiplied alpha, and if you are using straight-alpha with the rectangle it will be 'wrong' here.
I'm trying to make a GUI SpriteBatch that'll render a rectangle and an FPS counter as a test, I'm using your vs-templates (Win32 no device resources) with a few changes just making it more polymorphic, that aside there's a bug in my code that turns the text into black boxes if layered above the drawn rectangle, I assume this is because it's trying to reference the texture I used for the rectangle (images below) I made a different SpriteBatch instance for the FPS counter but it also gave me the same result (surprisingly??) I assume it could be as I said, trying to reference the image I used for the rectangle instead of the SpriteFont textures or an unrelated issue relating to blendstates or something else.