Home Game Development opengl – glfw resizing inflicting picture scaling

opengl – glfw resizing inflicting picture scaling

0
opengl – glfw resizing inflicting picture scaling

[ad_1]

I’ve a quad rendered that extends from the highest left of the window to with width of the window that can be 64 pixels excessive. When I resize the window, from its preliminary measurement, the quad and textual content scales proportionately greater or smaller in the identical say Photoshop can scale a picture. What I’m in search of on a primary degree is that no matter how I resize the window, all the things drawn stays the identical. From the under picture, the suitable facet is the preliminary measurement and the left facet is what occurs once I drag the window to be a smaller measurement. The pink bar and textual content scales with it. This is how Im dealing with my resizing:

glfwSetWindowSizeCallback(pWindow, WindowSizeCallback); // initialized after context

void WindowSizeCallback(GLFWwindow* window, int width, int peak)
{
    glfwSetWindowSize(window, width, peak);    
}

enter image description here

[ad_2]

LEAVE A REPLY

Please enter your comment!
Please enter your name here