Rename Display to Window.
It makes more sense to be consistent and always call it window.
This commit is contained in:
parent
416a71f744
commit
24da7f45e0
33 changed files with 257 additions and 255 deletions
47
include/Spectre/Window/GLContext.h
Normal file
47
include/Spectre/Window/GLContext.h
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
|
||||
#ifndef SPECTRE_WINDOW_GLCONTEXT_H
|
||||
#define SPECTRE_WINDOW_GLCONTEXT_H
|
||||
|
||||
#include <Spectre/Math/Vector2.h>
|
||||
|
||||
namespace sp {
|
||||
|
||||
class PlatformWindow;
|
||||
|
||||
// Platform independant interface for OpenGL Contexts.
|
||||
|
||||
class GLContext
|
||||
{
|
||||
public :
|
||||
static GLContext* create();
|
||||
|
||||
virtual ~GLContext();
|
||||
|
||||
// Create a GLContext for this perticular window.
|
||||
virtual bool create(const PlatformWindow* window) = 0;
|
||||
|
||||
virtual void destroy() = 0;
|
||||
|
||||
// Activate this context.
|
||||
virtual bool activate() = 0;
|
||||
|
||||
// Deactivate this context.
|
||||
virtual bool deactivate() = 0;
|
||||
|
||||
// Returns true if this context is the active one. false otherwise.
|
||||
// There can only be one GL context active per thread.
|
||||
virtual bool isActive() const = 0;
|
||||
|
||||
// Set the interval for when the front and back framebuffers should be swapped.
|
||||
// The interval is the number of v-blanks that the gpu must wait before swapping buffers.
|
||||
// 0 means that the gpu never waits, 1 means after exactly 1 v-blank and so on.
|
||||
// This is usually refered to as enabling/disabling vertical synchronization.
|
||||
virtual bool setSwapInterval(int interval) = 0;
|
||||
|
||||
// Swap front with back buffer and vice versa.
|
||||
virtual void swapBuffers() = 0;
|
||||
};
|
||||
|
||||
} // namespace sp
|
||||
|
||||
#endif /* SPECTRE_WINDOW_GLCONTEXT_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue