New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text display defect #36

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

Comments

Projects
None yet
2 participants
@joelcnz

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

This comment has been minimized.

Owner

Dgame commented Mar 21, 2015

I see, I will investigate that. Thank you!

@Dgame Dgame closed this in 0825970 Mar 21, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment