Subversion Repository Public Repository

Divide-Framework

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

Diff Revisions 167 vs 168 for /trunk/Source Code/Hardware/Video/Buffers/FrameBufferObject/Headers/FrameBufferObject.h

Diff revisions: vs.
  @@ -35,18 +35,21 @@
35 35 virtual bool Create(U16 width, U16 height, U8 imageLayers = 0) = 0;
36 36
37 37 virtual void Destroy() = 0;
38 - virtual void DrawToLayer(U8 face, U8 layer) {} ///<Use by multilayerd FBO's
38 + virtual void DrawToLayer(U8 face, U8 layer) const {} ///<Use by multilayerd FBO's
39 39 virtual void Begin(U8 nFace=0) const = 0;
40 40 virtual void End(U8 nFace=0) const = 0;
41 41
42 - virtual void Bind(U8 unit = 0, U8 texture = 0);
43 - virtual void Unbind(U8 unit=0);
42 + virtual void Bind(U8 unit = 0, U8 texture = 0) const;
43 + virtual void Unbind(U8 unit=0) const ;
44 44
45 - virtual void BlitFrom(FrameBufferObject* inputFBO) = 0;
45 + virtual void BlitFrom(FrameBufferObject* inputFBO) const = 0;
46 46 //Enable/Disable color writes
47 47 virtual void toggleColorWrites(bool state) {_disableColorWrites = !state;}
48 48 //Enable/Disable the presence of a depth renderbuffer
49 49 virtual void toggleDepthBuffer(bool state) {_useDepthBuffer = state;}
50 + //Set the color the FBO will clear to when drawing to it
51 + inline void setClearColor(const vec4<F32>& clearColor) { _clearColor = clearColor; }
52 +
50 53 inline U16 getWidth() const {return _width;}
51 54 inline U16 getHeight() const {return _height;}
52 55 inline U8 getType() const {return _fboType;}
  @@ -56,7 +59,7 @@
56 59 virtual ~FrameBufferObject();
57 60
58 61 protected:
59 - virtual bool checkStatus() = 0;
62 + virtual bool checkStatus() const = 0;
60 63
61 64 protected:
62 65 typedef Unordered_map<TextureDescriptor::AttachmentType, TextureDescriptor > TextureAttachements;
  @@ -68,7 +71,7 @@
68 71 U32 _depthBufferHandle;
69 72 U32 _textureType;
70 73 U8 _fboType;
71 -
74 + vec4<F32> _clearColor;
72 75 TextureAttachements _attachement;
73 76 Unordered_map<TextureDescriptor::AttachmentType, bool > _attachementDirty;
74 77 };