PDA

View Full Version : OpenGL - Visualization Problem



deadLock++
01-17-2003, 01:26 PM
I am making a very simple 2d game (pacman clon) using OpenGL (orthoview perspective).

I am developing the game in my computer (WinXP + GeForce3) and everything is working well (snapshot 1) but when I test it in other machine (WinXP + GeForce2) I see textures mapping errors (snapshot 2).

snapshot 1:
http://www.dedalus-software.com.ar/hackman/images/good.gif

snapshot 2:
http://www.dedalus-software.com.ar/hackman/images/wrong.gif

Can this problem be related to the topic writed in the red book Appendix H, "OpenGL Invariance"? How I can solve it?

The other problem is that in the second machine (where I have installed the latest nVidia drivers) the game is using the Microsoft OpenGL driver instead of the nVidia drivers. Why? How can I choose the driver to use? Why in one machine uses the accelerated driver and in other uses the Microsoft not-accelerated-and-really-slow driver?

Thanks very much.

deadLock++

kehziah
01-18-2003, 07:23 AM
Regarding the "choice" of the driver, this part is done during initialization of the window, when you set a pixel format. You should use DescribePixelFormat after your call to ChoosePixelFormat; look for PFD_GENERIC_FORMAT and PFD_GENERIC_ACCELERATED in dwFlags.

If neither are set, you get an ICD-class driver (the driver you want).

If PFD_GENERIC_ACCELERATED is set, you get an MCD-class driver (aka mini driver); these drivers are very rare nowadays (date back to 3DFX times).

If PFD_GENERIC_FORMAT is set, you get Microsoft implementation.

Now that you know which driver you will get, you can decide if it suits your needs or not. If not, change the PIXELFORMATDESC structure, and call ChoosePixelFormat once again. And look at what you get before setting the pixel format.

Now why would you get Microsoft on one machine and NVidia on the other? Either the drivers are not correctly installed, or some feature you ask in your PIXELFORMATDESC is not supported by the driver.

Regarding your texturing problem, it might be caused by the texture wrap mode. For seamless texturing, you should use GL_CLAMP_TO_EDGE rather than GL_CLAMP.

deadLock++
01-18-2003, 10:21 AM
Thanks for your answer, kehziah, you put me in the road again http://www.opengl.org/discussion_boards/ubb/smile.gif)