We wanted to create a place for you to integrate the people of the Citizen Engineer forum, and
Coding4Fun. As such, we'll be creating dedicated threads to give everyone a place to communicate. This thread is for discussions around the
Ask The ZMan column on working with DirectX.
Read all the Ask the ZMan columns so far.
We wanted to create a place for you to integrate the people of the Citizen Engineer forum, and Coding4Fun. As such, we'll be creating dedicated threads to give everyone a place to communicate. This thread is for discussions around the Ask The ZMan column on working with DirectX.
Hi, Zman. Is it possible to provide the code w/ VS 2003? The Texture0 seems to want VS 2005. Are you using any .NET 2.0 feature?
These samples are designed to work with Visual Studio 2005. You can download the Express versions of Visual Studio 2005 Beta 2 from http://msdn.microsoft.com/express in order to run these samples. If you want to import the source code files into Visual Studio .NET 2003 it may be possible to run them without making any enhancements, but they are not tested on Visual Studio .NET 2003. If you happen to get them to work, please let us know at this forum since other users may find it useful.
I have not run these files through 2003 myself but I'm pretty certain I'm not using any 2.0 functionality *yet* so you should be OK. However I can't promise that will continue to be true in future articles.
I also noticed that in your posted articles, the sample uses a different game loop than one that came w/ the April SDK. Looks like they went back to good 'ol DoEvents in the latest SDK. I don't know if that's an older SDK you're using or VS2005 beta that's giving you the older game loop. Personally, I really like the latest game loop, but it does require you to work off of a static event, Application.OnApplicationIdle, so there's a little fudging involved.
I'm a little confused, I don't implement a render loop at all in my code. I allow the dxmut framework to just call the OnFrameMove and OnFrameRender routines and put my code in there.
The actual render loop is inside the dxmut code and that is the April SDK dxmut files as far as I know. All the samples are based on the MDX 'empty project' sample. Is there some other render loop that I've missed?
Drop me an email offline so we can work this out.
I seem to be a bit late to the party. I am working through your tutorials on texturing meshes in MDX. I am too the point of wrapping a sphere. I am stuck on the anomolous section in the pacific ocean and how you are going to fix it. Have you done an update on that project?
"Homework for this time: Explain the odd texturing you see in the middle of the Pacific Ocean."
The odd texturing is cause by the Vertices along the "international dateline" only having one set of Tu, Tv values when they really need two, one for each edge of the map. It appears that this section is getting the entire texture which would make sense. In fact, I bet if it were large enough, you could tell that it is a mirror image of the texture.
You are not late, just the only one who does his homework....
Yes you are spot on. The Mesh.Sphere function creates a mesh that is continuous all the way round so there is no place you can set tu=0 and tu=1 it has to be shared somewhere. Your observation that the entire texture is there is also correct (well almost all of it), its also reversed. The last tu I can get depends on how many segments are in the sphere but its usually 0.9xxx meaning the last segment interoplates from 0.9xx all the way back to 0.0 within one segment. the bit of the texture from 0.9xx to 1.0 is lost forever.
The solution won't be covered until after Christmas since I'm doing the screen saver for the next few weeks and thats more about scene graphs than mesh innards.
But you have to create your own sphere object - see tutorial5 in the sdk - it creates an open ended cylinder from scratch.
And thanks for the email reminder about this thread. I tried to reply but your my replies are bouncing back to me.
Thanks for the effort. I appreciate it. Not suprised at the email bounce, the system has been goofy all month.
Interestingly enough I came across a much cleaner solution to this today. Read more on the blog http://www.indiegameguy.com/blogs/zman/archive/2005/12/07/167.aspx
Thanks for the articles Zman.
I've printed them all out so I can read them in bed tonight.