|
|
The DevilsGFX SDK is a package to create 3D realtime animations.
It provides an easy to understand C++ API based on DirectX 8. You only need a basic knowledge of C++ and object oriented
design to create awward winning 3D animation. You don't need to know the DirectX or OpenGL API at all.
Here follows an example of code to create a spinning 3D cube:
CScreen& screen = CScreen::Instance();
//basic light [not in scene object for now, but in the future it will be in it...]
CLight l;
l.Init();
l.Enable(true);
screen.SetAmbientLight(true);
//Camera position
screen.SetCamera(0,0,-4,0,0,1);
//a box
CBoxObject box;
float i = 0;
while(screen.IsRunning())
{
box.SetRotation(i,i,i);
screen.BeginScene();
box.Render();
screen.EndScene();
i+=0.01f;
}
box.CleanUp();
l.CleanUp();
As you can see it is really easy to create this spinning cube. Coding directly the DirectX API you will have to type many more complicated code for the same result.
|