Only white textures on a Windows system with an Intel graphics card - How to debug?

Started by
3 comments, last by V-man 11 years, 5 months ago
Hi,

I'm really stumped with an issue here: I'm working on a 2D game that uses SDL and OpenGL. But for some reason, all textures are white on one particular laptop, under Windows. It works fine under Linux on the very same laptop. It also works fine on another Windows system I have access to.

My only hunch is that it might have something to do with the graphics drivers. It's an older Dell laptop with a Intel 915GM/GMS graphics card, and the official drivers from the CD.

I have no idea how to debug this, what can I try?
Advertisement
[font=georgia,serif]I have gotten this issue when using non power of two textures. Is this the case?[/font]

[size="1"]And a Unix user said rm -rf *.* and all was null and void...|There's no place like 127.0.0.1|The Application "Programmer" has unexpectedly quit. An error of type A.M. has occurred.
[size="2"]

Yes, non-power-of-two textures won't work on the Intel 915 under Windows as it's driver only supports OpenGL 1.4 (but with some interesting extensions, such as the ARB assembly shaders). It's worth noting that it's D3D driver (which - with Intel - is generally much superior and with higher functionality) doesn't support them either, so if it's working under Linux the reason why is that the Linux driver is most likely putting you through a software emulation path (which you almost definitely do not want to happen). OS is not relevant here - it's basic hardware capability that is the determining factor.

Options? Since it's a 2D game you may be able to get away with GL_ARB_texture_rectangle if supported and if you can live with it's restrictions. You may be able to pad your textures up to a power of two. Or you may be able to resample them up. Or put them into a power of two texture atlas. But preferably you should consider creating power of two source artwork.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

Thanks, that was indeed the issue! I tried to use GL_ARB_texture_rectangle, but it turns out the graphics card didn't support that either. So I ended up changing my texture sizes to power of two's at runtime.
BTW, if you want to debug, call glGetError().
http://www.opengl.org/wiki/Common_Mistakes#glGetError
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

This topic is closed to new replies.

Advertisement