#
#   Nebula TEKDEMO
#
#   MipMapping
#
#   created:    15-May-99   Bernd Beyreuther
#   upd.:       03-Nov-2000 Bernd Beyreuther
#   
#   (C) 1999 RADON LABS   Beyreuther, Weissflog, Flemming GbR
#   (C) COPYRIGHT 2000 RADONLABS GMBH
# 

sel /usr/scene
new nlightnode amb
    sel amb
    .settype ambient
    .setcolor 1 1 1 1
sel ..

# the cube with mipmapping activated ---------------

new n3dnode obj
    sel obj
    ty  -3
    tx  -35

    # Some animation -------------------------------
    new nipol tz
        sel tz
        .connect tz
        .addkey1f  0  -8
        .addkey1f  5 -100
        .addkey1f 10  -8
    sel ..
    # Rotation -------------------------------------
    new nipol roty
        sel roty
        .connect ry
        .addkey1f 0 0
        .addkey1f 2 360
    sel ..
    new nipol rotx
        sel rotx
        .connect rx
        .addkey1f 0 0
        .addkey1f 3 360
    sel ..

    new nvbufnode vbuf
        sel vbuf
        .setvbuffer meshes/cube1.n3d
    sel ..
    new ntexnode tex
        sel tex
        settexture bmp/256.bmp none
    sel ..
    new nmatnode mat
        sel mat
        .setstate texture_enable true
        .setstate texture_min_filter linear_mipmap_linear
        .setstate texture_address_u wrap
        .setstate texture_address_v wrap
        .setambient 1 1 1 1
    sel ..
sel ..

# Make a copy of the first cube 
# Modify its position and
# switch of Mipmapping

obj.clone obj1
    sel obj1
    tx -70

        sel mat
        .setstate texture_min_filter linear
    sel ..
sel ..

