GFXInit Class Reference

#include <gfxInit.h>

List of all members.


Detailed Description

Interface for tracking GFX adapters and initializing them into devices.

Note:
Implement this class per platform.

This is just a class so it can be friends with GFXDevice)


Public Types

typedef Signal< void(Vector<
GFXAdapter * > &)> 
RegisterDeviceSignal
 Allows device to register themselves as available.

Static Public Member Functions

static RegisterDeviceSignalgetRegisterDeviceSignal ()
static void init ()
 Prepares the adapter list.
static GFXDevicecreateDevice (GFXAdapter *adapter)
 Creates a GFXDevice based on an adapter from the enumerateAdapters method.
static void enumerateAdapters ()
 Enumerate all the graphics adapters on the system.
static void getAdapters (Vector< GFXAdapter * > *adapters)
 Get the enumerated adapters.
static S32 getAdapterCount ()
 Get the number of available adapters.
static GFXAdapterchooseAdapter (GFXAdapterType type)
 Chooses a suitable GFXAdapter, based on type, preferences, and fallbacks.
static GFXAdaptergetAdapterOfType (GFXAdapterType type)
 Gets the first adapter of the requested type from the list of enumerated adapters.
static const char * getAdapterNameFromType (GFXAdapterType type)
 Converts a GFXAdapterType to a string name. Useful for writing out prefs.
static GFXAdapterType getAdapterTypeFromName (const char *name)
 Converts a string to a GFXAdapterType. Useful for reading in prefs.
static GFXVideoMode getDesktopResolution ()
 Returns a GFXVideoMode that describes the current state of the main monitor.
static GFXAdaptergetBestAdapterChoice ()
 Based on user preferences (or in the absence of a valid user selection, a heuristic), return a "best" adapter.
static GFXVideoMode getInitialVideoMode ()
 Get the initial video mode based on user preferences (or a heuristic).

Static Private Attributes

static Vector< GFXAdapter * > smAdapters
 List of known adapters.
static RegisterDeviceSignalsmRegisterDeviceSignal


Member Typedef Documentation

Allows device to register themselves as available.


Member Function Documentation

static RegisterDeviceSignal& GFXInit::getRegisterDeviceSignal (  )  [static]

static void GFXInit::init (  )  [static]

Prepares the adapter list.

static GFXDevice* GFXInit::createDevice ( GFXAdapter adapter  )  [static]

Creates a GFXDevice based on an adapter from the enumerateAdapters method.

Parameters:
adapter Graphics adapter to create device

static void GFXInit::enumerateAdapters (  )  [static]

Enumerate all the graphics adapters on the system.

static void GFXInit::getAdapters ( Vector< GFXAdapter * > *  adapters  )  [static]

Get the enumerated adapters.

Should only call this after a call to enumerateAdapters.

static S32 GFXInit::getAdapterCount (  )  [static]

Get the number of available adapters.

static GFXAdapter* GFXInit::chooseAdapter ( GFXAdapterType  type  )  [static]

Chooses a suitable GFXAdapter, based on type, preferences, and fallbacks.

If the requested type is omitted, we use the prefs value. If the requested type isn't found, we use fallbacks: OpenGL, NullDevice This method never returns NULL.

static GFXAdapter* GFXInit::getAdapterOfType ( GFXAdapterType  type  )  [static]

Gets the first adapter of the requested type from the list of enumerated adapters.

Should only call this after a call to enumerateAdapters.

static const char* GFXInit::getAdapterNameFromType ( GFXAdapterType  type  )  [static]

Converts a GFXAdapterType to a string name. Useful for writing out prefs.

static GFXAdapterType GFXInit::getAdapterTypeFromName ( const char *  name  )  [static]

Converts a string to a GFXAdapterType. Useful for reading in prefs.

static GFXVideoMode GFXInit::getDesktopResolution (  )  [static]

Returns a GFXVideoMode that describes the current state of the main monitor.

This should probably move to the abstract window manager

static GFXAdapter* GFXInit::getBestAdapterChoice (  )  [static]

Based on user preferences (or in the absence of a valid user selection, a heuristic), return a "best" adapter.

static GFXVideoMode GFXInit::getInitialVideoMode (  )  [static]

Get the initial video mode based on user preferences (or a heuristic).


Member Data Documentation

Vector<GFXAdapter*> GFXInit::smAdapters [static, private]

List of known adapters.