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/OpenGL/Buffers/FrameBufferObject/Headers/glFrameBufferObject.h

Diff revisions: vs.
  @@ -31,33 +31,35 @@
31 31
32 32 glFrameBufferObject(FBOType type) : FrameBufferObject(type)
33 33 {
34 - _textureId[0] = 0;
35 - _textureId[1] = 0;
36 - _textureId[2] = 0;
37 - _textureId[3] = 0;
38 - _depthId = 0;
39 - _imageLayers = 0;
34 + memset(_textureId, 0, 4 * sizeof(GLuint));
35 + _depthId = _imageLayers = 0;
36 + }
37 +
38 + virtual ~glFrameBufferObject()
39 + {
40 40 }
41 - virtual ~glFrameBufferObject() {}
42 41
43 42 virtual bool Create(GLushort width, GLushort height, GLubyte imageLayers = 0);
44 43 virtual void Destroy();
45 - virtual void DrawToLayer(GLubyte face, GLubyte layer) {} ///<Use by multilayerd FBO's
44 + virtual void DrawToLayer(GLubyte face, GLubyte layer) const
45 + {
46 + } ///<Use by multilayerd FBO's
46 47
47 48 virtual void Begin(GLubyte nFace=0) const;
48 49 virtual void End(GLubyte nFace=0) const;
49 - virtual void Bind(GLubyte unit=0, GLubyte texture = 0);
50 - virtual void Unbind(GLubyte unit=0);
50 + virtual void Bind(GLubyte unit=0, GLubyte texture = 0) const;
51 + virtual void Unbind(GLubyte unit=0) const;
51 52
52 - void BlitFrom(FrameBufferObject* inputFBO);
53 + void BlitFrom(FrameBufferObject* inputFBO) const;
53 54
54 55 protected:
55 - bool checkStatus();
56 + bool checkStatus() const;
56 57
57 58 protected:
58 59 GLuint _textureId[4]; ///<Color attachements
59 60 GLuint _depthId; ///<Depth attachement
60 61 GLuint _imageLayers;
62 + GLuint _clearBufferMask;
61 63 };
62 64
63 65 #endif