Skip to content
This repository has been archived by the owner on Jun 11, 2022. It is now read-only.

Text display defect #36

Closed
joelcnz opened this issue Mar 21, 2015 · 1 comment
Closed

Text display defect #36

joelcnz opened this issue Mar 21, 2015 · 1 comment

Comments

@joelcnz
Copy link

joelcnz commented Mar 21, 2015

//I'm using Windows 7 for this
//Text display is effected badly by drawing a quad with Fill.Line or Fill.Point.
// Also, Shape.Fill.Line effects at leased texture (or what ever). (not shown in the example)

import std.stdio;

import Dgame.Graphic;
import Dgame.Math;
import Dgame.Audio;
import Dgame.System;
import Dgame.Window;

Shape littleSquare;

void main() {
    Window wnd = Window(480, 640, "Dgame App - Test", Window.Style.Default, GLSettings(0, 0, 0));

    littleSquare = new Shape(Geometry.Quad, [Vertex(10,10), Vertex(20,10), Vertex(20,20), Vertex(10, 20)]);
    littleSquare.fill = Shape.Fill.Line; // 'Point' does it too, but not 'Full'

    Font fnt = Font("samples/font/arial.ttf", 22);
    Text curFps = new Text(fnt);
    curFps.setPosition(200, 10);

    StopWatch fps_sw;

    Event event;

    bool loop = true;
    while(loop) {
        curFps.format("Current FPS: %d.", fps_sw.getCurrentFPS());

        while (wnd.poll(&event)) {
            if (event.type == Event.Type.Quit) {
                loop = false;
            } else if (event.type == Event.Type.KeyDown) {
                if (event.keyboard.key == Keyboard.Code.Esc)
                    wnd.push(Event.Type.Quit);
            }
        }

        wnd.clear();

        wnd.draw(curFps);

        wnd.draw(littleSquare);

        wnd.display;
    } // while main loop
}
@Dgame
Copy link
Owner

Dgame commented Mar 21, 2015

I see, I will investigate that. Thank you!

@Dgame Dgame closed this as completed in 0825970 Mar 21, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants