Skip to main content
gamedev.net
🔒 Locked

Texturing a sphere

Started by Johnn Feb 19, 2005 at 6:37 PM 0 replies 700+ views
Original Post
Johnn
Johnn
I've created a sphere like this: D3DXCreateSphere( m_device, 60, 30, 30, &m_sphere, NULL ); and I want to use a texture on it. I thought to just do that: m_device->SetTexture( 0, m_skin1 ); m_sphere->DrawSubset( 0 ); m_device->SetTexture( 0, 0 ); m_skin1 being a valid loaded texture. All I see are uni-colored spheres. If I move close enough to them and move a bit, I see my glitches of textures, which is weird... Any ideas how to fix this? Thanks! -edit- And how could I change the transparency of it?
circlesoft
circlesoft
You definetly have the right idea. However, D3DXCreateSphere() does not generate texture coordinates, so you need to do it instead. This page does the exact thing that you are trying to do [smile].

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.