
separate (adagate.drawroom)

procedure drawLev5 is
begin

	-- draw cube-mapped skybox:
	gluseprogram(pidskyb18); --===================================
	glenable(gl_texture_cube_map_seamless);
	glbindtexture(gl_texture_cube_map, circubemap_texid);
	gluniform1i(cmap18,0);
	gluniformmatrix4fv(imvp18,1,gl_false,mvp(1,1)'address);
	usboxobj.draw(usb5,vertbuff,elembuff);



	-- draw skybox reflections in water:
	gluseprogram(pidskyw19); --====================================
	gluniform1i(envm19,0);
	gluniformmatrix4fv(imvp19,1,gl_false,mvp(1,1)'address);
	gluniform1f(time19, glfloat(currenttime));
	gluniform3f(ieye19, 0.0, 0.0, 0.0 );
	gluniform1f(wlev19, -0.12);
	circsurf.draw(cir, vertbuff); -- using n=200

	solved(5):=true;


end drawLev5;

