Dear All,
If anyone can help?
My opengl program works fine in windows XP. But in Vista and 7 during refreshing of scene it flashes. I checked and saw many forums around this flashing and flickeing issue but no answer.
I changed the program from draw_to_window to draw_to_bitmap and flashing is solved. Congratulations…
Everything seems to be okay. But no.
Now there is a new issue and that is about maximum texture size.
When working in draw_to_window, the maximum texture size given by glgetintegerv returns 4096 on my system, and when draw_to_bitmap, it is 1024.
Before going further, if you want please check these two topics both in MSDN:
OpenGL VI: Rendering on DIBs with PFD_DRAW_TO_BITMAP and
OpenGL VII: Scratching the Surface of Texture Mapping
in the second topic, the author has written:
"glGetIntegerv(GL_MAX_TEXTURE_SIZE, &glMaxTexDim);
glMaxTexDim = min(128, glMaxTexDim);
The first line gets the maximum allowable size for an image to be used as an OpenGL texture map. On my system, this value happens to be 1024. This size may vary, depending on your system, especially if you have an OpenGL-accelerated video card."
I guess he didn’t realize that in draw_to_bitmap, it is always 1024.
I checked my codes many times, and I reached to this point:
setup some codes with draw_to_window flag and just after wglmakecurrent, check this glGetIntegerv(GL_MAX_TEXTURE_SIZE, &glMaxTexDim), and it returns 4096, 2048 etc. depends on the system, and
then again with draw_to_bitmap, and again just after wglmakecurrent, it returns 1024.
Now the question is: WHY?
Thanks in advance to all,