343
edits
No edit summary |
No edit summary |
||
Line 238: | Line 238: | ||
=== Buffers === | === Buffers === | ||
A buffer represents a texture or, more generically, a region of GPU memory. | A buffer represents a texture or, more generically, a region of GPU memory. | ||
; name | {| class="wikitable" style="text-align: center; font-size: 85%; width: auto; table-layout: fixed; | ||
! scope="col" | Parameter Name | |||
! scope="col" | Optional | |||
! scope="col" | Value | |||
! scope="col" | Default Value | |||
! scope="col" | Description | |||
|- | |||
! scope="row"| <tt>name | |||
| {{No}} | |||
| string | |||
| | |||
| Passes will be able to address the buffer by this name | |||
|- | |||
! scope="row"| <tt>type</tt> | |||
| {{No}} | |||
| <tt>1d, 2d, 2d-array, 2d-multisample, 3d, rect, cubemap</tt> | |||
| | |||
| Any texture type allowed by OpenGL | |||
|- | |||
! scope="row"| <tt>width</tt> | |||
| {{No}} | |||
| Any unsigned integer or <tt>screen</tt> to use the physical viewport width | |||
| | |||
| Texture width | |||
|- | |||
! scope="row"| <tt>screen-width-scale</tt> | |||
| {{Yes}} | |||
| float | |||
| <tt>1.0</tt> | |||
| If <tt>screen</tt> was used, this controls the width scaling factor | |||
|- | |||
! scope="row"| <tt>height</tt> | |||
| {{No}} | |||
| Any unsigned integer or <tt>screen</tt> to use the physical viewport height | |||
| | |||
| Texture height | |||
|- | |||
! scope="row"| <tt>screen-height-scale</tt> | |||
| {{Yes}} | |||
| float | |||
| <tt>1.0</tt> | |||
| If <tt>screen</tt> was used, this controls the height scaling factor | |||
|- | |||
! scope="row"| <tt>depth</tt> | |||
| {{No}} | |||
| int | |||
| | |||
| Texture depth | |||
|- | |||
! scope="row"| <tt>format</tt> | |||
| {{Yes}} | |||
| See {{simgear file|simgear/scene/viewer/CompositorBuffer.cxx}} for the latest available values | |||
| <tt>rgba8</tt> | |||
| Specifies the texture format. It corresponds to the ''internalformat'', ''format'' and ''type'' arguments of the OpenGL function ''glTexImage2D'' | |||
|- | |||
! scope="row"| <tt>min-filter, mag-filter</tt> | |||
| {{Yes}} | |||
| <tt>linear, linear-mipmap-linear, linear-mipmap-nearest, nearest, nearest-mipmap-linear, nearest-mipmap-nearest</tt> | |||
| <tt>linear</tt> | |||
| Change the minification and magnification filtering respectively | |||
|- | |||
! scope="row"| <tt>wrap-s, wrap-t, wrap-r</tt> | |||
| {{Yes}} | |||
| <tt>clamp, clamp-to-edge, clamp-to-border, repeat, mirror</tt> | |||
| <tt>clamp-to-border</tt> | |||
| They change the wrap mode for each coordinate | |||
|} | |||
A typical [[PropertyList XML File|property tree structure]] describing a buffer may be as follows: | A typical [[PropertyList XML File|property tree structure]] describing a buffer may be as follows: | ||
Line 273: | Line 318: | ||
<screen-width-scale>1.5</screen-width-scale> | <screen-width-scale>1.5</screen-width-scale> | ||
<screen-height-scale>1.5</screen-height-scale> | <screen-height-scale>1.5</screen-height-scale> | ||
< | <format>rgba8</format> | ||
</buffer> | </buffer> | ||
</syntaxhighlight> | </syntaxhighlight> |
edits