2#include "base/SharedPtr.h"
3#include "../base/BaseTypes.h"
12 ref class SpriteBatch;
13 ref class Manipulator;
14 ref class GameViewDrawHook;
16 ref class InternalCommandBuffer;
28 GameView(
const std::shared_ptr<kmyGfx::GameView>& ptr);
30 kmyGfx::GameView*
getNativePtr() {
return obj ? (*obj).get() :
nullptr; }
32 void draw(
bool swapbuffer,
float timeScale);
33 void preDraw(
float timeScale, Action<float>^ startFixedUpdate, Action<float>^ afterAnimate, Action<float>^ afterSimulate);
48 void setViewport(
int x,
int y,
int width,
int height);
65 void setDofParam(
float focalDistance,
float focalRange,
float radius);
68 void getImage(
int x,
int y,
int w,
int h, array<UINT32> ^buffer);
69 void getDepth(
int x,
int y,
int w,
int h, array<float>^ buffer);
70 void getNormal(
int x,
int y,
int w,
int h, array<UINT32>^ buffer);
75 void setFogParam(f32 start, f32 depthDensity, f32 heightFallOff);
76 void setSSAOParam(f32 radius, f32 minLimit, f32 maxLimit, f32 shadowScale,
int sampleCount, f32 contrast,
SharpKmyGfx::Color color,
SSAOALGORITHM algorithm,
SSAOBLURTYPE blurType,
int linearThresholdLevel,
float fadeDistance);
82 int pickupDetail(
float x,
float y, array<UINT16> ^idlist, array<SharpKmyMath::Vector3> ^wposlist, array<float> ^depthlist);
91 void pickupRect(
float left,
float top,
float right,
float bottom, System::Collections::Generic::List<UINT16>^ idlist,
bool ignoreTerrain,
bool ignoreManipulator);
188 bool _setSpriteBatch =
false;
190 bool _setCamera =
false;
193 bool _setDLPosture =
false;
195 bool _setDLColor =
false;
197 bool _setDLShadowColor =
false;
199 bool _setDLShadowVM =
false;
200 f32 _directionalLightShadowVolumeMargin;
201 bool _setDLShadowBias =
false;
202 f32 _directionalLightShadowBias;
203 bool _setDLShadowDistane =
false;
204 f32 _directionalLightShadowDistance;
205 bool _setCascadeStep =
false;
209 bool _setCascadeCount =
false;
210 int _cascadeCount = 4;
211 bool _setEnableCascadeViusalize =
false;
212 bool _enableCascadeVisualize =
false;
213 bool _setAmbientLight =
false;
215 bool _setViewport =
false;
220 bool _setViewportSize =
false;
221 int _viewportSizeWidth;
222 int _viewportSizeHeight;
223 bool _setDisplayID =
false;
224 unsigned int _displayID;
225 bool _setBackGroundColor =
false;
227 bool _setBloom =
false;
229 bool _setBloomParam =
false;
230 float _bloomParamApply;
231 float _bloomParamHilightThreshold;
232 bool _setAutoExposure =
false;
234 bool _setAutoExposureParam =
false;
235 float _autoExposureParamTargetBrightness;
236 float _autoExposureParamMinScale;
237 float _autoExposureParamMaxScale;
238 bool _setChromaticAbberation =
false;
239 bool _chromaticAbberation;
240 bool _setChromaticAbberationParam =
false;
241 float _chromaticAbberationParmSize;
242 bool _setDof =
false;
244 bool _setDofParam =
false;
245 float _dofParamSmoothStart;
246 float _dofParamSmoothRange;
247 float _dofParamRadius;
248 bool _setFxaa =
false;
250 bool _setReflectionMap =
false;
252 bool _setSkyBoxMaterial =
false;
253 System::Guid _skyBoxMaterial;
254 bool _setLutMap =
false;
255 System::Guid _lutMap;
256 bool _setFogColor =
false;
258 bool _setFogParam =
false;
260 f32 _fogParamDepthDensity;
261 f32 _fogParamHeightFallOff;
262 bool _setSSAOParam =
false;
263 f32 _ssaoParamRadius;
264 f32 _ssaoParamMinLimit;
265 f32 _ssaoParamMaxLimit;
266 f32 _ssaoParamShadowScle;
267 int _ssaoParamSampleCount;
268 f32 _ssaoParamContrast;
272 int _ssaoLinearThresholdLevel;
273 float _ssaoFadeDistance;
274 bool _setSSSSS =
false;
276 bool _setSSSSSParam =
false;
277 f32 _SSSSSParamRadius;
278 int _SSSSSParamSampleCount;
279 f32 _SSSSSParamApply;
280 bool _setShadowMapScale =
false;
281 float _shadowMapScale;
283 bool _setEnableVignette =
false;
284 bool _enableVignette;
285 bool _setVignette =
false;
287 bool _setIBLIntensity =
false;
289 bool _setBillboardLightModulation =
false;
290 float _billboardLightModulation;
291 bool _setReflectionIntensity =
false;
292 float _reflectionIntensity;
293 bool _setUsetDeferredLighting =
false;
294 bool _usetDeferredLighting;
296 bool _setSharpen =
false;
297 bool _sharpen =
false;
298 bool _setSharpenParam =
false;
299 float _sharpenParamStrength;
300 float _sharpenParamDistance;
302 void copy(settings% o)
304 _setSpriteBatch = o._setSpriteBatch;
305 _spriteBatch = o._spriteBatch;
306 _setCamera = o._setCamera;
307 _cameraProj = o._cameraProj;
308 _cameraView = o._cameraView;
309 _setDLPosture = o._setDLPosture;
310 _directionalLightPosture = o._directionalLightPosture;
311 _setDLColor = o._setDLColor;
312 _directionalLightColor = o._directionalLightColor;
313 _setDLShadowColor = o._setDLShadowColor;
314 _directionalLightShadowColor = o._directionalLightShadowColor;
315 _setDLShadowVM = o._setDLShadowVM;
316 _directionalLightShadowVolumeMargin = o._directionalLightShadowVolumeMargin;
317 _setDLShadowBias = o._setDLShadowBias;
318 _directionalLightShadowBias = o._directionalLightShadowBias;
319 _setDLShadowDistane = o._setDLShadowDistane;
320 _directionalLightShadowDistance = o._directionalLightShadowDistance;
321 _cascadeStep1 = o._cascadeStep1;
322 _cascadeStep2 = o._cascadeStep2;
323 _cascadeStep3 = o._cascadeStep3;
324 _cascadeCount = o._cascadeCount;
325 _enableCascadeVisualize = o._enableCascadeVisualize;
326 _setAmbientLight = o._setAmbientLight;
327 _ambientLight = o._ambientLight;
328 _setViewportSize = o._setViewportSize;
329 _viewportSizeWidth = o._viewportSizeWidth;
330 _viewportSizeHeight = o._viewportSizeHeight;
331 _setDisplayID = o._setDisplayID;
332 _displayID = o._displayID;
333 _setBackGroundColor = o._setBackGroundColor;
334 _backGroundColor = o._backGroundColor;
335 _setBloom = o._setBloom;
337 _setBloomParam = o._setBloomParam;
338 _bloomParamApply = o._bloomParamApply;
339 _bloomParamHilightThreshold = o._bloomParamHilightThreshold;
340 _setAutoExposure = o._setAutoExposure;
341 _autoExposure = o._autoExposure;
342 _setAutoExposureParam = o._setAutoExposureParam;
343 _autoExposureParamTargetBrightness = o._autoExposureParamTargetBrightness;
344 _autoExposureParamMinScale = o._autoExposureParamMinScale;
345 _autoExposureParamMaxScale = o._autoExposureParamMaxScale;
346 _setChromaticAbberation = o._setChromaticAbberation;
347 _chromaticAbberation = o._chromaticAbberation;
348 _setChromaticAbberationParam = o._setChromaticAbberationParam;
349 _chromaticAbberationParmSize = o._chromaticAbberationParmSize;
352 _setDofParam = o._setDofParam;
353 _dofParamSmoothStart = o._dofParamSmoothStart;
354 _dofParamSmoothRange = o._dofParamSmoothRange;
355 _dofParamRadius = o._dofParamRadius;
356 _setFxaa = o._setFxaa;
358 _setReflectionMap = o._setReflectionMap;
359 _reflectionMap = o._reflectionMap;
360 _setSkyBoxMaterial = o._setSkyBoxMaterial;
361 _skyBoxMaterial = o._skyBoxMaterial;
362 _setLutMap = o._setLutMap;
364 _setFogColor = o._setFogColor;
365 _fogColor = o._fogColor;
366 _setFogParam = o._setFogParam;
367 _fogParamStart = o._fogParamStart;
368 _fogParamDepthDensity = o._fogParamDepthDensity;
369 _fogParamHeightFallOff = o._fogParamHeightFallOff;
370 _setSSAOParam = o._setSSAOParam;
371 _ssaoParamRadius = o._ssaoParamRadius;
372 _ssaoParamMinLimit = o._ssaoParamMinLimit;
373 _ssaoParamMaxLimit = o._ssaoParamMaxLimit;
374 _ssaoParamShadowScle = o._ssaoParamShadowScle;
375 _ssaoParamSampleCount = o._ssaoParamSampleCount;
376 _ssaoParamContrast = o._ssaoParamContrast;
377 _ssaoParamColor = o._ssaoParamColor;
378 _setSSSSS = o._setSSSSS;
380 _setSSSSSParam = o._setSSSSSParam;
381 _SSSSSParamRadius = o._SSSSSParamRadius;
382 _SSSSSParamSampleCount = o._SSSSSParamSampleCount;
383 _SSSSSParamApply = o._SSSSSParamApply;
384 _setShadowMapScale = o._setShadowMapScale;
385 _shadowMapScale = o._shadowMapScale;
387 _setEnableVignette = o._setEnableVignette;
388 _enableVignette = o._enableVignette;
389 _setVignette = o._setVignette;
390 _vignatte = o._vignatte;
391 _setIBLIntensity = o._setIBLIntensity;
392 _IBLIntensity = o._IBLIntensity;
393 _setReflectionIntensity = o._setReflectionIntensity;
394 _reflectionIntensity = o._reflectionIntensity;
395 _setUsetDeferredLighting = o._setUsetDeferredLighting;
396 _usetDeferredLighting = o._usetDeferredLighting;
401 settings contextSaved;
Definition: GameViewDrawHook.h:17
Definition: GameView.h:19
virtual bool drawEnable()
Definition: GameView.h:21
Definition: GameView.h:25
void setShadowMapScale(float s)
Definition: GameView.cpp:1102
void setSelectionDrawEnabled(bool flg)
Definition: GameView.cpp:973
void resetQualityAdjust()
Definition: GameView.h:118
void preDraw(float timeScale, Action< float >^ startFixedUpdate, Action< float >^ afterAnimate, Action< float >^ afterSimulate)
Definition: GameView.cpp:71
void setHiddenStencilColor(float r, float g, float b, float a)
Definition: GameView.h:142
void setPhysicsDebugDrawContactPoints(bool flg)
Definition: GameView.cpp:987
bool XZPlaneHitTest(float u, float v, float yoffset, SharpKmyMath::Vector3 %hitpos)
Definition: GameView.cpp:893
void getTerrainNormal(float x, float y, SharpKmyMath::Vector3% nrm)
Definition: GameView.cpp:469
void baseImageCapture(bool flg)
Definition: GameView.cpp:1088
static Texture getBaseDepthTexture()
Definition: GameView.cpp:1065
static void setPerformanceMeterDrawMode(int mode)
Definition: GameView.h:155
void setDistanceFadeStart(float v)
Definition: GameView.h:109
void clearHoverHilightPickupID()
Definition: GameView.cpp:558
SharpKmyMath::Matrix4 getCameraView()
Definition: GameView.h:178
static GameView getMainGameView()
Definition: GameView.cpp:43
void showDevelopHint(bool flg)
Definition: GameView.h:172
void pickupRect(float left, float top, float right, float bottom, System::Collections::Generic::List< UINT16 >^ idlist, bool ignoreTerrain, bool ignoreManipulator)
Definition: GameView.cpp:504
Texture getCaptureColorTexture()
Definition: GameView.cpp:1043
void setChromaticAbberationParam(float size)
Definition: GameView.cpp:382
void setVignette(float value)
Definition: GameView.cpp:613
void addDrawHook(GameViewDrawHook ^d)
Definition: GameView.cpp:1114
void addPhysics()
Definition: GameView.h:112
static int getCurrentGameView3DScreenWidth()
Definition: GameView.cpp:1441
void setShapenParam(float strength, float distance)
Definition: GameView.cpp:431
void setDirectionalLightShadowBias(f32 bias)
Definition: GameView.cpp:169
void setDirectionalLightPosture(SharpKmyMath::Matrix4^ posture)
Definition: GameView.cpp:121
static void setMainGameView(GameView^ gv)
Definition: GameView.cpp:38
Manipulator getManipulator()
Definition: GameView.cpp:926
static void windowsMessageEvent(IntPtr hWnd, UINT message, WPARAM wparam, LPARAM lparam)
Definition: GameView.cpp:1433
array< unsigned short > getHilightPicupIDs()
Definition: GameView.cpp:527
void setModelBoundSphereDrawType(ModelBoundSphereDrawType flg)
Definition: GameView.h:120
void setAmbientLight(SharpKmyGfx::Color color)
Definition: GameView.cpp:228
void setViewport(int x, int y, int width, int height)
Definition: GameView.cpp:240
void setSSSSSParam(f32 radius, int sampleCount, f32 apply)
Definition: GameView.cpp:865
~GameView()
Definition: GameView.cpp:28
void getCaptureFrame(array< UINT32 > ^color, array< UINT32 > ^depth)
Definition: GameView.cpp:761
void setViewportSize(int width, int height)
Definition: GameView.cpp:254
void enableChromaticAbberation(bool flg)
Definition: GameView.cpp:370
void enableBloom(bool flg)
Definition: GameView.cpp:319
SharpKmyMath::Vector2 getViewportSize()
Definition: GameView.cpp:267
void setCascadeCount(int num)
Definition: GameView.cpp:206
void setLutMap(System::Guid id)
Definition: GameView.cpp:589
void addSubGameView(GameView^ sub)
Definition: GameView.cpp:1015
void ignoreSuspendChecker()
Definition: GameView.h:141
void setFogParam(f32 start, f32 depthDensity, f32 heightFallOff)
Definition: GameView.cpp:813
void setPhysicsDebugDrawConstraints(bool flg)
Definition: GameView.cpp:994
void enableSSSSS(bool flg)
Definition: GameView.cpp:853
void removeSubGameView(GameView^ sub)
Definition: GameView.h:130
void enableFxaa(bool flg)
Definition: GameView.cpp:444
void setBillboardLightModulation(float value)
Definition: GameView.cpp:637
void usetDeferredLighting(bool flg)
Definition: GameView.cpp:880
void setDirectionalLightShadowVolumeMargin(f32 margin)
Definition: GameView.cpp:157
void addPickupFrame(int size)
Definition: GameView.cpp:298
void setDirectionalLightShadowDistance(f32 distance)
Definition: GameView.cpp:181
void enableAsSubGameView(bool flg)
Definition: GameView.cpp:1023
void setCascadeStep(float s1, float s2, float s3)
Definition: GameView.cpp:193
static void setSpriteBatchToTaskGameView(SpriteBatch^ s)
Definition: GameView.cpp:932
void enableCascadeVisualize(bool flg)
Definition: GameView.cpp:217
int pickupDetail(float x, float y, array< UINT16 > ^idlist, array< SharpKmyMath::Vector3 > ^wposlist, array< float > ^depthlist)
Definition: GameView.cpp:480
float getBlockElapsed(SharpKmyBase::PerformancePeriodType type)
Definition: GameView.cpp:1416
void setPhysicsProcessEnabled(bool flag)
Definition: GameView.cpp:1001
void addManipulator()
Definition: GameView.h:114
static void setDrawSuspendChecker(GameViewDrawSuspendChecker^ body)
Definition: GameView.cpp:1391
void setDirectionalLightColor(SharpKmyGfx::Color color)
Definition: GameView.cpp:133
void addDrawCommand(DrawEvent ev, InternalCommandBuffer^ icb)
Definition: GameView.cpp:1407
bool isDebugPause()
Definition: GameView.cpp:101
void enableVignette(bool flg)
Definition: GameView.cpp:601
SharpKmyPhysics::PhysicsBase getPhysics()
Definition: GameView.cpp:914
void save()
Definition: GameView.cpp:1157
void enableSharpen(bool flg)
Definition: GameView.cpp:420
Texture getCaptureDepthTexture()
Definition: GameView.cpp:1054
void restore()
Definition: GameView.cpp:1168
static void bootProgressMessage(System::String^ text)
Definition: GameView.cpp:958
GameView()
Definition: GameView.cpp:9
static GameViewDrawSuspendChecker s_checker
Definition: GameView.h:158
static bool isDrawSuspending()
Definition: GameView.cpp:1399
unsigned short pickup(float x, float y, SharpKmyMath::Vector3% wpos)
Definition: GameView.cpp:455
void addHilightPickupID(unsigned short id)
Definition: GameView.cpp:520
u32 getDisplayID()
Definition: GameView.h:51
void enableDynamicResolution(bool flg)
Definition: GameView.cpp:1095
void set3DGizmoDrawEnabled(bool flg)
Definition: GameView.cpp:966
void setDofParam(float focalDistance, float focalRange, float radius)
Definition: GameView.cpp:406
bool owning
Definition: GameView.h:165
void setCamera(SharpKmyMath::Matrix4^ proj, SharpKmyMath::Matrix4^ view)
Definition: GameView.cpp:108
static void setMaximumResolution(int w, int h)
Definition: GameView.cpp:941
void addHoverHilightPickupID(unsigned short id)
Definition: GameView.cpp:551
void clearSettings()
Definition: GameView.h:79
void enableDof(bool flg)
Definition: GameView.cpp:394
void setReflectionMap(Texture^ tex)
Definition: GameView.cpp:565
void setIBLIntensity(float value)
Definition: GameView.cpp:625
bool viewVolumeCheck(float x, float y, float z, float radius)
Definition: GameView.cpp:1008
void setDisplayID(unsigned int id)
Definition: GameView.cpp:274
void setReflectionIntensity(float value)
Definition: GameView.cpp:649
void postDraw(bool swapbuffer)
Definition: GameView.cpp:87
void removeDrawHook(GameViewDrawHook^ d)
Definition: GameView.cpp:1130
void enableAutoExposure(bool flg)
Definition: GameView.cpp:344
void setSpriteBatch(SpriteBatch^ s)
Definition: GameView.cpp:783
static GameView getTaskGameView()
Definition: GameView.cpp:948
void removeSubGameView(GameView^ sub, bool removeForce)
Definition: GameView.cpp:1030
void use2DGizmo()
Definition: GameView.h:101
void debugPause(bool flg)
Definition: GameView.cpp:94
void getNormal(int x, int y, int w, int h, array< UINT32 >^ buffer)
Definition: GameView.cpp:676
void setBackGroundColor(SharpKmyGfx::Color color)
Definition: GameView.cpp:286
void setBloomParam(float apply, float hilightThreshold)
Definition: GameView.cpp:331
void setFogColor(SharpKmyGfx::Color color)
Definition: GameView.cpp:801
void copyBaseRenderingEnviroment(GameView^ src)
Definition: GameView.cpp:1079
void draw(bool swapbuffer, float timeScale)
Definition: GameView.cpp:49
static Texture getPickupIDTexture()
Definition: GameView.cpp:1072
bool m_ignoreSuspendChecker
Definition: GameView.h:164
void getImage(int x, int y, int w, int h, array< UINT32 > ^buffer)
Definition: GameView.cpp:661
void setDistanceFadeEnable(bool flg)
Definition: GameView.h:108
void setSSAOParam(f32 radius, f32 minLimit, f32 maxLimit, f32 shadowScale, int sampleCount, f32 contrast, SharpKmyGfx::Color color, SSAOALGORITHM algorithm, SSAOBLURTYPE blurType, int linearThresholdLevel, float fadeDistance)
Definition: GameView.cpp:827
void setPhysicsDebugDrawEnabled(int flag)
Definition: GameView.cpp:980
void clearHilightPickupID()
Definition: GameView.cpp:544
void setAutoExposureParam(float targetBrightness, float minScale, float maxScale)
Definition: GameView.cpp:356
SharpKmyMath::Matrix4 getCameraProj()
Definition: GameView.h:174
static void useAsyncCommandExec()
Definition: GameView.h:151
static void globalEnablePostFX(bool flg)
Definition: GameView.cpp:1148
void setDirectionalLightShadowColor(SharpKmyGfx::Color color)
Definition: GameView.cpp:145
int getFixedUpdateStepCount()
Definition: GameView.cpp:1424
void enableIconDrawer(bool enable)
Definition: GameView.h:170
kmyGfx::GameView * getNativePtr()
Definition: GameView.h:30
void showMiniMeter(bool flg)
Definition: GameView.h:171
static int getCurrentGameView3DScreenHeight()
Definition: GameView.cpp:1449
void getDepth(int x, int y, int w, int h, array< float >^ buffer)
Definition: GameView.cpp:691
void clearDrawHook()
Definition: GameView.cpp:1140
void removeCaptureFrame()
Definition: GameView.cpp:312
void addCaptureFrame(int width, int height)
Definition: GameView.cpp:305
void setSkyBoxMaterial(System::Guid mtl)
Definition: GameView.cpp:577
void createScreenShot(System::String^ path)
Definition: GameView.cpp:752
Definition: GameView.h:405
static void addParticleResourceForLoadTest(System::String^ path)
Definition: GameView.cpp:1382
Definition: InternalCommandBuffer.h:13
Definition: Manipulator.h:8
Definition: SpriteBatch.h:9
static Matrix4 identity()
Definition: Matrix4.h:101
PerformancePeriodType
Definition: BaseTypes.h:6
SSAOBLURTYPE
Definition: GfxTypes.h:213
DrawEvent
Definition: GfxTypes.h:52
SSAOALGORITHM
Definition: GfxTypes.h:206
ModelBoundSphereDrawType
Definition: GfxTypes.h:60
Definition: Billboard.h:6