Jamagic3D SCREEN SAVER EXAMPLE #1!

This open source code is a simple 3D screensaver that grabs and rotate the desktop image.

In order to use this example you must:

If you do any changes to this source code, please send it to me!

//Simple 3D screensaver example Aug 2001
//Grab desktop and make a copy into another temporary surface
Write("Giovanni@Cardona.com ");
Var surWinSurface = CurWindow.GetSurface();
Var surTempSurface = New Surface(surWinSurface.GetPixelWidth(),surWinSurface.GetPixelHeight(),surWinSurface.GetDepth()); 
    surTempSurface.Copy(surWinSurface);

//create world
Var objWorld = New World(CurWindow);

Var texDesktopTexture = New Texture(objWorld,surTempSurface);
Var matDesktopMaterial = New Material(objWorld,texDesktopTexture,GetRGB(255,255,0),"DesktopCapture");

Var objDesktopPlane = objWorld.CreatePlane(surWinSurface.GetPixelWidth(),surWinSurface.GetPixelHeight(),1,1);
    objDesktopPlane.ReplaceMaterial(matDesktopMaterial);

Var objCamera = New Camera(objWorld,CurWindow);
    objCamera.SetFocus(30);
    objCamera.Set(0,0,-(surWinSurface.GetPixelWidth()+surWinSurface.GetPixelHeight()));
    objCamera.MoveAround(objDesktopPlane,,,,,,);

//
While(1);

(c)2001 Giovanni Cardona
Jamagician Extraordinarie