This is indeed strange -- When I use your code, it is grey also. But when I change it to what I have posted here, all works well.

I think there's something going on here..


Code:
#include <acknex.h>
#include <default.c>

function draw_red_rect(x1,y1,x2,y2)
{  while(1)
  {   
  	draw_line3d(vector(x1,y1,0),NULL,100); // move to first corner  
  	draw_line3d(vector(x2,y1,0),vector(0,0,255),100); 
  	draw_line3d(vector(x2,y2,0),vector(0,0,255),100);   
  	draw_line3d(vector(x1,y2,0),vector(0,0,255),100);   
  	draw_line3d(vector(x1,y1,0),vector(0,0,255),100);   
  	wait(1);  
  }
}



void main() {
	level_load(NULL);
	vec_set(&sky_color, COLOR_WHITE);
	draw_red_rect(10,10,100,100);
	while (1) {
		draw_point3d(vector(32, 0,  5), vector(0, 255, 255), 100, 2);
		wait(1);
	}
}