mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Merge branch 'master' into occlusionquery
Conflicts: apps/openmw/CMakeLists.txt apps/openmw/mwrender/renderingmanager.hpp
This commit is contained in:
commit
30d27fa83f
@ -72,7 +72,7 @@ class RenderingManager: private RenderingInterface {
|
|||||||
|
|
||||||
void toggleLight();
|
void toggleLight();
|
||||||
bool toggleRenderMode(int mode);
|
bool toggleRenderMode(int mode);
|
||||||
|
|
||||||
OEngine::Render::Fader* getFader();
|
OEngine::Render::Fader* getFader();
|
||||||
|
|
||||||
void removeCell (MWWorld::Ptr::CellStore *store);
|
void removeCell (MWWorld::Ptr::CellStore *store);
|
||||||
@ -83,7 +83,7 @@ class RenderingManager: private RenderingInterface {
|
|||||||
void waterAdded(MWWorld::Ptr::CellStore *store);
|
void waterAdded(MWWorld::Ptr::CellStore *store);
|
||||||
|
|
||||||
void removeWater();
|
void removeWater();
|
||||||
|
|
||||||
void preCellChange (MWWorld::Ptr::CellStore* store);
|
void preCellChange (MWWorld::Ptr::CellStore* store);
|
||||||
///< this event is fired immediately before changing cell
|
///< this event is fired immediately before changing cell
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ class RenderingManager: private RenderingInterface {
|
|||||||
void moveObjectToCell (const MWWorld::Ptr& ptr, const Ogre::Vector3& position, MWWorld::Ptr::CellStore *store);
|
void moveObjectToCell (const MWWorld::Ptr& ptr, const Ogre::Vector3& position, MWWorld::Ptr::CellStore *store);
|
||||||
|
|
||||||
void update (float duration);
|
void update (float duration);
|
||||||
|
|
||||||
void setAmbientColour(const Ogre::ColourValue& colour);
|
void setAmbientColour(const Ogre::ColourValue& colour);
|
||||||
void setSunColour(const Ogre::ColourValue& colour);
|
void setSunColour(const Ogre::ColourValue& colour);
|
||||||
void setSunDirection(const Ogre::Vector3& direction);
|
void setSunDirection(const Ogre::Vector3& direction);
|
||||||
@ -124,13 +124,13 @@ class RenderingManager: private RenderingInterface {
|
|||||||
|
|
||||||
void requestMap (MWWorld::Ptr::CellStore* cell);
|
void requestMap (MWWorld::Ptr::CellStore* cell);
|
||||||
///< request the local map for a cell
|
///< request the local map for a cell
|
||||||
|
|
||||||
/// configure fog according to cell
|
/// configure fog according to cell
|
||||||
void configureFog(ESMS::CellStore<MWWorld::RefData> &mCell);
|
void configureFog(ESMS::CellStore<MWWorld::RefData> &mCell);
|
||||||
|
|
||||||
/// configure fog manually
|
/// configure fog manually
|
||||||
void configureFog(const float density, const Ogre::ColourValue& colour);
|
void configureFog(const float density, const Ogre::ColourValue& colour);
|
||||||
|
|
||||||
void playAnimationGroup (const MWWorld::Ptr& ptr, const std::string& groupName, int mode,
|
void playAnimationGroup (const MWWorld::Ptr& ptr, const std::string& groupName, int mode,
|
||||||
int number = 1);
|
int number = 1);
|
||||||
///< Run animation for a MW-reference. Calls to this function for references that are currently not
|
///< Run animation for a MW-reference. Calls to this function for references that are currently not
|
||||||
|
@ -14,7 +14,7 @@ namespace MWRender
|
|||||||
{
|
{
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
TerrainManager::TerrainManager(Ogre::SceneManager* mgr, const MWWorld::Environment& evn) :
|
TerrainManager::TerrainManager(Ogre::SceneManager* mgr, const MWWorld::Environment& evn) :
|
||||||
mEnvironment(evn), mTerrainGroup(TerrainGroup(mgr, Terrain::ALIGN_X_Z, mLandSize, mWorldSize))
|
mEnvironment(evn), mTerrainGroup(TerrainGroup(mgr, Terrain::ALIGN_X_Z, mLandSize, mWorldSize))
|
||||||
{
|
{
|
||||||
@ -42,7 +42,7 @@ namespace MWRender
|
|||||||
//due to the sudden flick between composite and non composite textures,
|
//due to the sudden flick between composite and non composite textures,
|
||||||
//this seemed the distance where it wasn't too noticeable
|
//this seemed the distance where it wasn't too noticeable
|
||||||
mTerrainGlobals.setCompositeMapDistance(mWorldSize*2);
|
mTerrainGlobals.setCompositeMapDistance(mWorldSize*2);
|
||||||
|
|
||||||
mActiveProfile->setLightmapEnabled(false);
|
mActiveProfile->setLightmapEnabled(false);
|
||||||
mActiveProfile->setLayerSpecularMappingEnabled(false);
|
mActiveProfile->setLayerSpecularMappingEnabled(false);
|
||||||
mActiveProfile->setLayerNormalMappingEnabled(false);
|
mActiveProfile->setLayerNormalMappingEnabled(false);
|
||||||
@ -73,16 +73,16 @@ namespace MWRender
|
|||||||
TerrainManager::~TerrainManager()
|
TerrainManager::~TerrainManager()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
void TerrainManager::setDiffuse(const ColourValue& diffuse)
|
void TerrainManager::setDiffuse(const ColourValue& diffuse)
|
||||||
{
|
{
|
||||||
mTerrainGlobals.setCompositeMapDiffuse(diffuse);
|
mTerrainGlobals.setCompositeMapDiffuse(diffuse);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
void TerrainManager::setAmbient(const ColourValue& ambient)
|
void TerrainManager::setAmbient(const ColourValue& ambient)
|
||||||
{
|
{
|
||||||
mTerrainGlobals.setCompositeMapAmbient(ambient);
|
mTerrainGlobals.setCompositeMapAmbient(ambient);
|
||||||
@ -160,7 +160,7 @@ namespace MWRender
|
|||||||
numTextures,
|
numTextures,
|
||||||
indexes);
|
indexes);
|
||||||
|
|
||||||
if ( land->landData->usingColours )
|
if ( land && land->landData->usingColours )
|
||||||
{
|
{
|
||||||
// disable or enable global colour map (depends on available vertex colours)
|
// disable or enable global colour map (depends on available vertex colours)
|
||||||
mActiveProfile->setGlobalColourMapEnabled(true);
|
mActiveProfile->setGlobalColourMapEnabled(true);
|
||||||
@ -253,7 +253,7 @@ namespace MWRender
|
|||||||
|
|
||||||
assert( (int)mEnvironment.mWorld->getStore().landTexts.getSize() >= (int)ltexIndex - 1 &&
|
assert( (int)mEnvironment.mWorld->getStore().landTexts.getSize() >= (int)ltexIndex - 1 &&
|
||||||
"LAND.VTEX must be within the bounds of the LTEX array");
|
"LAND.VTEX must be within the bounds of the LTEX array");
|
||||||
|
|
||||||
std::string texture;
|
std::string texture;
|
||||||
if ( ltexIndex == 0 )
|
if ( ltexIndex == 0 )
|
||||||
{
|
{
|
||||||
@ -359,7 +359,7 @@ namespace MWRender
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//this provides a transition shading but also
|
//this provides a transition shading but also
|
||||||
//rounds off the corners slightly
|
//rounds off the corners slightly
|
||||||
pBlend[index] = std::min(1.0f, pBlend[index] + 0.5f);
|
pBlend[index] = std::min(1.0f, pBlend[index] + 0.5f);
|
||||||
}
|
}
|
||||||
@ -458,10 +458,10 @@ namespace MWRender
|
|||||||
TEX_TYPE_2D, size, size, 0, PF_BYTE_BGR);
|
TEX_TYPE_2D, size, size, 0, PF_BYTE_BGR);
|
||||||
|
|
||||||
HardwarePixelBufferSharedPtr pixelBuffer = tex->getBuffer();
|
HardwarePixelBufferSharedPtr pixelBuffer = tex->getBuffer();
|
||||||
|
|
||||||
pixelBuffer->lock(HardwareBuffer::HBL_DISCARD);
|
pixelBuffer->lock(HardwareBuffer::HBL_DISCARD);
|
||||||
const PixelBox& pixelBox = pixelBuffer->getCurrentLock();
|
const PixelBox& pixelBox = pixelBuffer->getCurrentLock();
|
||||||
|
|
||||||
uint8* pDest = static_cast<uint8*>(pixelBox.data);
|
uint8* pDest = static_cast<uint8*>(pixelBox.data);
|
||||||
|
|
||||||
if ( land != NULL )
|
if ( land != NULL )
|
||||||
@ -501,7 +501,7 @@ namespace MWRender
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pixelBuffer->unlock();
|
pixelBuffer->unlock();
|
||||||
|
|
||||||
return tex;
|
return tex;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user