#include <litec.h>
#include <acknex.h>
#include <default.c>
void v_camera()
{
set(my,INVISIBLE);
set(my,PASSABLE);
while(1)
{
c_move(my,vector(key_force.y*50*time_step,-key_force.x*50*time_step,0),nullvector,IGNORE_PASSABLE);
my.pan -= mickey.x;
my.tilt -= mickey.y;
vec_set(camera.x,my.x);
vec_set(camera.pan,my.pan);
wait(1);
}
}
var mtl_dontRender_event()
{
return(1);
}
MATERIAL* mtl_dontRender =
{
flags = ENABLE_TREE;
event = mtl_dontRender_event;
}
void main()
{
level_load("");
wait(3);
you = ent_create(NULL,vector(0,310,746), v_camera);
you.tilt = -90;
you = ent_create(CUBE_MDL, vector(0,0,0), NULL);
you = ent_create(CUBE_MDL, vector(0,100,0), NULL);
you = ent_create(CUBE_MDL, vector(0,200,0), NULL);
//this entity will not be rendered, works nicely
you = ent_create(CUBE_MDL, vector(0,300,0), NULL);
you.material = mtl_dontRender;
you = ent_create(CUBE_MDL, vector(0,400,0), NULL);
you = ent_create(CUBE_MDL, vector(0,500,0), NULL);
you = ent_create(CUBE_MDL, vector(0,600,0), NULL);
//create a second view which uses the dontRender material
//this doesn't work
VIEW* secondView;
secondView = view_create(2);
set(secondView,SHOW);
set(secondView,NOCULL);
secondView.size_x = screen_size.x/2;
secondView.size_y = screen_size.y/2;
secondView.material = mtl_dontRender;
secondView.x = 0;
secondView.y = 300;
secondView.z = 760;
secondView.tilt = -90;
}