Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members  

PLMVideoMode Class Reference

Simple object to get all video modes available. More...

#include <PLMVideoMode.hpp>

Inheritance diagram for PLMVideoMode:

Inheritance graph
[legend]
List of all members.

Public Types

enum  { NORMAL = 0, DOUBLE = SDL_DOUBLEBUF, OPENGL = SDL_OPENGL }

Public Methods

 PLMVideoMode ()
const SDL_VideoInfo * VideoInfo () const
int QueryModes (VideoMode **list, u32 flags=0, u32 depth=0) const
u32 NbInstances ()
u32 SDLState ()

Detailed Description

Simple object to get all video modes available.

Just instanciate and call QueryModes().


Member Enumeration Documentation

anonymous enum
 

Screen flags.

Enumeration values:
NORMAL  for standard mode
DOUBLE  double buffer mode
OPENGL  3D (OpenGL) mode


Constructor & Destructor Documentation

PLMVideoMode::PLMVideoMode  
 

Create a simple object to get informations on video hardware.


Member Function Documentation

const SDL_VideoInfo* PLMVideoMode::VideoInfo  
 

Get some informations on video hardware capabilities.

Note: if this method is called before any video initialisation (with PLMScreen for example), the resulting information describes the best mode available, otherwise it concerns the current video mode.

The information is returned in the following SDL structure, that should not be deleted or modified (SDL internals).

      struct SDL_VideoInfo {
        Uint32 hw_available:1;
        Uint32 wm_available:1;
        Uint32 blit_hw:1;
        Uint32 blit_hw_CC:1;
        Uint32 blit_hw_A:1;
        Uint32 blit_sw:1;
        Uint32 blit_sw_CC:1;
        Uint32 blit_sw_A:1;
        Uint32 blit_fill;
        Uint32 video_mem;
        SDL_PixelFormat *vfmt;
      };

int PLMVideoMode::QueryModes VideoMode **    list,
u32    flags = 0,
u32    depth = 0
const
 

Get a list of available video modes, sorted in decreasing sizes (largest first).

Parameters:
list  [out] if a list of modes is found, then an array is allocated and its address is stored in list. Note that the allocated array should be deleted after use (as a simple array). If the method returns 0 or -1, list is NULL.
flags  use an OR combination of the screen flags (NORMAL/DOUBLE or OPENGL)
depth  can be 8, 16, 24, 32 bits for a specific query or 0 for all modes,
Returns:
  • the size of the array allocated in list
  • 0 if no modes are found,
  • (-1) if any size is allowed (usually means windowed mode).

u32 PLMSDLMgr::NbInstances   [inline, inherited]
 

Get the current number of instances (classes using SDL).

u32 PLMSDLMgr::SDLState   [inline, inherited]
 

Get the current value of SDL flags (initialized sub-systems).


The documentation for this class was generated from the following file:
  • PLMVideoMode.hpp

Generated by Doxygen 1.2.18 on Tue Oct 26 12:07:39 2004.