void LLSurface::initTextures()
{
	///////////////////////
	//
	// Main surface texture
	//
	createSTexture();

	///////////////////////
	//
	// Water texture
	//
	if (gSavedSettings.getBOOL("RenderWater") )
	{
		createWaterTexture();
		mWaterObjp = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, mRegionp);
		gPipeline.createObject(mWaterObjp);
		LLVector3d water_pos_global = from_region_handle(mRegionp->getHandle());
// <FS:CR> Aurora Sim
		//water_pos_global += LLVector3d(128.0, 128.0, DEFAULT_WATER_HEIGHT);		// region doesn't have a valid water height yet
		water_pos_global += LLVector3d(mRegionp->getWidth()/2, mRegionp->getWidth()/2, DEFAULT_WATER_HEIGHT);
		mWaterObjp->setPositionGlobal(water_pos_global);
// </FS:CR> Aurora Sim
	}
}
Beispiel #2
0
//static added one block for openregion ----- voodoo
void LLSurface::rebuildWater()
{
	//lldebugs << "Rebuilding Water...";
	//BOOL renderwater = gSavedSettings.getBOOL("RenderWater") && LLWorld::getInstance()->getAllowRenderWater();
	if(!mWaterObjp.isNull())

	//if(prev_renderwater && !renderwater)
	{
		//lldebugs << "Removing Water";
		//Remove the old
		gObjectList.killObject(mWaterObjp);
	}

	if (gSavedSettings.getBOOL("RenderWater") && gHippoLimits->mRenderWater)
	//if (!prev_renderwater && renderwater)
	{
		//lldebugs << "Building Water";
		createWaterTexture();
		mWaterObjp = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, mRegionp);
		gPipeline.createObject(mWaterObjp);
		LLVector3d water_pos_global = from_region_handle(mRegionp->getHandle());
		water_pos_global += LLVector3d(128.0, 128.0, DEFAULT_WATER_HEIGHT);
		//water_pos_global += LLVector3d(mRegionp->getWidth()/2, mRegionp->getWidth()/2, DEFAULT_WATER_HEIGHT);
		mWaterObjp->setPositionGlobal(water_pos_global);
	}
	//lldebugs << "Rebuilding Water Complete";
}
LLViewerTexture* LLSurface::getWaterTexture()
{
	if (mWaterTexturep.notNull() && !mWaterTexturep->hasGLTexture())
	{
		createWaterTexture();
	}
	return mWaterTexturep;
}
Beispiel #4
0
//-------------------------------------------------------------------------------------
void CubeWorld::createScene(void)
{
	createTexture("TerrainImage", "minecraft/terrain.png");
	createWaterTexture("WaterTest");
	createWorldChunks();

	createSkyTexture("SkyDome1");
	mSceneMgr->setSkyDome(true, "SkyDome1", 2, 8, 100);

	// Temporary deactivated
	// mSceneMgr->setFog(Ogre::FOG_LINEAR, Ogre::ColourValue(0.8, 0.8, 1), 0.05, 0.0, 200);
	// mCamera->setFarClipDistance(256);
	// mCamera->setNearClipDistance(0.01);

	mSceneMgr->setAmbientLight(Ogre::ColourValue(0.02, 0.02, 0.02));

}
Beispiel #5
0
void LLSurface::rebuildWater()
{
	BOOL renderwater = gSavedSettings.getBOOL("RenderWater") && LLWorld::getInstance()->getAllowRenderWater();
	BOOL prev_renderwater = !mWaterObjp.isNull();

	if(prev_renderwater && !renderwater)
	{
		gObjectList.killObject(mWaterObjp);
	}

	if (!prev_renderwater && renderwater)
	{
		createWaterTexture();
		mWaterObjp = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, mRegionp);
		gPipeline.createObject(mWaterObjp);
		LLVector3d water_pos_global = from_region_handle(mRegionp->getHandle());
		water_pos_global += LLVector3d(mRegionp->getWidth()/2, mRegionp->getWidth()/2, DEFAULT_WATER_HEIGHT);
		mWaterObjp->setPositionGlobal(water_pos_global);
	}
}
Beispiel #6
0
void LLSurface::initTextures()
{
	///////////////////////
	//
	// Main surface texture
	//
	createSTexture();

	///////////////////////
	//
	// Water texture
	//
	if (gSavedSettings.getBOOL("RenderWater") && LLWorld::getInstance()->getAllowRenderWater())
	{
		createWaterTexture();
		mWaterObjp = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, mRegionp);
		gPipeline.createObject(mWaterObjp);
		LLVector3d water_pos_global = from_region_handle(mRegionp->getHandle());
		water_pos_global += LLVector3d(mRegionp->getWidth()/2, mRegionp->getWidth()/2, DEFAULT_WATER_HEIGHT);
		mWaterObjp->setPositionGlobal(water_pos_global);
	}
}