mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-06 17:15:35 +00:00
include render order
This commit is contained in:
parent
51a37ec6d2
commit
beedba3354
3 changed files with 7 additions and 5 deletions
|
@ -233,7 +233,7 @@ class Refraction : public SceneUtil::RTTNode
|
|||
{
|
||||
public:
|
||||
Refraction(uint32_t rttSize)
|
||||
: RTTNode(rttSize, rttSize, false)
|
||||
: RTTNode(rttSize, rttSize, 1, false)
|
||||
{
|
||||
mClipCullNode = new ClipCullNode;
|
||||
}
|
||||
|
@ -297,7 +297,7 @@ class Reflection : public SceneUtil::RTTNode
|
|||
{
|
||||
public:
|
||||
Reflection(uint32_t rttSize, bool isInterior)
|
||||
: RTTNode(rttSize, rttSize, false)
|
||||
: RTTNode(rttSize, rttSize, 0, false)
|
||||
{
|
||||
setInterior(isInterior);
|
||||
mClipCullNode = new ClipCullNode;
|
||||
|
|
|
@ -24,9 +24,10 @@ namespace SceneUtil
|
|||
RTTNode* mGroup;
|
||||
};
|
||||
|
||||
RTTNode::RTTNode(uint32_t textureWidth, uint32_t textureHeight, bool doPerViewMapping)
|
||||
RTTNode::RTTNode(uint32_t textureWidth, uint32_t textureHeight, int renderOrderNum, bool doPerViewMapping)
|
||||
: mTextureWidth(textureWidth)
|
||||
, mTextureHeight(textureHeight)
|
||||
, mRenderOrderNum(renderOrderNum)
|
||||
, mDoPerViewMapping(doPerViewMapping)
|
||||
{
|
||||
addCullCallback(new CullCallback(this));
|
||||
|
@ -66,7 +67,7 @@ namespace SceneUtil
|
|||
mViewDependentDataMap[cv].reset(new ViewDependentData);
|
||||
mViewDependentDataMap[cv]->mCamera = camera;
|
||||
|
||||
camera->setRenderOrder(osg::Camera::PRE_RENDER);
|
||||
camera->setRenderOrder(osg::Camera::PRE_RENDER, mRenderOrderNum);
|
||||
camera->setClearMask(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
|
||||
camera->setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);
|
||||
camera->setViewport(0, 0, mTextureWidth, mTextureHeight);
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace SceneUtil
|
|||
class RTTNode : public osg::Node
|
||||
{
|
||||
public:
|
||||
RTTNode(uint32_t textureWidth, uint32_t textureHeight, bool doPerViewMapping);
|
||||
RTTNode(uint32_t textureWidth, uint32_t textureHeight, int renderOrderNum, bool doPerViewMapping);
|
||||
~RTTNode();
|
||||
|
||||
osg::Texture* getColorTexture(osgUtil::CullVisitor* cv);
|
||||
|
@ -61,6 +61,7 @@ namespace SceneUtil
|
|||
ViewDependentDataMap mViewDependentDataMap;
|
||||
uint32_t mTextureWidth;
|
||||
uint32_t mTextureHeight;
|
||||
int mRenderOrderNum;
|
||||
bool mDoPerViewMapping;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue