Subversion Repository Public Repository

Divide-Framework

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

Diff Revisions 330 vs 331 for /trunk/Source Code/Hardware/Video/Headers/GFXDevice.h

Diff revisions: vs.
  @@ -90,8 +90,11 @@
90 90 /// Render specified function inside of a viewport of specified dimensions and position
91 91 inline void renderInViewport(const vec4<I32>& rect, const DELEGATE_CBK<>& callback);
92 92
93 - /// Returns an immediate mode emulation buffer that can be used to construct geometry in a vertex by vertex manner.
94 - /// AllowPrimitiveRecycle = do not reuse old primitives and do not delete it after x-frames. (Don't use the primitive zombie feature)
93 + /**
94 + *@brief Returns an immediate mode emulation buffer that can be used to construct geometry in a vertex by vertex manner.
95 + *@param allowPrimitiveRecycle If false, do not reuse old primitives and do not delete it after x-frames.
96 + *(Don't use the primitive zombie feature)
97 + */
95 98 IMPrimitive* getOrCreatePrimitive(bool allowPrimitiveRecycle = true);
96 99
97 100 inline void setInterpolation(const D32 interpolation) {_interpolationFactor = interpolation; }
  @@ -126,7 +129,9 @@
126 129 ///@param renderStageMask Is a bitmask of the stages we whish to check if active
127 130 inline bool isCurrentRenderStage(U8 renderStageMask);
128 131 /// Some Scene Node Types are excluded from certain operations (lights triggers, etc)
129 - inline bool excludeFromStateChange(const SceneNodeType& currentType) { return (_stateExclusionMask & currentType) == currentType ? true : false; }
132 + inline bool excludeFromStateChange(const SceneNodeType& currentType) {
133 + return (_stateExclusionMask & currentType) == currentType;
134 + }
130 135 inline void setStateChangeExclusionMask(I32 stateMask) { _stateExclusionMask = stateMask; }
131 136
132 137 inline void setPrevShaderId(const U32& id) { _prevShaderId = id; }
  @@ -159,11 +164,15 @@
159 164 inline bool anaglyphEnabled() const { return _enableAnaglyph; }
160 165 inline void anaglyphEnabled(const bool state) { _enableAnaglyph = state; }
161 166
162 - /// Return or create a new state block using the given descriptor. DO NOT DELETE THE RETURNED STATE BLOCK! GFXDevice handles that!
167 + /// Return or create a new state block using the given descriptor.
168 + /// DO NOT DELETE THE RETURNED STATE BLOCK! GFXDevice handles that!
163 169 size_t getOrCreateStateBlock(const RenderStateBlockDescriptor& descriptor);
164 170 const RenderStateBlockDescriptor& getStateBlockDescriptor(size_t renderStateBlockHash) const;
165 171 ///returns the standard state block
166 - inline size_t getDefaultStateBlock(bool noDepth = false) { return noDepth ? _defaultStateNoDepthHash : _defaultStateBlockHash; }
172 + inline size_t getDefaultStateBlock(bool noDepth = false) {
173 + return noDepth ? _defaultStateNoDepthHash :
174 + _defaultStateBlockHash;
175 + }
167 176 inline Framebuffer* getRenderTarget(RenderTarget target) const { return _renderTarget[target]; }
168 177
169 178 ///Generate a cubemap from the given position
  @@ -269,7 +278,9 @@
269 278 }
270 279
271 280 inline void loadingThreadAvailable(bool state) { _loadingThreadAvailable = state; }
272 - inline void uploadDrawCommands(const vectorImpl<IndirectDrawCommand>& drawCommands) const { _api->uploadDrawCommands(drawCommands); }
281 + inline void uploadDrawCommands(const vectorImpl<IndirectDrawCommand>& drawCommands) const {
282 + _api->uploadDrawCommands(drawCommands);
283 + }
273 284
274 285 protected:
275 286 friend class Kernel;
  @@ -307,8 +318,12 @@
307 318 /// returns false if there was an invalid state detected that could prevent rendering
308 319 bool setBufferData(const GenericDrawCommand& cmd);
309 320 ///Update the graphics pipeline using the current rendering API with the state block passed
310 - inline void activateStateBlock(const RenderStateBlock& newBlock, RenderStateBlock* const oldBlock) const { _api->activateStateBlock(newBlock, oldBlock); }
311 - inline void drawText(const TextLabel& textLabel, const vec2<I32>& position) { _api->drawText(textLabel, position); }
321 + inline void activateStateBlock(const RenderStateBlock& newBlock, RenderStateBlock* const oldBlock) const {
322 + _api->activateStateBlock(newBlock, oldBlock);
323 + }
324 + inline void drawText(const TextLabel& textLabel, const vec2<I32>& position) {
325 + _api->drawText(textLabel, position);
326 + }
312 327 ///Sets the current state block to the one passed as a param
313 328 size_t setStateBlock(size_t stateBlockHash);
314 329 ErrorCode createAPIInstance();