2#include "base/SharedPtr.h"
11 ref class SpriteBatch;
12 ref class Manipulator;
13 ref class GameViewDrawHook;
15 ref class InternalCommandBuffer;
27 GameView(
const std::shared_ptr<kmyGfx::GameView>& ptr);
29 kmyGfx::GameView*
getNativePtr() {
return obj ? (*obj).get() :
nullptr; }
31 void draw(
bool swapbuffer,
float timeScale);
32 void preDraw(
float timeScale, Action<float>^ startFixedUpdate, Action<float>^ afterAnimate, Action<float>^ afterSimulate);
45 void setViewport(
int x,
int y,
int width,
int height);
62 void setDofParam(
float focalDistance,
float focalRange,
float radius);
65 void getImage(
int x,
int y,
int w,
int h, array<UINT32> ^buffer);
66 void getDepth(
int x,
int y,
int w,
int h, array<float>^ buffer);
67 void getNormal(
int x,
int y,
int w,
int h, array<UINT32>^ buffer);
72 void setFogParam(f32 start, f32 depthDensity, f32 heightFallOff);
79 int pickupDetail(
float x,
float y, array<UINT16> ^idlist, array<SharpKmyMath::Vector3> ^wposlist, array<float> ^depthlist);
88 void pickupRect(
float left,
float top,
float right,
float bottom, System::Collections::Generic::List<UINT16>^ idlist,
bool ignoreTerrain,
bool ignoreManipulator);
181 bool _setSpriteBatch =
false;
183 bool _setCamera =
false;
186 bool _setDLPosture =
false;
188 bool _setDLColor =
false;
190 bool _setDLShadowColor =
false;
192 bool _setDLShadowVM =
false;
193 f32 _directionalLightShadowVolumeMargin;
194 bool _setDLShadowBias =
false;
195 f32 _directionalLightShadowBias;
196 bool _setDLShadowDistane =
false;
197 f32 _directionalLightShadowDistance;
198 bool _setCascadeStep =
false;
202 bool _setCascadeCount =
false;
203 int _cascadeCount = 4;
204 bool _setEnableCascadeViusalize =
false;
205 bool _enableCascadeVisualize =
false;
206 bool _setAmbientLight =
false;
208 bool _setViewport =
false;
213 bool _setViewportSize =
false;
214 int _viewportSizeWidth;
215 int _viewportSizeHeight;
216 bool _setDisplayID =
false;
217 unsigned int _displayID;
218 bool _setBackGroundColor =
false;
220 bool _setBloom =
false;
222 bool _setBloomParam =
false;
223 float _bloomParamApply;
224 float _bloomParamHilightThreshold;
225 bool _setAutoExposure =
false;
227 bool _setAutoExposureParam =
false;
228 float _autoExposureParamTargetBrightness;
229 float _autoExposureParamMinScale;
230 float _autoExposureParamMaxScale;
231 bool _setChromaticAbberation =
false;
232 bool _chromaticAbberation;
233 bool _setChromaticAbberationParam =
false;
234 float _chromaticAbberationParmSize;
235 bool _setDof =
false;
237 bool _setDofParam =
false;
238 float _dofParamSmoothStart;
239 float _dofParamSmoothRange;
240 float _dofParamRadius;
241 bool _setFxaa =
false;
243 bool _setReflectionMap =
false;
245 bool _setSkyBoxMaterial =
false;
246 System::Guid _skyBoxMaterial;
247 bool _setLutMap =
false;
248 System::Guid _lutMap;
249 bool _setFogColor =
false;
251 bool _setFogParam =
false;
253 f32 _fogParamDepthDensity;
254 f32 _fogParamHeightFallOff;
255 bool _setSSAOParam =
false;
256 f32 _ssaoParamRadius;
257 f32 _ssaoParamMinLimit;
258 f32 _ssaoParamMaxLimit;
259 f32 _ssaoParamShadowScle;
260 int _ssaoParamSampleCount;
261 f32 _ssaoParamContrast;
263 bool _setSSSSS =
false;
265 bool _setSSSSSParam =
false;
266 f32 _SSSSSParamRadius;
267 int _SSSSSParamSampleCount;
268 f32 _SSSSSParamApply;
269 bool _setShadowMapScale =
false;
270 float _shadowMapScale;
272 bool _setEnableVignette =
false;
273 bool _enableVignette;
274 bool _setVignette =
false;
276 bool _setIBLIntensity =
false;
278 bool _setBillboardLightModulation =
false;
279 float _billboardLightModulation;
280 bool _setReflectionIntensity =
false;
281 float _reflectionIntensity;
282 bool _setUsetDeferredLighting =
false;
283 bool _usetDeferredLighting;
285 bool _setSharpen =
false;
286 bool _sharpen =
false;
287 bool _setSharpenParam =
false;
288 float _sharpenParamStrength;
289 float _sharpenParamDistance;
291 void copy(settings% o)
293 _setSpriteBatch = o._setSpriteBatch;
294 _spriteBatch = o._spriteBatch;
295 _setCamera = o._setCamera;
296 _cameraProj = o._cameraProj;
297 _cameraView = o._cameraView;
298 _setDLPosture = o._setDLPosture;
299 _directionalLightPosture = o._directionalLightPosture;
300 _setDLColor = o._setDLColor;
301 _directionalLightColor = o._directionalLightColor;
302 _setDLShadowColor = o._setDLShadowColor;
303 _directionalLightShadowColor = o._directionalLightShadowColor;
304 _setDLShadowVM = o._setDLShadowVM;
305 _directionalLightShadowVolumeMargin = o._directionalLightShadowVolumeMargin;
306 _setDLShadowBias = o._setDLShadowBias;
307 _directionalLightShadowBias = o._directionalLightShadowBias;
308 _setDLShadowDistane = o._setDLShadowDistane;
309 _directionalLightShadowDistance = o._directionalLightShadowDistance;
310 _cascadeStep1 = o._cascadeStep1;
311 _cascadeStep2 = o._cascadeStep2;
312 _cascadeStep3 = o._cascadeStep3;
313 _cascadeCount = o._cascadeCount;
314 _enableCascadeVisualize = o._enableCascadeVisualize;
315 _setAmbientLight = o._setAmbientLight;
316 _ambientLight = o._ambientLight;
317 _setViewportSize = o._setViewportSize;
318 _viewportSizeWidth = o._viewportSizeWidth;
319 _viewportSizeHeight = o._viewportSizeHeight;
320 _setDisplayID = o._setDisplayID;
321 _displayID = o._displayID;
322 _setBackGroundColor = o._setBackGroundColor;
323 _backGroundColor = o._backGroundColor;
324 _setBloom = o._setBloom;
326 _setBloomParam = o._setBloomParam;
327 _bloomParamApply = o._bloomParamApply;
328 _bloomParamHilightThreshold = o._bloomParamHilightThreshold;
329 _setAutoExposure = o._setAutoExposure;
330 _autoExposure = o._autoExposure;
331 _setAutoExposureParam = o._setAutoExposureParam;
332 _autoExposureParamTargetBrightness = o._autoExposureParamTargetBrightness;
333 _autoExposureParamMinScale = o._autoExposureParamMinScale;
334 _autoExposureParamMaxScale = o._autoExposureParamMaxScale;
335 _setChromaticAbberation = o._setChromaticAbberation;
336 _chromaticAbberation = o._chromaticAbberation;
337 _setChromaticAbberationParam = o._setChromaticAbberationParam;
338 _chromaticAbberationParmSize = o._chromaticAbberationParmSize;
341 _setDofParam = o._setDofParam;
342 _dofParamSmoothStart = o._dofParamSmoothStart;
343 _dofParamSmoothRange = o._dofParamSmoothRange;
344 _dofParamRadius = o._dofParamRadius;
345 _setFxaa = o._setFxaa;
347 _setReflectionMap = o._setReflectionMap;
348 _reflectionMap = o._reflectionMap;
349 _setSkyBoxMaterial = o._setSkyBoxMaterial;
350 _skyBoxMaterial = o._skyBoxMaterial;
351 _setLutMap = o._setLutMap;
353 _setFogColor = o._setFogColor;
354 _fogColor = o._fogColor;
355 _setFogParam = o._setFogParam;
356 _fogParamStart = o._fogParamStart;
357 _fogParamDepthDensity = o._fogParamDepthDensity;
358 _fogParamHeightFallOff = o._fogParamHeightFallOff;
359 _setSSAOParam = o._setSSAOParam;
360 _ssaoParamRadius = o._ssaoParamRadius;
361 _ssaoParamMinLimit = o._ssaoParamMinLimit;
362 _ssaoParamMaxLimit = o._ssaoParamMaxLimit;
363 _ssaoParamShadowScle = o._ssaoParamShadowScle;
364 _ssaoParamSampleCount = o._ssaoParamSampleCount;
365 _ssaoParamContrast = o._ssaoParamContrast;
366 _ssaoParamColor = o._ssaoParamColor;
367 _setSSSSS = o._setSSSSS;
369 _setSSSSSParam = o._setSSSSSParam;
370 _SSSSSParamRadius = o._SSSSSParamRadius;
371 _SSSSSParamSampleCount = o._SSSSSParamSampleCount;
372 _SSSSSParamApply = o._SSSSSParamApply;
373 _setShadowMapScale = o._setShadowMapScale;
374 _shadowMapScale = o._shadowMapScale;
376 _setEnableVignette = o._setEnableVignette;
377 _enableVignette = o._enableVignette;
378 _setVignette = o._setVignette;
379 _vignatte = o._vignatte;
380 _setIBLIntensity = o._setIBLIntensity;
381 _IBLIntensity = o._IBLIntensity;
382 _setReflectionIntensity = o._setReflectionIntensity;
383 _reflectionIntensity = o._reflectionIntensity;
384 _setUsetDeferredLighting = o._setUsetDeferredLighting;
385 _usetDeferredLighting = o._usetDeferredLighting;
390 settings contextSaved;
Definition: GameViewDrawHook.h:17
Definition: GameView.h:18
virtual bool drawEnable()
Definition: GameView.h:20
Definition: GameView.h:24
void setShadowMapScale(float s)
Definition: GameView.cpp:1054
void setSelectionDrawEnabled(bool flg)
Definition: GameView.cpp:925
void resetQualityAdjust()
Definition: GameView.h:114
void preDraw(float timeScale, Action< float >^ startFixedUpdate, Action< float >^ afterAnimate, Action< float >^ afterSimulate)
Definition: GameView.cpp:68
void setHiddenStencilColor(float r, float g, float b, float a)
Definition: GameView.h:138
void setPhysicsDebugDrawContactPoints(bool flg)
Definition: GameView.cpp:939
bool XZPlaneHitTest(float u, float v, float yoffset, SharpKmyMath::Vector3 %hitpos)
Definition: GameView.cpp:845
void getTerrainNormal(float x, float y, SharpKmyMath::Vector3% nrm)
Definition: GameView.cpp:452
void baseImageCapture(bool flg)
Definition: GameView.cpp:1040
static Texture getBaseDepthTexture()
Definition: GameView.cpp:1017
static void setPerformanceMeterDrawMode(int mode)
Definition: GameView.h:148
void setDistanceFadeStart(float v)
Definition: GameView.h:105
void clearHoverHilightPickupID()
Definition: GameView.cpp:524
SharpKmyMath::Matrix4 getCameraView()
Definition: GameView.h:171
static GameView getMainGameView()
Definition: GameView.cpp:42
void pickupRect(float left, float top, float right, float bottom, System::Collections::Generic::List< UINT16 >^ idlist, bool ignoreTerrain, bool ignoreManipulator)
Definition: GameView.cpp:487
Texture getCaptureColorTexture()
Definition: GameView.cpp:995
void setChromaticAbberationParam(float size)
Definition: GameView.cpp:365
void setVignette(float value)
Definition: GameView.cpp:579
void addDrawHook(GameViewDrawHook ^d)
Definition: GameView.cpp:1066
void addPhysics()
Definition: GameView.h:108
static int getCurrentGameView3DScreenWidth()
Definition: GameView.cpp:1372
void setShapenParam(float strength, float distance)
Definition: GameView.cpp:414
void setDirectionalLightShadowBias(f32 bias)
Definition: GameView.cpp:152
void setDirectionalLightPosture(SharpKmyMath::Matrix4^ posture)
Definition: GameView.cpp:104
static void setMainGameView(GameView^ gv)
Definition: GameView.cpp:37
Manipulator getManipulator()
Definition: GameView.cpp:878
static void windowsMessageEvent(IntPtr hWnd, UINT message, WPARAM wparam, LPARAM lparam)
Definition: GameView.cpp:1364
void setModelBoundSphereDrawType(ModelBoundSphereDrawType flg)
Definition: GameView.h:116
void setAmbientLight(SharpKmyGfx::Color color)
Definition: GameView.cpp:211
void showPerformanceMeter(bool flg)
Definition: GameView.h:164
bool isShownPerformanceMeter()
Definition: GameView.h:165
void setViewport(int x, int y, int width, int height)
Definition: GameView.cpp:223
void setSSSSSParam(f32 radius, int sampleCount, f32 apply)
Definition: GameView.cpp:817
~GameView()
Definition: GameView.cpp:27
void getCaptureFrame(array< UINT32 > ^color, array< UINT32 > ^depth)
Definition: GameView.cpp:721
void setViewportSize(int width, int height)
Definition: GameView.cpp:237
void enableChromaticAbberation(bool flg)
Definition: GameView.cpp:353
void enableBloom(bool flg)
Definition: GameView.cpp:302
SharpKmyMath::Vector2 getViewportSize()
Definition: GameView.cpp:250
void setCascadeCount(int num)
Definition: GameView.cpp:189
void setLutMap(System::Guid id)
Definition: GameView.cpp:555
void addSubGameView(GameView^ sub)
Definition: GameView.cpp:967
void ignoreSuspendChecker()
Definition: GameView.h:137
void setFogParam(f32 start, f32 depthDensity, f32 heightFallOff)
Definition: GameView.cpp:773
void setPhysicsDebugDrawConstraints(bool flg)
Definition: GameView.cpp:946
void enableSSSSS(bool flg)
Definition: GameView.cpp:805
void removeSubGameView(GameView^ sub)
Definition: GameView.h:126
void enableFxaa(bool flg)
Definition: GameView.cpp:427
void setBillboardLightModulation(float value)
Definition: GameView.cpp:603
void usetDeferredLighting(bool flg)
Definition: GameView.cpp:832
void setDirectionalLightShadowVolumeMargin(f32 margin)
Definition: GameView.cpp:140
void addPickupFrame(int size)
Definition: GameView.cpp:281
void setDirectionalLightShadowDistance(f32 distance)
Definition: GameView.cpp:164
void enableAsSubGameView(bool flg)
Definition: GameView.cpp:975
void setCascadeStep(float s1, float s2, float s3)
Definition: GameView.cpp:176
static void setSpriteBatchToTaskGameView(SpriteBatch^ s)
Definition: GameView.cpp:884
void enableCascadeVisualize(bool flg)
Definition: GameView.cpp:200
int pickupDetail(float x, float y, array< UINT16 > ^idlist, array< SharpKmyMath::Vector3 > ^wposlist, array< float > ^depthlist)
Definition: GameView.cpp:463
void setPhysicsProcessEnabled(bool flag)
Definition: GameView.cpp:953
void addManipulator()
Definition: GameView.h:110
static void setDrawSuspendChecker(GameViewDrawSuspendChecker^ body)
Definition: GameView.cpp:1338
void setDirectionalLightColor(SharpKmyGfx::Color color)
Definition: GameView.cpp:116
void addDrawCommand(DrawEvent ev, InternalCommandBuffer^ icb)
Definition: GameView.cpp:1354
void enableVignette(bool flg)
Definition: GameView.cpp:567
SharpKmyPhysics::PhysicsBase getPhysics()
Definition: GameView.cpp:866
void save()
Definition: GameView.cpp:1109
void enableSharpen(bool flg)
Definition: GameView.cpp:403
Texture getCaptureDepthTexture()
Definition: GameView.cpp:1006
void restore()
Definition: GameView.cpp:1120
static void bootProgressMessage(System::String^ text)
Definition: GameView.cpp:910
GameView()
Definition: GameView.cpp:8
static GameViewDrawSuspendChecker s_checker
Definition: GameView.h:151
static bool isDrawSuspending()
Definition: GameView.cpp:1346
unsigned short pickup(float x, float y, SharpKmyMath::Vector3% wpos)
Definition: GameView.cpp:438
void addHilightPickupID(unsigned short id)
Definition: GameView.cpp:503
u32 getDisplayID()
Definition: GameView.h:48
void enableDynamicResolution(bool flg)
Definition: GameView.cpp:1047
void set3DGizmoDrawEnabled(bool flg)
Definition: GameView.cpp:918
void setDofParam(float focalDistance, float focalRange, float radius)
Definition: GameView.cpp:389
bool owning
Definition: GameView.h:158
void setCamera(SharpKmyMath::Matrix4^ proj, SharpKmyMath::Matrix4^ view)
Definition: GameView.cpp:91
static void setMaximumResolution(int w, int h)
Definition: GameView.cpp:893
void addHoverHilightPickupID(unsigned short id)
Definition: GameView.cpp:517
void clearSettings()
Definition: GameView.h:76
void enableDof(bool flg)
Definition: GameView.cpp:377
void setReflectionMap(Texture^ tex)
Definition: GameView.cpp:531
void setIBLIntensity(float value)
Definition: GameView.cpp:591
bool viewVolumeCheck(float x, float y, float z, float radius)
Definition: GameView.cpp:960
void setDisplayID(unsigned int id)
Definition: GameView.cpp:257
void setSSAOParam(f32 radius, f32 minLimit, f32 maxLimit, f32 shadowScale, int sampleCount, f32 contrast, SharpKmyGfx::Color color)
Definition: GameView.cpp:787
void setReflectionIntensity(float value)
Definition: GameView.cpp:615
void postDraw(bool swapbuffer)
Definition: GameView.cpp:84
void removeDrawHook(GameViewDrawHook^ d)
Definition: GameView.cpp:1082
void enableAutoExposure(bool flg)
Definition: GameView.cpp:327
void setSpriteBatch(SpriteBatch^ s)
Definition: GameView.cpp:743
static GameView getTaskGameView()
Definition: GameView.cpp:900
void removeSubGameView(GameView^ sub, bool removeForce)
Definition: GameView.cpp:982
void use2DGizmo()
Definition: GameView.h:97
void getNormal(int x, int y, int w, int h, array< UINT32 >^ buffer)
Definition: GameView.cpp:642
void setBackGroundColor(SharpKmyGfx::Color color)
Definition: GameView.cpp:269
void setBloomParam(float apply, float hilightThreshold)
Definition: GameView.cpp:314
void setFogColor(SharpKmyGfx::Color color)
Definition: GameView.cpp:761
void copyBaseRenderingEnviroment(GameView^ src)
Definition: GameView.cpp:1031
void draw(bool swapbuffer, float timeScale)
Definition: GameView.cpp:48
static Texture getPickupIDTexture()
Definition: GameView.cpp:1024
bool m_ignoreSuspendChecker
Definition: GameView.h:157
void getImage(int x, int y, int w, int h, array< UINT32 > ^buffer)
Definition: GameView.cpp:627
void setDistanceFadeEnable(bool flg)
Definition: GameView.h:104
void setPhysicsDebugDrawEnabled(int flag)
Definition: GameView.cpp:932
void clearHilightPickupID()
Definition: GameView.cpp:510
void setAutoExposureParam(float targetBrightness, float minScale, float maxScale)
Definition: GameView.cpp:339
SharpKmyMath::Matrix4 getCameraProj()
Definition: GameView.h:167
static void useAsyncCommandExec()
Definition: GameView.h:144
static void globalEnablePostFX(bool flg)
Definition: GameView.cpp:1100
void setDirectionalLightShadowColor(SharpKmyGfx::Color color)
Definition: GameView.cpp:128
void enableIconDrawer(bool enable)
Definition: GameView.h:163
kmyGfx::GameView * getNativePtr()
Definition: GameView.h:29
static int getCurrentGameView3DScreenHeight()
Definition: GameView.cpp:1380
void getDepth(int x, int y, int w, int h, array< float >^ buffer)
Definition: GameView.cpp:657
void clearDrawHook()
Definition: GameView.cpp:1092
void removeCaptureFrame()
Definition: GameView.cpp:295
void addCaptureFrame(int width, int height)
Definition: GameView.cpp:288
void setSkyBoxMaterial(System::Guid mtl)
Definition: GameView.cpp:543
void createScreenShot(System::String^ path)
Definition: GameView.cpp:712
Definition: GameView.h:394
static void addParticleResourceForLoadTest(System::String^ path)
Definition: GameView.cpp:1329
Definition: InternalCommandBuffer.h:13
Definition: Manipulator.h:8
Definition: SpriteBatch.h:9
static Matrix4 identity()
Definition: Matrix4.h:101
DrawEvent
Definition: GfxTypes.h:52
ModelBoundSphereDrawType
Definition: GfxTypes.h:60
Definition: Billboard.h:6