   Non-Power of Two Sized Textures
  Hello!I recognize this is a really dumb newbie question. Does either OpenGL or DirectX 3D support non-power of two sized square textures? I''m doing some procedural texture generation and I''d like map, for example, a 113x113 bitmap onto a sphere. I''m actually locked into using DX9, but I seem to remember that one of DX or OpenGL supported this and the other didn''t.I know there are ways around the power of two sized texture limitations, like allocating a texture the next size up (in this case 128x128) and changing your texture coords so that only the first 113 pixels are drawn. I don''t really want to get into that pixel mapping voodoo, since my main concern is saving texture memory.Also, what is the largest texture size supported by most 3d cards? Is 512 safe on all machines? How about 1024? The Geforce4Go on my dev laptop can handle up to 2048x2048. As a developer, I tend to have the attitude that if the end user doesn''t have a desktop that''s at least as powerful as the laptop I use, he''s a loser and I don''t need to support him. This is an example of the lack of interpersonal skills that make me unsuited for a position in customer support.   
  I know DX allows non-power-of-2 textures, and I think OpenGL does as well, but many graphics cards don''t support them.  So you''re better off going with the nearest power of 2--otherwise, you''ll be preventing some who have more powerful systems than you from playing.  Which could include, say, someone who''s looking to hire a game programmer...-Odd the Hermit ;  For OpenGL there is a nice new ARB extensions that adds support for non-power-of-2-textures.   "C lets you shoot yourself in the foot rather easily. C++ allows you to reuse the bullet!"  ;  Do NOT use non-power of 2 textures!  Bottom line!  Current 3d hardware makes the assumption that your textures are powers of 2, and because of this your video card will give you incorrect results if you were to send a non-power of 2 texture directly to the card.  Some API''s will attempt to scale the texture for you if you toss in a non-power of 2 texture but again it''s probable that it will either not work at all or it won''t work the way you expected.  OpenGL''s new extension to allow non-power of 2 textures currently is not supported by any hardware out on the market at least none I know of so it will automagically scale your texture up to the nearest power of 2. ;  Don''t use non-power-of-2 textures. Period.512 is safe on pretty much anything better than a Voodoo3 (the v3 has a max of 256) ;  Don''t use them now, but I believe that hardware support for arbitrary texture sizes is in our future.  Lots of people ask for this becasue they want to set up a screen-sized texture render target. 