#include <stdio.h>
#include <maya/MString.h>
#include <maya/MSelectionList.h>
#include <maya/M3dView.h>
#include <maya/MDrawContext.h>
#include <maya/MFrameContext.h>
#include <maya/MMessage.h>
enum ETargetId
{
kMyColorTarget,
kMyDepthTarget,
kMyBlurTarget,
kTargetCount
};
{
public:
enum {
kBackgroundBlit = 0,
kMaya3dSceneRender,
kMaya3dSceneRenderOpaque,
kMaya3dSceneRenderTransparent,
kThresholdOp,
kHorizBlurOp,
kVertBlurOp,
kBlendOp,
kPostOperation1,
kPostOperation2,
kMaya3dSceneRenderUI,
kUserOpNumber,
kHUDBlit,
kPresentOp,
kNumberOfOps
};
viewRenderOverride(
const MString & name );
~viewRenderOverride() override;
{
return mPanelName;
}
void setSimpleRendering( bool flag )
{
mSimpleRendering = flag;
}
{
return mUIName;
}
protected:
bool updateRenderTargets();
MString mRenderOperationNames[kNumberOfOps];
int mCurrentOperation;
MString mTargetOverrideNames[kTargetCount];
bool mTargetSupportsSRGBWrite[kTargetCount];
bool mSplitUIDraw;
bool mSimpleRendering;
bool mDebugOverride;
MCallbackId mRendererChangeCB;
MCallbackId mRenderOverrideChangeCB;
static void sRendererChangeFunc(
void* clientData);
static void sRenderOverrideChangeFunc(
void* clientData);
};
{
public:
viewRenderPresentTarget(
const MString &name);
~viewRenderPresentTarget() override;
protected:
};
{
public:
typedef enum {
kEffectNone,
kPost_EffectMonochrome,
kPost_EffectEdgeDetect,
kPost_EffectInvert,
kScene_Threshold,
kScene_BlurHoriz,
kScene_BlurVert,
kSceneBlur_Blend,
kPre_MandelBrot,
} MQuadShader ;
viewRenderQuadRender(
const MString &name);
~viewRenderQuadRender() override;
{
mTargets = targets;
}
void setShader( MQuadShader shader )
{
}
{
return mShader;
}
{
return mViewRectangle;
}
{
mViewRectangle = rect;
}
protected:
MQuadShader mShader;
};
{
public:
viewRenderHUDOperation()
{
mTargets = NULL;
}
{
if (mTargets)
{
listSize = 2;
return &mTargets[0];
}
listSize = 0;
return NULL;
}
{
return true;
}
{
mTargets = targets;
}
~viewRenderHUDOperation() override
{
mTargets = NULL;
}
protected:
};
{
public:
simpleViewRenderSceneRender(
const MString &name);
};
{
public:
viewRenderSceneRender(
unsigned int clearMask);
~viewRenderSceneRender() override;
{
return true;
}
{
return mPanelName;
}
void setPanelName(
const MString & name )
{
}
{
return mViewRectangle;
}
{
mViewRectangle = rect;
}
{
return mTargets ? mTargets[kMyColorTarget] : NULL;
}
{
return mTargets ? mTargets[kMyDepthTarget] : NULL;
}
void setEnableSRGBWriteFlag( bool val )
{
mEnableSRGBWrite = val;
}
bool enableSRGBWriteFlag() const
{
return mEnableSRGBWrite;
}
protected:
unsigned int mClearMask;
bool mUseShaderOverride;
bool mUseStockShaderOverride;
bool mAttachPrePostShaderCallback;
bool mUseShadowShader;
bool mOverrideDisplayMode;
bool mOverrideDisplayModeFlatActive;
bool mOverrideLightingMode;
bool mOverrideCullingMode;
bool mDebugTargetResourceHandle;
bool mOverrrideM3dViewDisplayMode;
bool mFilterDrawNothing;
bool mFilterDrawSelected;
bool mEnableSRGBWrite;
};
{
public:
viewRenderUserOperation(
const MString &name);
~viewRenderUserOperation() override;
{
mTargets = targets;
}
void setEnableSRGBWriteFlag( bool val )
{
fEnableSRGBWriteFlag = val;
}
{
return mPanelName;
}
void setPanelName(
const MString & name )
{
}
{
return mViewRectangle;
}
{
mViewRectangle = rect;
}
protected:
bool fEnableSRGBWriteFlag;
bool fDrawLabel;
bool fUserCameraOverride;
bool fDebugDrawContext;
bool fDebugLightingInfo;
};
class viewRenderOverrideUtilities
{
public:
};