jweather / slimdx

Automatically exported from code.google.com/p/slimdx
MIT License
0 stars 0 forks source link

SampleFramework bug w/ Render call in D3D10 samples. #834

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
(copy-pasted from an invalid bug filed against v2 on github):

Code looks like this:

        public virtual void Render(UserInterfaceRenderer renderer, Element element, int x, int y, int width, int height) {
            Color4 color = new Color4(1.0f, 1.0f, 1.0f);
            renderer.RenderRectangle(x, y, width, height, color);
            renderer.RenderString(element.Label, 0, 0, new Color4(1.0f, 0.0f, 0.0f));
        }

Should look like this:

        public virtual void Render(UserInterfaceRenderer renderer, Element element, int x, int y, int width, int height) {
            Color4 color = new Color4(1.0f, 1.0f, 1.0f);
            renderer.RenderRectangle(x, y, width, height, color);
            renderer.RenderString(element.Label, x, y, new Color4(1.0f, 0.0f, 0.0f)); // note change fro 0,0 to x,y
        }

The result of the bug is that when you add more than one element to be 
registered, the boxes draw correctly, but the text  steps on itself.
Thanks

Original issue reported on code.google.com by josh.petrie on 17 Sep 2011 at 7:06

GoogleCodeExporter commented 9 years ago

Original comment by josh.petrie on 17 Sep 2011 at 7:07

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r2152.

Original comment by Mike.Popoloski on 15 Nov 2011 at 4:56