
separate (adagate.drawisland)

procedure drawRocks is
begin

--/////// now use rock vertex shader : ////////////////////////
	glUseProgram(pidrock36);
	glUniform3f(ieye36, glfloat(xeye),glfloat(yeye), glfloat(zeye) );


	glUniform1i(flev36, foglev); --14dec17
	glUniform1i(fcol36, fogclr); --14dec17
	glUniform1i(samp36, 0);
	glUniform1i(dark36, darkness);

	glUniformMatrix4fv(imvp36, 1, GL_FALSE, imvp(1,1)'address);

	glBindTexture(GL_TEXTURE_2D, coco_texid); -- coconuts
	glUniform3f(irad36, glfloat(r1rx),glfloat(r1ry),glfloat(r1rz) );

	glUniform3f(icen36, glfloat(r1cx),glfloat(r1cy),glfloat(r1cz) );
	myrockobj.Draw(rococo,vertbuff,uvbuff,elembuff);

	glUniform3f(icen36, glfloat(ccx(1)),glfloat(ccy(1)),glfloat(ccz(1)) );
	myrockobj.Draw(rococo,vertbuff,uvbuff,elembuff);

	glUniform3f(icen36, glfloat(ccx(2)),glfloat(ccy(2)),glfloat(ccz(2)) );
	myrockobj.Draw(rococo,vertbuff,uvbuff,elembuff);

	glUniform3f(icen36, glfloat(ccx(3)),glfloat(ccy(3)),glfloat(ccz(3)) );
	myrockobj.Draw(rococo,vertbuff,uvbuff,elembuff);

	glUniform3f(icen36, glfloat(ccx(4)),glfloat(ccy(4)),glfloat(ccz(4)) );
	myrockobj.Draw(rococo,vertbuff,uvbuff,elembuff);

	glUniform3f(icen36, glfloat(ccx(5)),glfloat(ccy(5)),glfloat(ccz(5)) );
	myrockobj.Draw(rococo,vertbuff,uvbuff,elembuff);



	-- 2 granite rocks:
	glBindTexture(GL_TEXTURE_2D, rock_texid);

	glUniform3f(icen36, glfloat(r2cx),glfloat(r2cy),glfloat(r2cz) );
	glUniform3f(irad36, glfloat(r2rx),glfloat(r2ry),glfloat(r2rz) );
	myrockobj.Draw(rococo,vertbuff,uvbuff,elembuff);


	glUniform3f(icen36, glfloat(r3cx),glfloat(r3cy),glfloat(r3cz) );
	glUniform3f(irad36, glfloat(r3rx),glfloat(r3ry),glfloat(r3rz) );
	myrockobj.Draw(rococo,vertbuff,uvbuff,elembuff);


end drawRocks;


