Subversion Repository Public Repository

Divide-Framework

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

Diff Revisions 556 vs 557 for /trunk/Source Code/Platform/Video/Headers/GFXDevice.h

Diff revisions: vs.
  @@ -82,7 +82,7 @@
82 82 friend class Attorney::GFXDeviceGPUState;
83 83 friend class Attorney::GFXDeviceRenderStateBlock;
84 84 protected:
85 - typedef hashMapImpl<size_t, RenderStateBlock> RenderStateMap;
85 + typedef hashMapImpl<U32, RenderStateBlock> RenderStateMap;
86 86 typedef std::stack<vec4<I32>> ViewportStack;
87 87
88 88 struct NodeData {
  @@ -269,10 +269,8 @@
269 269 const vectorImpl<Line>& lines,
270 270 const vec4<I32>& viewport, //<only for ortho mode
271 271 const bool inViewport = false);
272 - void drawPoints(U32 numPoints, size_t stateHash,
273 - ShaderProgram* const shaderProgram);
274 - void drawTriangle(size_t stateHash,
275 - ShaderProgram* const shaderProgram);
272 + void drawPoints(U32 numPoints, U32 stateHash, ShaderProgram* const shaderProgram);
273 + void drawTriangle(U32 stateHash, ShaderProgram* const shaderProgram);
276 274 void drawRenderTarget(Framebuffer* renderTarget, const vec4<I32>& viewport);
277 275
278 276 void postProcessRenderTarget(RenderTarget renderTarget);
  @@ -300,7 +298,7 @@
300 298 inline void resetClipPlanes();
301 299 /// Retrieve a state block by hash value.
302 300 /// If the hash value doesn't exist in the state block map, return the default state block
303 - const RenderStateBlock& getRenderStateBlock(size_t renderStateBlockHash) const;
301 + const RenderStateBlock& getRenderStateBlock(U32 renderStateBlockHash) const;
304 302
305 303 /// Generate a cubemap from the given position
306 304 /// It renders the entire scene graph (with culling) as default
  @@ -376,7 +374,7 @@
376 374 inline void anaglyphEnabled(const bool state) { _enableAnaglyph = state; }
377 375
378 376 /// returns the standard state block
379 - inline size_t getDefaultStateBlock(bool noDepth = false) {
377 + inline U32 getDefaultStateBlock(bool noDepth = false) {
380 378 return noDepth ? _defaultStateNoDepthHash : _defaultStateBlockHash;
381 379 }
382 380
  @@ -501,7 +499,7 @@
501 499 }
502 500
503 501 inline void drawText(const TextLabel& text,
504 - size_t stateHash,
502 + U32 stateHash,
505 503 const vec2<F32>& relativeOffset) {
506 504 uploadGPUBlock();
507 505 setStateBlock(stateHash);
  @@ -566,7 +564,7 @@
566 564 bool registerRenderStateBlock(const RenderStateBlock& stateBlock);
567 565
568 566 /// Sets the current state block to the one passed as a param
569 - size_t setStateBlock(size_t stateBlockHash);
567 + U32 setStateBlock(U32 stateBlockHash);
570 568 ErrorCode createAPIInstance();
571 569
572 570 NodeData& processVisibleNode(SceneGraphNode_wptr node, U32 dataIndex);
  @@ -597,14 +595,14 @@
597 595 /*State management */
598 596 RenderStateMap _stateBlockMap;
599 597 bool _stateBlockByDescription;
600 - size_t _currentStateBlockHash;
601 - size_t _previousStateBlockHash;
602 - size_t _defaultStateBlockHash;
598 + U32 _currentStateBlockHash;
599 + U32 _previousStateBlockHash;
600 + U32 _defaultStateBlockHash;
603 601 /// The default render state buth with depth testing disabled
604 - size_t _defaultStateNoDepthHash;
602 + U32 _defaultStateNoDepthHash;
605 603 /// Special render state for 2D rendering
606 - size_t _state2DRenderingHash;
607 - size_t _stateDepthOnlyRenderingHash;
604 + U32 _state2DRenderingHash;
605 + U32 _stateDepthOnlyRenderingHash;
608 606 /// The interpolation factor between the current and the last frame
609 607 D32 _interpolationFactor;
610 608 PlaneList _clippingPlanes;
  @@ -655,7 +653,7 @@
655 653 class GFXDeviceGUI {
656 654 private:
657 655 static void drawText(const TextLabel& text,
658 - size_t stateHash,
656 + U32 stateHash,
659 657 const vec2<F32>& relativeOffset) {
660 658 return GFXDevice::getInstance().drawText(text, stateHash, relativeOffset);
661 659 }