TextureAddress.Wrap problem with Textures created via "new Texture()"

TextureAddress.Wrap problem with Textures created via "new Texture()"

Post by Andrew Var » Tue, 28 Feb 2006 23:30:22


I'm having the same problem described here:

http://www.yqcomputer.com/ #2063580

Same story: If I use TextureLoader.FromFile() to create my texture, it
wraps properly. If I use new Texture(), it bombs. Now I'm in a
situation where a Bitmap object is getting passed into the rendering
system, and there's no choice but to use new Texture(). Anyone know why
there's a problem, or what additional properties I can set on the
texture to make this work?

Thanks in advance,

Andrew
 
 
 

TextureAddress.Wrap problem with Textures created via "new Texture()"

Post by Andrew Var » Wed, 01 Mar 2006 07:17:38

Okay I'm an idiot. I was using an 18x18 image, which isn't a valid
texture size, and apparently TextureLoader and the Texture constructor
had different schemes for working around my busted input. What came out
of TextureLoader happened to be something that worked for me (I think it
upsampled to 32x32), while the Texture constructor didn't. But I failed
to realize I was asking DirectX to read my mind. Changed the image to
16x16 and all is well.