
separate (adagate.drawisland)


procedure drawDHD is
begin

------dhd begin -------------------------------------------------------

	glUseProgram(pidgate33);
	glUniformMatrix4fv(imvp33, 1, GL_FALSE, imvp(1,1)'address);
	glUniform1i(samp33,0);
	glUniform1i(dark33, darkness);


	if not solved(1) then
		glBindTexture(GL_TEXTURE_2D, adobe2_texid);
		pictobj.Draw(dhdp1, vertbuff,uvbuff,elembuff);
	end if;

	if not solved(2) then
		glBindTexture(GL_TEXTURE_2D, wood_texid);
		pictobj.Draw(dhdp2, vertbuff,uvbuff,elembuff);
	end if;

	if not solved(3) then
		glBindTexture(GL_TEXTURE_2D, brick_texid);
		pictobj.Draw(dhdp3, vertbuff,uvbuff,elembuff);
	end if;

	if not solved(4) then
		glBindTexture(GL_TEXTURE_2D, granite_texid);
		pictobj.Draw(dhdp4, vertbuff,uvbuff,elembuff);
	end if;



	if (dhdstate=0) or (dhdstate=5) then
		if mseated then
			glBindTexture(GL_TEXTURE_2D, dhdo_texid);
		else
			glBindTexture(GL_TEXTURE_2D, dhd0_texid);
		end if;
	elsif dhdstate=1 then
		glBindTexture(GL_TEXTURE_2D, dhd1_texid);
	elsif dhdstate=2 then
		glBindTexture(GL_TEXTURE_2D, dhd2_texid);
	elsif dhdstate=3 then
		glBindTexture(GL_TEXTURE_2D, dhd3_texid);
	elsif dhdstate=4 then
		glBindTexture(GL_TEXTURE_2D, dhd4_texid);
	end if;
	if (dhdstate<5) then
		pictobj.Draw(dhdface, vertbuff,uvbuff,elembuff);
	end if;

------dhd end ---------------------------------------------------------


end drawDHD;


