Original Post
I was trying to add some Textures to a sphere created with Mesh.CreateSphere. As far as i know those spheres don't have texture coordinates so i tried to add them using the sample code provided here http://www.gamedev.n...ource-included/. I called the ComputeTexCoords method from the first post with the previously created mesh as argument and then set the texture with SetTexture in the render method (Mike's code in the second post throws for some reason out of bounds exceptions and I don't know why). When launching the program everything seems to be ok but when i rotate the sphere by 90° (no matter in which direction) the texture is highly distorted (like a vortex around the x-axis). The texture I was trying to use is this one: http://celestia.h-sc...nshaded1024.jpg. If it's helpful i'll post a screenshot of the distorted texture on the sphere later (it's on another computer).
Can someone tell me what I'm doing wrong? Is it something with the ComputeTexCoords method or with the Texture? Do I have to change some RenderState/SamplerState settings?
Thank you in advance.
p.s.: I'm using Direct3D9 with SlimDX and Visual Studio 2008 (C#)
Can someone tell me what I'm doing wrong? Is it something with the ComputeTexCoords method or with the Texture? Do I have to change some RenderState/SamplerState settings?
Thank you in advance.
p.s.: I'm using Direct3D9 with SlimDX and Visual Studio 2008 (C#)