TINYGL: Encapsulated pixel access in FrameBuffer class, provided an implementation of glBlendFunc.
This commit is contained in:
parent
10c25d49d4
commit
03072c4b7b
5 changed files with 286 additions and 85 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue