OpenGLEAN
OpenGLEAN User Support
Home page | Introduction | Documentation | Files | Examples | Proposals | Authors | Links


OpenGLEAN Development
Summary | CVS | (discussion via home page) | (contact via home page) | (suggestion box) | License | Todo | Bugs

Video Mode
[OpenGLEAN API Reference]

Collaboration diagram for Video Mode:


Functions

void glutSetupVideoResizing (void)
void glutStopVideoResizing (void)
void glutVideoPan (int x, int y, int w, int h)
void glutVideoResize (int x, int y, int w, int h)
int glutVideoResizeGet (GLenum eWhat)

Detailed Description

OpenGLEAN inherited a stubbed out API for several video mode controls. They are not implemented at this time, but may be useful in replacing gamemode.

Because of defects in gamemode, and the promise of video mode controls to improve on the gamemode situation, these stubs will likely stay in place and be fully implemented.


Function Documentation

void glutSetupVideoResizing void   ) 
 

Initialized GLUT's video resizing support.

The apparent purpose of this function in old GLUT was twofold: First, to help old GLUT set up any minimal structures prior do doing actual resizes. Second, so that if you were not going to be able to resize the video display, you would be able to find out early. In the GLUT paradigm, of course, every operation succeeds or dies trying.

Except for the "die (early) trying" paradigm of GLUT, I do not think that there is any reason that we need to use this function. The actual resizing code can take care of initialization, on-demand. If, like window resizing, etc., we regard video resizing as a request to the window system (which may or may not be honored), there is no need at all for this routine, that I can see. (I suppose that the counter-balancing glutStopVideoResizing() provides a simpler way to restore the original video status, however...)

This function may or may not be retained.

Except with SGI extensions to glX, old GLUT would always produce a fatal error. (Old GLUT required: GLX_SGIX_video_resize)

In all cases, if testing GLUT_VIDEO_RESIZE_POSSIBLE (see glutVideoResizeGet()) returns 0, a fatal error will occur.

OpenGLEAN currently prints a warning if you call this function.

Note:
I'm not sure that this API entry point should be reatined.
See also:
glutVideoResizeGet(), glutSetupVideoResizing(), glutStopVideoResizing(), glutVideoResize(), glutVideoPan()

void glutStopVideoResizing void   ) 
 

Restore the video size, cleanup OpenGLEAN resizing.

In old GLUT, would set GLUT_VIDEO_RESIZE_IN_USE to 0 (see glutGetVideoResize()).

This function should restore the video mode to whatever it was when OpenGLEAN began video resizing, if OpenGLEAN has been doing any resizing. It should clean up the internal state in OpenGLEAN, if any, so that subsequent resizing can be done.

Note:
I'm not sure that this API entry point should be retained.

If multiple programs are fiddling with your video mode, it is not clear that we can reliably "restore" things to what they "should" be.

See also:
glutVideoResizeGet(), glutSetupVideoResizing(), glutStopVideoResizing(), glutVideoResize(), glutVideoPan()

void glutVideoPan int  x,
int  y,
int  w,
int  h
 

Set the video size and panning.

Parameters:
x A horizontal position.
y A vertical position.
w A width.
h A height.
This function is unimplemeneted.

This function appears to allow setting the video display rectangle to a sub-rectangle of the hardware buffer. x and y are apparently the upper left corner, and w and h are the width and height of the rectangle.

It is not clear what should be done if the values are invalid (negative x, for example).

Note:
There appear to be no safeguards in old GLUT against multiple programs requesting various video resizes.

Appears to be redundant of glutVideoResize().

See also:
glutVideoResizeGet(), glutSetupVideoResizing(), glutStopVideoResizing(), glutVideoResize(), glutVideoPan()

void glutVideoResize int  x,
int  y,
int  w,
int  h
 

Set the video size and panning.

Parameters:
x A horizontal position.
y A vertical position.
w A width.
h A height.
This function is unimplemeneted.

This function appears to allow setting the video display rectangle to a sub-rectangle of the hardware buffer. x and y are apparently the upper left corner, and w and h are the width and height of the rectangle.

It is not clear what should be done if the values are invalid (negative x, for example).

Note:
There appear to be no safeguards in old GLUT against multiple programs requesting various video resizes.

Appears to be redundant of glutVideoPan()

See also:
glutVideoResizeGet(), glutSetupVideoResizing(), glutStopVideoResizing(), glutVideoResize(), glutVideoPan()

int glutVideoResizeGet GLenum  eWhat  ) 
 

Query OpenGLEAN about video resizing.

Parameters:
eWhat An enumerated tag.
This function is only implemented in skeletal form.

From GLUT 3.7's implementation, the following is a list of symbols that GLUT 3.7 supported. These are not necessarily defined in OpenGLEAN at this time, nor is support presently available for them:

  • GLUT_VIDEO_RESIZE_POSSIBLE Old GLUT returns something called canVideoResize. This appears to be a run-time constant.
  • GLUT_VIDEO_RESIZE_IN_USE Old GLUT used this to determine if you had called glutSetupVideoResizing(), it seems, but had not since then called glutStopVideoResizing().
  • GLUT_VIDEO_RESIZE_X_DELTA Old GLUT appears to return init_x - curr_x. Or possibly the other way around...
  • GLUT_VIDEO_RESIZE_Y_DELTA Old GLUT appears to return init_y - curr_y. Or possibly the other way around...
  • GLUT_VIDEO_RESIZE_WIDTH_DELTA Old GLUT appears to return init_width - curr_width. Or possibly the other way around...
  • GLUT_VIDEORESIZE_HEIGHT_DELTA Old GLUT appears to return init_height - curr_height. Or possibly the other way around...
  • GLUT_VIDEO_REISZE_X Old GLUT appears to return the current x.
  • GLUT_VIDEO_RESIZE_Y Old GLUT appears to return the current y.
  • GLUT_VIDEO_RESIZE_WIDTH Old GLUT appears to return the current width.
  • GLUT_VIDEO_RESIZE_HEIGHT Old GLUT appears to return the current height.

A -1 should be returned for unimplemented features, and a warning printed.

Additionally, the GLUT_VIDEO_RESIZE_CHANNEL environment variable is consulted (value treated as a string representation of an integer).

See also:
glutVideoResizeGet(), glutSetupVideoResizing(), glutStopVideoResizing(), glutVideoResize(), glutVideoPan()




SourceForge.net Logo Supported in part by SourceForge.net.

Generated on Fri Sep 16 20:15:38 2005 for OpenGLEAN by doxygen 1.4.3
The OpenGLEAN project is hosted by olib.org and SourceForge.