TINYGL: Encapsulated pixel access in FrameBuffer class, provided an implementation of glBlendFunc.

This commit is contained in:
Stefano Musumeci 2014-06-18 00:14:55 +02:00
parent 10c25d49d4
commit 03072c4b7b
5 changed files with 286 additions and 85 deletions

View file

@ -85,6 +85,7 @@ FrameBuffer::FrameBuffer(int width, int height, const Graphics::PixelBuffer &fra
this->buffer.pbuf = this->pbuf.getRawBuffer();
this->buffer.zbuf = this->zbuf;
_blendingEnabled = false;
}
FrameBuffer::~FrameBuffer() {
@ -161,4 +162,13 @@ void FrameBuffer::setTexture(const Graphics::PixelBuffer &texture) {
current_texture = texture;
}
void FrameBuffer::setBlendingFactors( int sfactor, int dfactor ) {
_sourceBlendingFactor = sfactor;
_destinationBlendingFactor = dfactor;
}
void FrameBuffer::enableBlending(bool enableBlending) {
_blendingEnabled = enableBlending;
}
} // end of namespace TinyGL