Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 975 vs 978 for /trunk/Source Code/Platform/Video/Headers/GFXDevice.h

Diff revisions: vs.
  @@ -85,6 +85,7 @@
85 85 class GenericVertexData;
86 86 class ShaderComputeQueue;
87 87
88 + struct SizeChangeParams;
88 89 struct ShaderBufferDescriptor;
89 90
90 91 FWD_DECLARE_MANAGED_CLASS(Texture);
  @@ -234,6 +235,8 @@
234 235 inline bool setViewport(I32 x, I32 y, I32 width, I32 height);
235 236 bool restoreViewport();
236 237
238 + inline const vec2<U16>& renderingResolution() const;
239 +
237 240 void setSceneZPlanes(const vec2<F32>& zPlanes);
238 241
239 242 /// Switch between fullscreen rendering
  @@ -365,10 +368,12 @@
365 368 void drawText(const TextElementBatch& batch, GFX::CommandBuffer& bufferInOut);
366 369 void drawText(const TextElementBatch& batch);
367 370
368 - void onChangeResolution(U16 w, U16 h);
371 + void onSizeChange(const SizeChangeParams& params);
369 372
370 373 void renderDebugViews(GFX::CommandBuffer& bufferInOut);
371 374
375 + void stepResolution(bool increment);
376 +
372 377 protected:
373 378 void onCameraUpdate(const Camera& camera);
374 379 void onCameraChange(const Camera& camera);
  @@ -434,6 +439,8 @@
434 439 /* Rendering buffers.*/
435 440 GFXRTPool* _rtPool;
436 441
442 + std::pair<vec2<U16>, bool> _resolutionChangeQueued;
443 +
437 444 U8 _historyIndex;
438 445 vectorImpl<Texture_ptr> _prevDepthBuffers;
439 446
  @@ -469,11 +476,14 @@
469 476
470 477 SharedLock _graphicsResourceMutex;
471 478 vectorImpl<I64> _graphicResources;
479 +
472 480 /// Current viewport stack
473 481 vec4<I32> _viewport;
474 482 vec4<I32> _prevViewport;
475 483 vec4<I32> _baseViewport;
476 484
485 + vec2<U16> _renderingResolution;
486 +
477 487 GFXShaderData _gpuBlock;
478 488
479 489 typedef std::array<IndirectDrawCommand, Config::MAX_VISIBLE_NODES> DrawCommandList;
  @@ -536,14 +546,10 @@
536 546 device.blitToRenderTarget(targetID, targetViewport);
537 547 }
538 548
539 - static void onChangeWindowSize(GFXDevice& device, U16 w, U16 h) {
540 - device.setBaseViewport(vec4<I32>(0, 0, w, h));
541 - }
542 -
543 - static void onChangeRenderResolution(GFXDevice& device, U16 w, U16 h) {
544 - device.onChangeResolution(w, h);
549 + static void onSizeChange(GFXDevice& device, const SizeChangeParams& params) {
550 + device.onSizeChange(params);
545 551 }
546 -
552 +
547 553 friend class Divide::Kernel;
548 554 friend class Divide::Attorney::KernelApplication;
549 555 };