
separate (adagate.drawisland)

procedure drawSkybox is
begin

	--////////////// draw cube-mapped skybox //////////////////////////
	glUseProgram(pidSkyB31);
	glUniform1i(flev31, foglev);
	glUniform1i(fcol31, fogclr);
	glUniform1i(cmap31, 0);
	glUniformMatrix4fv(imvp31, 1, GL_FALSE, mmvp(1,1)'address);
	glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS); --seems Ok
	glBindTexture(GL_TEXTURE_CUBE_MAP, mcubemap_texid);
	cubemapobj.Draw(skybox, vertbuff,elembuff);


end drawSkybox;

