Initial commit
This commit is contained in:
commit
edfc5298e1
252 changed files with 93965 additions and 0 deletions
76
include/Spectre/Display/Display.h
Normal file
76
include/Spectre/Display/Display.h
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
|
||||
#ifndef SPECTRE_DISPLAY_DISPLAY_H
|
||||
#define SPECTRE_DISPLAY_DISPLAY_H
|
||||
|
||||
#include "DisplayMode.h"
|
||||
#include "DisplayDescription.h"
|
||||
#include <Spectre/Display/GLContext.h>
|
||||
#include <Spectre/System/SystemEvent.h>
|
||||
#include <string>
|
||||
|
||||
class PlatformDisplay;
|
||||
class GLContext;
|
||||
|
||||
class Display
|
||||
{
|
||||
friend class PlatformDisplay;
|
||||
public :
|
||||
enum Mode {
|
||||
WINDOWED = 0,
|
||||
FULLSCREEN = 1,
|
||||
WINDOWEDFULLSCREEN = 2,
|
||||
};
|
||||
|
||||
public :
|
||||
Display();
|
||||
virtual ~Display();
|
||||
|
||||
bool create(DisplayDescription decription);
|
||||
|
||||
void destroy();
|
||||
|
||||
void setSize(unsigned int width, unsigned int height);
|
||||
|
||||
void setCaption(const std::string& title);
|
||||
|
||||
const std::string& getCaption() const;
|
||||
|
||||
void setIcon(const std::string& filename);
|
||||
|
||||
void setDisplayMode(const DisplayMode& mode);
|
||||
|
||||
const DisplayMode& getDisplayMode() const;
|
||||
|
||||
void setVideoMode(Mode mode);
|
||||
|
||||
enum Mode getVideoMode() const;
|
||||
|
||||
void showCursor(bool value);
|
||||
|
||||
bool activate(bool value);
|
||||
|
||||
// Enable/Disable Vertical Sync.
|
||||
bool enableVSync(bool value);
|
||||
|
||||
void swapBuffers();
|
||||
|
||||
protected :
|
||||
|
||||
void init();
|
||||
|
||||
void onReshape(int width, int height);
|
||||
|
||||
protected :
|
||||
enum Mode m_fmode;
|
||||
|
||||
DisplayDescription m_description;
|
||||
DisplayDescription m_cacheDesc;
|
||||
|
||||
std::string m_caption;
|
||||
|
||||
PlatformDisplay* m_impl;
|
||||
|
||||
GLContext* m_context;
|
||||
};
|
||||
|
||||
#endif /* SPECTRE_DISPLAY_DISPLAY_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue