* -*-c++-*- Producer - Copyright (C) 2001-2004  Don Burns
 *
 * This library is open source and may be redistributed and/or modified under
 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
 * (at your option) any later version.  The full license is in LICENSE file
 * included with this distribution, and on the openscenegraph.org website.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * OpenSceneGraph Public License for more details.
 */
#ifndef PRODUCER_RENDERSURFACE
#define PRODUCER_RENDERSURFACE

#include <Producer/Referenced>
#include <Producer/RefOpenThreads>

namespace Producer {

//============================================================================
// CLASS:  RenderSurface
/** Interface class for all RenderSurfaces to be used with Producer.
 */
//============================================================================
class RenderSurface : public Referenced, public OpenThreads::Thread
{
public:
  RenderSurface() {}

  virtual bool realize() { return true; }
  virtual void makeCurrent() {}
  virtual void swapBuffers() {}
  virtual void sync( int divisor=1 ) {}

  virtual void setWindowRectangle( int x, int y, unsigned int width, unsigned int height, bool resize=true ) = 0;
  virtual void getWindowRectangle( int &x, int &y, unsigned int &width, unsigned int &height ) const = 0;
  virtual void getScreenSize( unsigned int &width, unsigned int &height ) const = 0;

protected:
  virtual ~RenderSurface() {}
}; // class RenderSurface

} // namespace Producer

#endif  // RenderSurface_h
