1
0
Fork 0
spectre/include/Spectre/Display/DisplayMode.h
Henrik Hautakoski e10daeaaa6
Move everything from global namespace to "sp" namespace
When writing the X11 (linux) implementation there was a problem with X11 defining a "Display" type and we also have a Display class in the engine.

So to fix that problem and minimize the risk for running into other name conflicts. We move everything from global namespace.
2019-09-30 19:10:17 +02:00

39 lines
No EOL
715 B
C++

#ifndef SPECTRE_DISPLAY_DISPLAYMODE_H
#define SPECTRE_DISPLAY_DISPLAYMODE_H
#include <vector>
namespace sp {
class DisplayMode
{
public :
DisplayMode();
DisplayMode(unsigned int width, unsigned int height, unsigned int bpp = 32);
static std::vector<DisplayMode> getFullscreenModes();
static DisplayMode getDesktopMode();
inline bool operator==(const DisplayMode& other)
{
return width == other.width
&& height == other.height
&& bpp == other.bpp;
}
inline bool operator!=(const DisplayMode& other)
{
return !(*this == other);
}
public :
unsigned int width;
unsigned int height;
unsigned int bpp; /* Bits per pixel. */
};
} // namespace sp
#endif /* SPECTRE_DISPLAY_DISPLAYMODE_H */