www.xbdev.net
xbdev - software development
Thursday March 28, 2024
home | contact | Support | XBOX Programming.. More than just a toy...
>>
     
 

XBOX Programming..

More than just a toy...

 
Prt6 - Generating a Sphere in DirectX - Tutorial

How DirectX3D actually works... (Its autopsy.... )

 

Actually, it's more of a 'dissection' instead of an autopsy, as it technically isn't dead ;). Anyhow, DirectX is amazing! It lets you create (and visualize) truly mouth watering effects :)  But how are these effects generated?  Its all done by your graphics card and Pentium chip....yup...your code is just 1's and 0's going a million..billion time's a second underneath it all.

 

Now when you use DirectX3D, it has a set of API's (Application Specific Interface's)...which are just functions....so instead of writing a function to draw a line or a 3D box, you can draw it using the already made DirectX3D API.... now this has 3 main advantages:

 

  • Works across platforms...as your using the DirectX3D function's....if you write code for the XBOX using the XDK it has almost identical function naming, then if you want to convert your game/app/code over to the PC, you can use DirectX3D on the pc - re-compile your code with a few changes and there you have it.
  • Speed - well the functions in DirectX are optimised, so effectively this should improve your codes performance.
  • Bugs! - Where on DirectX 9 now, each version adds improvements and backward compatibility

Anyhow....for the xbox, lets say you don't want to use the DirectX libraries, you could write your own routines....take a while....but you can do it over time...which is what the openxdk team are working on......as first, when you run your xbox, its like dos, you can access the graphics card at memory location 0xf0040000, so if you change the values at that memory location you are writing to the screen!....its called Direct Memory Access...fastest way to access your screen/graphics card...bypassing everything.... so this allows you to draw pixels as fast as possible to the screen....then comes the next part...drawing lines etc...you'll have to use y=mx + c....you do a small algorithm that calculates which pixels go where on the screen to generate a straight line between 2 points....but then you work out that there's more efficient algorithms.. ...then onto 3D...you have to use Matrix's if you want to get anywhere...then you have to create matrix class's....

 

All in all, DirectX3D is your friend....its flexible and allows you to do amazing things in a short time.... also people can look at your code and understand what you've done :)

 

 


 

 

 
Advert (Support Website)

 
 Visitor:
Copyright (c) 2002-2024 xbdev.net - All rights reserved.
Designated articles, tutorials and software are the property of their respective owners.