Jump to content

  • Log In with Google      Sign In   
  • Create Account

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


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 futlib   Members   -  Reputation: 197

Like
1Likes
Like

Posted 01 November 2012 - 08:21 AM

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?

Sponsor:

#2 Geometrian   Crossbones+   -  Reputation: 1601

Like
0Likes
Like

Posted 01 November 2012 - 01:00 PM

I have gotten this issue when using non power of two textures. Is this the case?
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.

#3 mhagain   Crossbones+   -  Reputation: 8280

Like
0Likes
Like

Posted 01 November 2012 - 07:21 PM

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.

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#4 futlib   Members   -  Reputation: 197

Like
0Likes
Like

Posted 02 November 2012 - 03:48 AM

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.

#5 V-man   Members   -  Reputation: 805

Like
0Likes
Like

Posted 02 November 2012 - 05:24 AM

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);




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS