chris jones
2003-06-23 16:00:56 UTC
Hi, i am doing this to set top down ortho orientation....
wglMakeCurrent(dc, glcontext);
glGetIntegerv(GL_VIEWPORT, @ vpdim[0]);
width := vpdim[2];
height := vpdim[3];
glOrtho(0, width, height, 0, -1, 1);
which works fine until the window is resized, i have traced the problem to
glGetIntegerv. It always returns the initial size of the viewport even
though it has changed, glClear clears the new sized window ok but no my
origin is not where i want it.
What am i doing wrong?
thanks again,
chris
wglMakeCurrent(dc, glcontext);
glGetIntegerv(GL_VIEWPORT, @ vpdim[0]);
width := vpdim[2];
height := vpdim[3];
glOrtho(0, width, height, 0, -1, 1);
which works fine until the window is resized, i have traced the problem to
glGetIntegerv. It always returns the initial size of the viewport even
though it has changed, glClear clears the new sized window ok but no my
origin is not where i want it.
What am i doing wrong?
thanks again,
chris