Advertisement

glut only runs at hd? can it run at 4k?

Started by July 03, 2017 02:42 AM
12 comments, last by nickme 7 years, 5 months ago

No matter what screen size I set it, the glutGet(GLUT_SCREEN_WIDTH) and glutGet(GLUT_SCREEN_HEIGHT); always return 1707x960 even though I changed it from 4k to 1280x800, why is that?

this is the debug func that I wrote:

void debug(int x, int y, int vx, int vy, char *c) {
    const int max = 60;
    char buf[max];

    sprintf_s(buf, max, "[%i|%i] ", vx, vy);
    strcat_s(buf, c);
    glDisable(GL_TEXTURE_2D);
    CUtilities::Msg(x, y, 0, 0, buf, White, Black);    // Output debug
}

and this is the func that I execute:

debug(20, 200, glutGet(GLUT_SCREEN_WIDTH), glutGet(GLUT_SCREEN_HEIGHT), "Screen W & H");

 

 

Advertisement

When I change the windows custom scaling to 100%, the program ran as it is suppose to be.  but when I changed the custom scaling to 225%, the program went hay-wired.

Screenshot (17).png

Screenshot (18).png

This topic is closed to new replies.

Advertisement