1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-26 07:25:53 +00:00
QB64-PE/internal/help/_glViewport.txt
SMcNeill 6e01fc8dce Altered string compare routines (<,<=,>,>=) so they don't give false results with CHR$(0).
Added new _STRCMP and _STRICMP commands for quick string comparisons.
Cleaned up QB64 to finish removing the QUI (quick user insert) code and folders.
Altered UCASE and LCASE routines to be faster in some situations for us.
2014-09-22 08:19:03 -04:00

45 lines
1.7 KiB
Plaintext

'''_glViewport:''' set the viewport
{{PageSyntax}}
SUB _glViewport (BYVAL x AS LONG, BYVAL y AS LONG, BYVAL width AS LONG, BYVAL height AS LONG)
void '''_glViewport'''(GLint {{Parameter|x}}, GLint {{Parameter|y}}, GLsizei {{Parameter|width}}, GLsizei {{Parameter|height}});
; x, y
: Specify the lower left corner of the viewport rectangle, in pixels. The initial value is (0,0).
; width, height
: Specify the width and height of the viewport. When a GL context is first attached to a window, {{Parameter|width}} and {{Parameter|height}} are set to the dimensions of that window.
{{PageDescription}}
'''_glViewport''' specifies the affine transformation of ''x'' and ''y'' from normalized device coordinates to window coordinates. Let (x&amp;lt;sub&amp;gt;nd&amp;lt;/sub&amp;gt;, y&amp;lt;sub&amp;gt;nd&amp;lt;/sub&amp;gt;) be normalized device coordinates. Then the window coordinates (x&amp;lt;sub&amp;gt;w&amp;lt;/sub&amp;gt;, y&amp;lt;sub&amp;gt;w&amp;lt;/sub&amp;gt;) are computed as follows:
{{glapi viewport equations}}
Viewport width and height are silently clamped to a range that depends on the implementation. To query this range, call {{KW|_glGet}} with argument {{KW|_GL_MAX_VIEWPORT_DIMS}}.
{{PageErrors}}
{{KW|_GL_INVALID_VALUE}} is generated if either {{Parameter|width}} or {{Parameter|height}} is negative.
{{PageUseWith}}
{{KW|_glGet}} with argument {{KW|_GL_VIEWPORT}}
{{KW|_glGet}} with argument {{KW|_GL_MAX_VIEWPORT_DIMS}}
{{PageSeeAlso}}
{{KW|_GL}}
{{KW|_glDepthRange}}, {{KW|_glViewportArray}}, {{KW|_glViewportIndexed}}
{{PageCopyright}}
Copyright 1991-2006 Silicon Graphics, Inc. This document is licensed under the SGI Free Software B License. For details, see [http://oss.sgi.com/projects/FreeB/ http://oss.sgi.com/projects/FreeB/].