#ifndef UI_GL_SCOPED_BINDERS_H_
#define UI_GL_SCOPED_BINDERS_H_
#include "base/basictypes.h"
#include "ui/gl/gl_export.h"
namespace gfx {
class GLStateRestorer;
class GL_EXPORT ScopedFrameBufferBinder {
public:
explicit ScopedFrameBufferBinder(unsigned int fbo);
~ScopedFrameBufferBinder();
private:
GLStateRestorer* state_restorer_;
int old_fbo_;
DISALLOW_COPY_AND_ASSIGN(ScopedFrameBufferBinder);
};
class GL_EXPORT ScopedTextureBinder {
public:
ScopedTextureBinder(unsigned int target, unsigned int id);
~ScopedTextureBinder();
private:
GLStateRestorer* state_restorer_;
int target_;
int old_id_;
DISALLOW_COPY_AND_ASSIGN(ScopedTextureBinder);
};
}
#endif