Added extra methods WindowSystemInterface for controlling frame rate and resolution, and adde useCursor flag.

This commit is contained in:
Robert Osfield
2007-01-17 21:11:57 +00:00
parent 3ebc5efe05
commit 552293eb03
7 changed files with 36 additions and 3 deletions

View File

@@ -75,6 +75,7 @@ class OSG_EXPORT GraphicsContext : public Referenced
face(0),
mipMapGeneration(false),
vsync(true),
useCursor(true),
sharedContext(0) {}
// graphics context orginal and size
@@ -114,6 +115,9 @@ class OSG_EXPORT GraphicsContext : public Referenced
// V-sync
bool vsync;
// enable cursor
bool useCursor;
// shared context
GraphicsContext* sharedContext;
};
@@ -125,7 +129,11 @@ class OSG_EXPORT GraphicsContext : public Referenced
virtual unsigned int getNumScreens(const ScreenIdentifier& screenIdentifier = ScreenIdentifier()) = 0;
virtual void getScreenResolution(const ScreenIdentifier& screenIdentifier, unsigned int& width, unsigned int& height) = 0;
virtual bool setScreenResolution(const ScreenIdentifier& /*screenIdentifier*/, unsigned int /*width*/, unsigned int /*height*/) { return false; }
virtual bool setScreenRefreshRate(const ScreenIdentifier& /*screenIdentifier*/, double /*refreshRate*/) { return false; }
virtual GraphicsContext* createGraphicsContext(Traits* traits) = 0;
virtual ~WindowingSystemInterface() {};