Problem displaying textures in OpenGL in XP vs 7
I am running into the strangest problem that I just can't place my finger on. I've been developing an application in VB.net for the last couple months in Windows 7. The program involves some basic OpenGL drawing and animation with basic shapes (squares and circles) and basic textures mapped onto pointlists. The time has come to distribute the program to another machine. On some machines though开发者_开发问答, I encounter problems when I'm drawing textures. I know that openGL is still functional because drawing basic squares and circles still occur, the textured objects are the only things missing.
I've tested this problem on multiple Windows 7 64 bit machines, and all work just fine.
Installing the program on a Windows XP 32 bit machine causes the problem. No error is thrown. The program doesn't crash. The textures just don't get drawn onto the screen. All the other simple shapes are still there, and none of the functionality of the program is affected.
I've tested the same problem on Windows XP 32 and 64 bit Virtual Machines, and the same problem arises in both. This is after installing to the most recent update and installing .net framework 3.5. This leads me to believe that it's not a problem with x64/x86, but rather Windows XP itself.
Is there some functionality in OpenGL that Windows XP just doesn't support? This idea just seems odd to me and I can't see this being the problem.
The only possible explanation I've come up with is that possibly the call order for the initialization is different in XP and 7, but my tests haven't proven anything either way. The geometry is being loaded in from a text file at initalization which is why this seems to be another possible explanation
UPDATE
I've done further testing on different machines and have encountered the program running fine in Windows 7 32 bit, but encountering the problem on a different machine running Windows 7 64 bit. Thus, I can conclude it has nothing to do with the operating system, but there is some variable I have not identified causing the problem.
Besides the driver, the main category of things that can explain rendering differences are differences of hardware support.
The most immediate feature I can think of that could explain this is the lack of non-power-of-two texture support. This was added a long while back to OpenGL, but you might still find older hardware that does not support it (and so that hardware would not support the more recent OpenGL versions).
What are the sizes of the textures that do not show up ?
The functionality that's supported depends primarily on the graphics driver, not the OS itself. At least with a reasonably recent driver, I haven't run into problems under XP though (OTOH, I have had to work around a few oddities in Windows 7). It's possible your code has some bugs that don't always show up, but it's hard to guess without any code to look at.
精彩评论