Archon::Display::Screen Struct Reference

A screen descriptor. More...

#include <archon/display/screen.H>

Inheritance diagram for Archon::Display::Screen:

Inheritance graph
[legend]
Collaboration diagram for Archon::Display::Screen:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual Ref< ConnectiongetConnection ()=0
 Get the associated display connection.
virtual Ref< VisualgetDefaultVisual ()=0
 Get the descriptor of the default visual of this screen.
virtual Ref< VisualchooseVisual (bool doubleBuffer=true, bool stereo=false, int red=8, int green=8, int blue=8, int alpha=8, int depth=16, int stencil=0, int accumRed=0, int accumGreen=0, int accumBlue=0, int accumAlpha=0)=0 throw (NoSuchVisualException)
 Choose a visual based on the specified minimum requirements.
virtual int getNumberOfVisuals ()=0
 Get the number of visuals associated with this screen.
virtual Ref< VisualgetVisual (int index)=0 throw (out_of_range)
 Get the descriptor of the specified visual.
virtual int getWidth ()=0
 Get the horizontal size in pixels of this screen.
virtual int getHeight ()=0
 Get the vertical size in pixels of this screen.
virtual double getHorizontalDotPitch ()=0
 Get the horizontal distance between pixels on this screen .
virtual double getVerticalDotPitch ()=0
 Get the vertical distance between pixels on this screen.

Detailed Description

A screen descriptor.

A screen is one physical screen of a display.

On the X Window System this is a wrapper around screen number and the associated display connection.

Screen descriptors are obtained by various methods in the Connection class.

See also:
Connection

http://www.x.org

Definition at line 71 of file screen.H.


Member Function Documentation

virtual Ref<Visual> Archon::Display::Screen::chooseVisual bool  doubleBuffer = true,
bool  stereo = false,
int  red = 8,
int  green = 8,
int  blue = 8,
int  alpha = 8,
int  depth = 16,
int  stencil = 0,
int  accumRed = 0,
int  accumGreen = 0,
int  accumBlue = 0,
int  accumAlpha = 0
throw (NoSuchVisualException) [pure virtual]
 

Choose a visual based on the specified minimum requirements.

On the X Window System this is a wrapper around the glXChooseVisual function of Xlib.

Parameters:
doubleBuffer Set to true if you require a double-buffered visual. In this case you should call to Window::swapBuffers after rendering each frame.
stereo Set to true if you require a quad-buffered (or stereoscopic) visual. In this case, use glDrawBuffer() to switch between right and left buffers. In single-buffered stereoscopic mode you would alternate between GL_LEFT and GL_RIGHT, and in doublebuffered stereoscopic mode you would alternate between GL_BACK_LEFT and GL_BACK_RIGHT. Note also, that this mode is only available on special hardware with the stereoscopic capability.
red The minimum number of bits in the red buffer. If this value is zero, the smallest available red buffer is preferred. Otherwise, the largest available red buffer of at least the specified size is preferred. After the visual is created, you may call the getRed() method to retrieve the actual bit-width of the red buffer that was chosen.
green Just like parameter 'red'.
blue Just like parameter 'red'.
alpha Just like parameter 'red'.
depth Just like parameter 'red'.
stencil The minimum number of bits in the stencil buffer. The smallest available stencil buffer of at least the specified size is preferred. After the visual is created, you may call the getStencil() method to retrieve the actual bit-width of the red buffer that was chosen.
accumRed Just like parameter 'red'.
accumGreen Just like parameter 'red'.
accumBlue Just like parameter 'red'.
accumAlpha Just like parameter 'red'.
Exceptions:
NoSuchVisualException if one or more of the parameters could not be satisfied.
See also:
Visual

Implemented in Archon::Display::ScreenX11.

virtual Ref<Connection> Archon::Display::Screen::getConnection  )  [pure virtual]
 

Get the associated display connection.

Returns:
A connection to the display to which this screen belongs.

Implemented in Archon::Display::ScreenX11.

virtual Ref<Visual> Archon::Display::Screen::getDefaultVisual  )  [pure virtual]
 

Get the descriptor of the default visual of this screen.

Returns:
The descriptor of the default visual.
See also:
Visual

Implemented in Archon::Display::ScreenX11.

virtual int Archon::Display::Screen::getHeight  )  [pure virtual]
 

Get the vertical size in pixels of this screen.

Returns:
The height of this screen in pixels.

Implemented in Archon::Display::ScreenX11.

virtual double Archon::Display::Screen::getHorizontalDotPitch  )  [pure virtual]
 

Get the horizontal distance between pixels on this screen .

Returns:
The horizontal distance between pixels in meters.

Implemented in Archon::Display::ScreenX11.

virtual int Archon::Display::Screen::getNumberOfVisuals  )  [pure virtual]
 

Get the number of visuals associated with this screen.

Returns:
The number of available visuals.
See also:
Visual

Implemented in Archon::Display::ScreenX11.

virtual double Archon::Display::Screen::getVerticalDotPitch  )  [pure virtual]
 

Get the vertical distance between pixels on this screen.

Returns:
The vertical distance between pixels in meters.

Implemented in Archon::Display::ScreenX11.

virtual Ref<Visual> Archon::Display::Screen::getVisual int  index  )  throw (out_of_range) [pure virtual]
 

Get the descriptor of the specified visual.

Parameters:
index The visual index.
Returns:
A visual descriptor.
See also:
Visual

Implemented in Archon::Display::ScreenX11.

virtual int Archon::Display::Screen::getWidth  )  [pure virtual]
 

Get the horizontal size in pixels of this screen.

Returns:
The width of this screen in pixels.

Implemented in Archon::Display::ScreenX11.


The documentation for this struct was generated from the following file:
Generated on Sun Jul 30 22:56:48 2006 for Archon by  doxygen 1.4.4