Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
CVideoMode Class Reference

#include <VideoMode.h>

Public Member Functions

 CVideoMode ()
 
bool InitSDL ()
 Initialise the video mode, for use in an SDL-using application. More...
 
bool InitNonSDL ()
 Initialise parts of the video mode, for use in Atlas (which uses wxWidgets instead of SDL for GL). More...
 
void Shutdown ()
 Shut down after InitSDL/InitNonSDL, so that they can be used again. More...
 
bool ResizeWindow (int w, int h)
 Resize the SDL window and associated graphics stuff to the new size. More...
 
bool SetFullscreen (bool fullscreen)
 Switch to fullscreen or windowed mode. More...
 
bool ToggleFullscreen ()
 Switch between fullscreen and windowed mode. More...
 
int GetXRes ()
 
int GetYRes ()
 
int GetBPP ()
 
int GetDesktopXRes ()
 
int GetDesktopYRes ()
 
int GetDesktopBPP ()
 
int GetDesktopFreq ()
 
SDL_WindowGetWindow ()
 

Static Public Member Functions

static void UpdateRenderer (int w, int h)
 Update the graphics code to start drawing to the new size. More...
 

Private Member Functions

void ReadConfig ()
 
int GetBestBPP ()
 
bool SetVideoMode (int w, int h, int bpp, bool fullscreen)
 
void EnableS3TC ()
 

Private Attributes

bool m_IsInitialised
 Remember whether Init has been called. More...
 
SDL_Windowm_Window
 
int m_PreferredW
 
int m_PreferredH
 
int m_PreferredBPP
 
int m_PreferredFreq
 
int m_ConfigW
 
int m_ConfigH
 
int m_ConfigBPP
 
bool m_ConfigFullscreen
 
bool m_ConfigForceS3TCEnable
 
int m_WindowedW
 
int m_WindowedH
 
bool m_IsFullscreen
 
int m_CurrentW
 
int m_CurrentH
 
int m_CurrentBPP
 

Detailed Description

Definition at line 23 of file VideoMode.h.

Constructor & Destructor Documentation

CVideoMode::CVideoMode ( )

Definition at line 44 of file VideoMode.cpp.

Member Function Documentation

void CVideoMode::EnableS3TC ( )
private

Definition at line 316 of file VideoMode.cpp.

int CVideoMode::GetBestBPP ( )
private

Definition at line 455 of file VideoMode.cpp.

int CVideoMode::GetBPP ( )

Definition at line 476 of file VideoMode.cpp.

int CVideoMode::GetDesktopBPP ( )

Definition at line 494 of file VideoMode.cpp.

int CVideoMode::GetDesktopFreq ( )

Definition at line 500 of file VideoMode.cpp.

int CVideoMode::GetDesktopXRes ( )

Definition at line 482 of file VideoMode.cpp.

int CVideoMode::GetDesktopYRes ( )

Definition at line 488 of file VideoMode.cpp.

SDL_Window * CVideoMode::GetWindow ( )

Definition at line 506 of file VideoMode.cpp.

int CVideoMode::GetXRes ( )

Definition at line 464 of file VideoMode.cpp.

int CVideoMode::GetYRes ( )

Definition at line 470 of file VideoMode.cpp.

bool CVideoMode::InitNonSDL ( )

Initialise parts of the video mode, for use in Atlas (which uses wxWidgets instead of SDL for GL).

Currently this just tries to enable S3TC.

Definition at line 295 of file VideoMode.cpp.

bool CVideoMode::InitSDL ( )

Initialise the video mode, for use in an SDL-using application.

Definition at line 191 of file VideoMode.cpp.

void CVideoMode::ReadConfig ( )
private

Definition at line 54 of file VideoMode.cpp.

bool CVideoMode::ResizeWindow ( int  w,
int  h 
)

Resize the SDL window and associated graphics stuff to the new size.

Definition at line 338 of file VideoMode.cpp.

bool CVideoMode::SetFullscreen ( bool  fullscreen)

Switch to fullscreen or windowed mode.

Definition at line 363 of file VideoMode.cpp.

bool CVideoMode::SetVideoMode ( int  w,
int  h,
int  bpp,
bool  fullscreen 
)
private

Definition at line 66 of file VideoMode.cpp.

void CVideoMode::Shutdown ( void  )

Shut down after InitSDL/InitNonSDL, so that they can be used again.

Definition at line 308 of file VideoMode.cpp.

bool CVideoMode::ToggleFullscreen ( )

Switch between fullscreen and windowed mode.

Definition at line 424 of file VideoMode.cpp.

void CVideoMode::UpdateRenderer ( int  w,
int  h 
)
static

Update the graphics code to start drawing to the new size.

This should be called after the GL context has been resized. This can also be used when the GL context is managed externally, not via SDL.

Definition at line 429 of file VideoMode.cpp.

Member Data Documentation

int CVideoMode::m_ConfigBPP
private

Definition at line 102 of file VideoMode.h.

bool CVideoMode::m_ConfigForceS3TCEnable
private

Definition at line 104 of file VideoMode.h.

bool CVideoMode::m_ConfigFullscreen
private

Definition at line 103 of file VideoMode.h.

int CVideoMode::m_ConfigH
private

Definition at line 101 of file VideoMode.h.

int CVideoMode::m_ConfigW
private

Definition at line 100 of file VideoMode.h.

int CVideoMode::m_CurrentBPP
private

Definition at line 117 of file VideoMode.h.

int CVideoMode::m_CurrentH
private

Definition at line 116 of file VideoMode.h.

int CVideoMode::m_CurrentW
private

Definition at line 115 of file VideoMode.h.

bool CVideoMode::m_IsFullscreen
private

Definition at line 112 of file VideoMode.h.

bool CVideoMode::m_IsInitialised
private

Remember whether Init has been called.

(This isn't used for anything important, just for verifying that the callers call our methods in the right order.)

Definition at line 89 of file VideoMode.h.

int CVideoMode::m_PreferredBPP
private

Definition at line 96 of file VideoMode.h.

int CVideoMode::m_PreferredFreq
private

Definition at line 97 of file VideoMode.h.

int CVideoMode::m_PreferredH
private

Definition at line 95 of file VideoMode.h.

int CVideoMode::m_PreferredW
private

Definition at line 94 of file VideoMode.h.

SDL_Window* CVideoMode::m_Window
private

Definition at line 91 of file VideoMode.h.

int CVideoMode::m_WindowedH
private

Definition at line 109 of file VideoMode.h.

int CVideoMode::m_WindowedW
private

Definition at line 108 of file VideoMode.h.


The documentation for this class was generated from the following files: