Skip to content

Commit

Permalink
fixed: removed old draw action references
Browse files Browse the repository at this point in the history
     : ansi log header enum from 1.x
     : missing getUniform in compat mode
     : max depth mdw parameter
     : get array index from iterator

git-svn-id: https://external.lite3d.com/opensg/svn_repo/trunk@2275 4683daeb-ad0f-0410-a623-93161e962ae5
  • Loading branch information
vossg committed Jan 25, 2010
1 parent 3f9f72d commit 3eb7b88
Show file tree
Hide file tree
Showing 19 changed files with 180 additions and 28 deletions.
8 changes: 4 additions & 4 deletions Examples/Advanced/DeferredShading/deferredshading.cpp
Expand Up @@ -461,10 +461,10 @@ void subLight(UInt32 lightIdx)
OSG_ASSERT(lightIdx < gv->dsStage->getMFLights ()->size());
OSG_ASSERT(lightIdx < gv->dsStage->getMFLightPrograms()->size());

gv->dsStage->editMFLights ()->erase(
gv->dsStage->editMFLights ()->begin() + lightIdx);
gv->dsStage->editMFLightPrograms()->erase(
gv->dsStage->editMFLightPrograms()->begin() + lightIdx);
gv->dsStage->editMFLights ()->erase(lightIdx);
// gv->dsStage->editMFLights ()->begin() + lightIdx);
gv->dsStage->editMFLightPrograms()->erase(lightIdx);
// gv->dsStage->editMFLightPrograms()->begin() + lightIdx);

LightInfo &li = gv->lightInfos[lightIdx];
gv->rootN->subChild(li.beaconN);
Expand Down
17 changes: 14 additions & 3 deletions Source/Base/Base/OSGLog.cpp
Expand Up @@ -846,17 +846,28 @@ std::ostream &Log::doHeader( LogLevel level,
if(_headerElem & LOG_TYPE_HEADER)
{
#ifdef WIN32
if(!color || !colorHeader(level, sep))
if(_headerElem & LOG_ANSICOLOR_HEADER)
{
if(color)
sout << color;

sout << _levelName[level] << sep;

if(color)
sout << resetColor;
}
else
{
if(!color || !colorHeader(level, sep))
sout << _levelName[level] << sep;
}
#else
if (color)
if(color)
sout << color;

sout << _levelName[level] << sep;

if (color)
if(color)
sout << resetColor;
#endif
}
Expand Down
1 change: 1 addition & 0 deletions Source/Base/Base/OSGLog.h
Expand Up @@ -108,6 +108,7 @@ enum LogHeaderElem
LOG_END_NEWLINE_HEADER = 128,
LOG_ASPECT_HEADER = 256,

LOG_ANSICOLOR_HEADER = 4096,
LOG_COLOR_HEADER = 8192,
LOG_TAB_HEADER = 16384,

Expand Down
Expand Up @@ -60,4 +60,15 @@ Cluster rendering configuration for multible displays
>
Vertical overlap
</Field>
<Field
name="maxDepth"
type="Int32"
cardinality="single"
visibility="external"
defaultValue="999"
access="public"
>
Maximum depth in scene to create load groups for load balancing. Bigger
values are more precise but slower.
</Field>
</FieldContainer>
Expand Up @@ -102,6 +102,11 @@ OSG_BEGIN_NAMESPACE
Vertical overlap
*/

/*! \var Int32 MultiDisplayWindowBase::_sfMaxDepth
Maximum depth in scene to create load groups for load balancing. Bigger
values are more precise but slower.
*/


/***************************************************************************\
* FieldType/FieldTrait Instantiation *
Expand Down Expand Up @@ -181,6 +186,19 @@ void MultiDisplayWindowBase::classDescInserter(TypeObject &oType)
static_cast<FieldGetMethodSig >(&MultiDisplayWindow::getHandleYOverlap));

oType.addInitialDesc(pDesc);

pDesc = new SFInt32::Description(
SFInt32::getClassType(),
"maxDepth",
"Maximum depth in scene to create load groups for load balancing. Bigger\n"
"values are more precise but slower. \n",
MaxDepthFieldId, MaxDepthFieldMask,
false,
(Field::SFDefaultFlags | Field::FStdAccess),
static_cast<FieldEditMethodSig>(&MultiDisplayWindow::editHandleMaxDepth),
static_cast<FieldGetMethodSig >(&MultiDisplayWindow::getHandleMaxDepth));

oType.addInitialDesc(pDesc);
}


Expand Down Expand Up @@ -257,6 +275,17 @@ MultiDisplayWindowBase::TypeObject MultiDisplayWindowBase::_type(
"\t>\n"
"\tVertical overlap\n"
"\t</Field>\n"
" <Field\n"
"\t name=\"maxDepth\"\n"
"\t type=\"Int32\"\n"
" cardinality=\"single\"\n"
"\t visibility=\"external\"\n"
"\t defaultValue=\"999\"\n"
" access=\"public\"\n"
"\t >\n"
" Maximum depth in scene to create load groups for load balancing. Bigger\n"
"\t values are more precise but slower. \n"
" </Field>\n"
"</FieldContainer>\n",
"Cluster rendering configuration for multible displays\n"
);
Expand Down Expand Up @@ -346,6 +375,19 @@ const SFInt32 *MultiDisplayWindowBase::getSFYOverlap(void) const
}


SFInt32 *MultiDisplayWindowBase::editSFMaxDepth(void)
{
editSField(MaxDepthFieldMask);

return &_sfMaxDepth;
}

const SFInt32 *MultiDisplayWindowBase::getSFMaxDepth(void) const
{
return &_sfMaxDepth;
}





Expand Down Expand Up @@ -376,6 +418,10 @@ UInt32 MultiDisplayWindowBase::getBinSize(ConstFieldMaskArg whichField)
{
returnValue += _sfYOverlap.getBinSize();
}
if(FieldBits::NoField != (MaxDepthFieldMask & whichField))
{
returnValue += _sfMaxDepth.getBinSize();
}

return returnValue;
}
Expand Down Expand Up @@ -405,6 +451,10 @@ void MultiDisplayWindowBase::copyToBin(BinaryDataHandler &pMem,
{
_sfYOverlap.copyToBin(pMem);
}
if(FieldBits::NoField != (MaxDepthFieldMask & whichField))
{
_sfMaxDepth.copyToBin(pMem);
}
}

void MultiDisplayWindowBase::copyFromBin(BinaryDataHandler &pMem,
Expand Down Expand Up @@ -432,6 +482,10 @@ void MultiDisplayWindowBase::copyFromBin(BinaryDataHandler &pMem,
{
_sfYOverlap.copyFromBin(pMem);
}
if(FieldBits::NoField != (MaxDepthFieldMask & whichField))
{
_sfMaxDepth.copyFromBin(pMem);
}
}

//! create a new instance of the class
Expand Down Expand Up @@ -561,7 +615,8 @@ MultiDisplayWindowBase::MultiDisplayWindowBase(void) :
_sfVServers (),
_sfManageClientViewports (bool(true)),
_sfXOverlap (Int32(0)),
_sfYOverlap (Int32(0))
_sfYOverlap (Int32(0)),
_sfMaxDepth (Int32(999))
{
}

Expand All @@ -571,7 +626,8 @@ MultiDisplayWindowBase::MultiDisplayWindowBase(const MultiDisplayWindowBase &sou
_sfVServers (source._sfVServers ),
_sfManageClientViewports (source._sfManageClientViewports ),
_sfXOverlap (source._sfXOverlap ),
_sfYOverlap (source._sfYOverlap )
_sfYOverlap (source._sfYOverlap ),
_sfMaxDepth (source._sfMaxDepth )
{
}

Expand Down Expand Up @@ -708,6 +764,31 @@ EditFieldHandlePtr MultiDisplayWindowBase::editHandleYOverlap (void)
return returnValue;
}

GetFieldHandlePtr MultiDisplayWindowBase::getHandleMaxDepth (void) const
{
SFInt32::GetHandlePtr returnValue(
new SFInt32::GetHandle(
&_sfMaxDepth,
this->getType().getFieldDesc(MaxDepthFieldId),
const_cast<MultiDisplayWindowBase *>(this)));

return returnValue;
}

EditFieldHandlePtr MultiDisplayWindowBase::editHandleMaxDepth (void)
{
SFInt32::EditHandlePtr returnValue(
new SFInt32::EditHandle(
&_sfMaxDepth,
this->getType().getFieldDesc(MaxDepthFieldId),
this));


editSField(MaxDepthFieldMask);

return returnValue;
}


#ifdef OSG_MT_CPTR_ASPECT
void MultiDisplayWindowBase::execSyncV( FieldContainer &oFrom,
Expand Down
Expand Up @@ -98,7 +98,8 @@ class OSG_CLUSTER_DLLMAPPING MultiDisplayWindowBase : public ClusterWindow
ManageClientViewportsFieldId = VServersFieldId + 1,
XOverlapFieldId = ManageClientViewportsFieldId + 1,
YOverlapFieldId = XOverlapFieldId + 1,
NextFieldId = YOverlapFieldId + 1
MaxDepthFieldId = YOverlapFieldId + 1,
NextFieldId = MaxDepthFieldId + 1
};

static const OSG::BitVector HServersFieldMask =
Expand All @@ -111,6 +112,8 @@ class OSG_CLUSTER_DLLMAPPING MultiDisplayWindowBase : public ClusterWindow
(TypeTraits<BitVector>::One << XOverlapFieldId);
static const OSG::BitVector YOverlapFieldMask =
(TypeTraits<BitVector>::One << YOverlapFieldId);
static const OSG::BitVector MaxDepthFieldMask =
(TypeTraits<BitVector>::One << MaxDepthFieldId);
static const OSG::BitVector NextFieldMask =
(TypeTraits<BitVector>::One << NextFieldId);

Expand All @@ -119,6 +122,7 @@ class OSG_CLUSTER_DLLMAPPING MultiDisplayWindowBase : public ClusterWindow
typedef SFBool SFManageClientViewportsType;
typedef SFInt32 SFXOverlapType;
typedef SFInt32 SFYOverlapType;
typedef SFInt32 SFMaxDepthType;

/*---------------------------------------------------------------------*/
/*! \name Class Get */
Expand Down Expand Up @@ -159,6 +163,9 @@ class OSG_CLUSTER_DLLMAPPING MultiDisplayWindowBase : public ClusterWindow
SFInt32 *editSFYOverlap (void);
const SFInt32 *getSFYOverlap (void) const;

SFInt32 *editSFMaxDepth (void);
const SFInt32 *getSFMaxDepth (void) const;


UInt32 &editHServers (void);
UInt32 getHServers (void) const;
Expand All @@ -175,6 +182,9 @@ class OSG_CLUSTER_DLLMAPPING MultiDisplayWindowBase : public ClusterWindow
Int32 &editYOverlap (void);
Int32 getYOverlap (void) const;

Int32 &editMaxDepth (void);
Int32 getMaxDepth (void) const;

/*! \} */
/*---------------------------------------------------------------------*/
/*! \name Field Set */
Expand All @@ -185,6 +195,7 @@ class OSG_CLUSTER_DLLMAPPING MultiDisplayWindowBase : public ClusterWindow
void setManageClientViewports(const bool value);
void setXOverlap (const Int32 value);
void setYOverlap (const Int32 value);
void setMaxDepth (const Int32 value);

/*! \} */
/*---------------------------------------------------------------------*/
Expand Down Expand Up @@ -249,6 +260,7 @@ class OSG_CLUSTER_DLLMAPPING MultiDisplayWindowBase : public ClusterWindow
SFBool _sfManageClientViewports;
SFInt32 _sfXOverlap;
SFInt32 _sfYOverlap;
SFInt32 _sfMaxDepth;

/*! \} */
/*---------------------------------------------------------------------*/
Expand Down Expand Up @@ -286,6 +298,8 @@ class OSG_CLUSTER_DLLMAPPING MultiDisplayWindowBase : public ClusterWindow
EditFieldHandlePtr editHandleXOverlap (void);
GetFieldHandlePtr getHandleYOverlap (void) const;
EditFieldHandlePtr editHandleYOverlap (void);
GetFieldHandlePtr getHandleMaxDepth (void) const;
EditFieldHandlePtr editHandleMaxDepth (void);

/*! \} */
/*---------------------------------------------------------------------*/
Expand Down
Expand Up @@ -198,6 +198,31 @@ void MultiDisplayWindowBase::setYOverlap(const Int32 value)

_sfYOverlap.setValue(value);
}
//! Get the value of the MultiDisplayWindow::_sfMaxDepth field.

inline
Int32 &MultiDisplayWindowBase::editMaxDepth(void)
{
editSField(MaxDepthFieldMask);

return _sfMaxDepth.getValue();
}

//! Get the value of the MultiDisplayWindow::_sfMaxDepth field.
inline
Int32 MultiDisplayWindowBase::getMaxDepth(void) const
{
return _sfMaxDepth.getValue();
}

//! Set the value of the MultiDisplayWindow::_sfMaxDepth field.
inline
void MultiDisplayWindowBase::setMaxDepth(const Int32 value)
{
editSField(MaxDepthFieldMask);

_sfMaxDepth.setValue(value);
}


#ifdef OSG_MT_CPTR_ASPECT
Expand All @@ -224,6 +249,9 @@ void MultiDisplayWindowBase::execSync ( MultiDisplayWindowBase *pFrom,

if(FieldBits::NoField != (YOverlapFieldMask & whichField))
_sfYOverlap.syncWith(pFrom->_sfYOverlap);

if(FieldBits::NoField != (MaxDepthFieldMask & whichField))
_sfMaxDepth.syncWith(pFrom->_sfMaxDepth);
}
#endif

Expand Down
Expand Up @@ -89,6 +89,8 @@ class OSG_DRAWABLE_DLLMAPPING FaceIterator : public PrimitiveIterator
/*! \{ */

inline Int32 getIndex (void ) const;
inline Int32 getIndex (Int32 which) const;

inline UInt32 getLength (void ) const;

inline Int32 getPositionIndex (Int32 which) const;
Expand Down
Expand Up @@ -46,6 +46,16 @@ Int32 FaceIterator::getIndex(void) const
return _faceIndex;
}

inline
Int32 FaceIterator::getIndex(Int32 which) const
{
if(which < 4)
{
return Inherited::getIndex(_facePntIndex[which]);
}

return -1;
}

/*! Return the length of the current face. 3 or 4, depending on the current
primitive.
Expand Down
2 changes: 0 additions & 2 deletions Source/System/NodeCores/Groups/Misc/OSGBillboard.h
Expand Up @@ -47,8 +47,6 @@

OSG_BEGIN_NAMESPACE

class DrawActionBase;

/*! \brief *put brief class description here*
*/

Expand Down
2 changes: 0 additions & 2 deletions Source/System/NodeCores/Groups/Misc/OSGInverseTransform.h
Expand Up @@ -47,8 +47,6 @@

OSG_BEGIN_NAMESPACE

class DrawActionBase;

/*! \brief InverseTransform class. See \ref
PageSystemInverseTransform for a description.
*/
Expand Down
1 change: 0 additions & 1 deletion Source/System/State/Base/OSGState.h
Expand Up @@ -48,7 +48,6 @@

OSG_BEGIN_NAMESPACE

class DrawActionBase;
class StateOverride;
class DrawEnv;

Expand Down
1 change: 0 additions & 1 deletion Source/System/State/SHL/OSGSHLChunk.h
Expand Up @@ -52,7 +52,6 @@
OSG_BEGIN_NAMESPACE

class Window;
class DrawActionBase;
class SHLParameterChunk;
class ShaderProgram;

Expand Down

0 comments on commit 3eb7b88

Please sign in to comment.