Added State::glDrawBuffer/glReadBuffer() method to implement lazy state updating for glDrawBuffer and glReadBuffer
This commit is contained in:
@@ -303,6 +303,14 @@ class OSG_EXPORT State : public Referenced
|
||||
/** Apply any shader composed state.*/
|
||||
void applyShaderComposition();
|
||||
|
||||
|
||||
void glDrawBuffer(GLenum buffer);
|
||||
GLenum getDrawBuffer() const { return _drawBuffer; }
|
||||
|
||||
void glReadBuffer(GLenum buffer);
|
||||
GLenum getReadBuffer() const { return _readBuffer; }
|
||||
|
||||
|
||||
/** Set whether a particular OpenGL mode is valid in the current graphics context.
|
||||
* Use to disable OpenGL modes that are not supported by current graphics drivers/context.*/
|
||||
inline void setModeValidity(StateAttribute::GLMode mode,bool valid)
|
||||
@@ -1079,6 +1087,9 @@ class OSG_EXPORT State : public Referenced
|
||||
|
||||
ref_ptr<FrameStamp> _frameStamp;
|
||||
|
||||
GLenum _drawBuffer;
|
||||
GLenum _readBuffer;
|
||||
|
||||
ref_ptr<const RefMatrix> _identity;
|
||||
ref_ptr<const RefMatrix> _initialViewMatrix;
|
||||
ref_ptr<const RefMatrix> _projection;
|
||||
|
||||
Reference in New Issue
Block a user