website logo
Auteur
avatar
sinisrus

Forum » » Création-Développement » » Microbe3D nouvelle version dispo


Posté : 07-01-2015 11:29 icone du post

@Alain

Voici un exemple de code la couleur ne marche pas

/* Created with BuildOther v1.0 */
/* By Sinisrus ? 2014 */

if ~show('l',"Microbe3D.library") then addlib("Microbe3D.library",0,-30,0)

VanillaKey=0



/* U3D_SetValue(Scene,U3D_REXXDEBUG,TRUE) */
Scene =U3D_EasyOpenScene('Rexx Demo',300,300)


??? Color1=U3D_Get(Scene,U3D_REXXMEMORY,0)??????? ???? /* use 16 bytes (=4 floats) at memory position 0 in arexx reserved memory */
??? Light=U3D_Get(Scene,U3D_LIGHT,1)
??? U3D_RexxSetColor(Color1,1.0,1.0,1.0,1.0)?????? ? /* orange */
??? U3D_SetLight(Light,TRUE,Color1)



Object=U3D_Read(Scene,'data/AmiLogo.obj') /* load a 3D object */


U3D_Unitize(Object,2.0) /* fit to screen (ie -1.0 +1.0) */
U3D_Normals(Object,0.0) /* do simple face normals */

U3D_GridWeld(Object,(1.0/300.0),0.001,0.001) /* will remove the double points not visible on screen */


Instance=U3D_AddInstance(Scene,Object,'Instance') /* add to scene */


U3D_SetValue(Scene,U3D_FPSLIMIT,30)

/****************************************************************************** **/

echo 'Esc for quit '
do while(VanillaKey< 1)

U3D_Rotate(Instance,3.0,1.0,4.0,U3D_CHANGE) /* rotate logo */

U3D_DrawScene(Scene) /* draw all */
VanillaKey =U3D_QueryValue(Scene,U3D_VANILLAKEY) /* get keyboard value */
end


U3D_Delete(Scene)

call remlib("Microbe3D.library")
EXIT
--
Coin coin... amitheme.amiga-ng.org
Sam460 1,15Ghz - OS4.1FE - Radeon Saphir HD7750 R7 250E - 2Go de ram

Cet article provient de Le site des utilisateurs francophones actuels et futurs d'AmigaOS 4.x
https://amiga-ng.org/viewtopic.php?topic=2005&forum=14