Additions:
graphics hardware manufactured before the year 2007. If a value of 1 is
provided, asking for 16 bit floating point textures, but the graphics hardware
does not support this, then PTB tries to allocate a 15 bit precision signed
integer texture instead, assuming the graphics hardware supports that. Such a
texture is more precise than the 16 bit floating point texture it replaces, but
can not store values outside the range [-1.0; 1.0].
Deletions:
graphics hardware manufactured before the year 2007.
Additions:
index which may be passed to 'DrawTexture' to specify the texture.
In the the OpenGL Psychtoolbox textures replace offscreen windows for fast
drawing of images during animation.The imageMatrix argument may consist of one
monochrome plane (Luminance), LA planes, RGB planes, or RGBA planes where A is
alpha, the transparency of a pixel. Alpha values typically range between zero
(=fully transparent) and 255 (=fully opaque). You need to enable Alpha-Blending
via [[Screen]]('BlendFunction',...) for the transparency values to have an effect.
The argument 'optimizeForDrawAngle' if provided, asks Psychtoolbox to optimize
the texture for especially fast drawing at the specified rotation angle. The
default is 0 ""=="" Optimize for upright drawing. If 'specialFlags' is set to 1 and
the width and height of the imageMatrix are powers of two (e.g., 64 x 64, 256 x
256, 512 x 512, ...), then the texture is created as an OpenGL power-of-two
texture of type GL_TEXTURE_2D. Otherwise Psychtoolbox will try to pick the most
optimal format for fast drawing and low memory consumption. Power-of-two
textures are especially useful for animation of drifting gratings (see the
demos) and for simple use with the OpenGL 3D graphics functions.
If 'specialFlags' is set to 2 then PTB will try to use its own high quality
texture filtering algorithm for drawing of bilinearly filtered textures instead
of the hardwares built-in method. This only works on modern hardware with
fragment shader support and is slower than using the hardwares built in
filtering, but it may provide higher precision on some hardware. PTB
automatically enables its own filter algorithm when used with floating point
textures or when [[Screen]]('ColorRange') is used to enable unclamped color
processing: PTB will check if your hardware is capable of unrestricted high
precision color processing in that case. If your hardware can't guarantee high
precision, PTB will enable its own shader-based workarounds to provide higher
precision at the cost of lower speed.
graphics hardware manufactured before the year 2007.
'textureOrientation' This optional argument labels textures with a special
orientation. Normally (value 0) a Matlab matrix is passed in standard Matlab
column-major dataformat. This is efficient for drawing of textures but not for
processing them via [[Screen]]('TransformTexture'). Therefore textures need to be
transformed on demand if used that way. This flag allows to short-cut the
process: A setting of 1 will ask for immediate conversion into the optimized
format. A setting of 2 will tell PTB that the Matlab matrix has been already
converted into optimal format, so no further processing is needed. A value of 3
tells PTB that the texture is completely isotropic, with no real orientation,
therefore no conversion is required. This latter setting only makes sense for
random noise textures or other textures generated from a distribution with
uncorrelated noise-like pixels, e.g., some power spectrum distribution.
per-pixel parameters as input for some formula to compute the real image during
virtual textures which only consist of such a shader and some virtual size, but
Deletions:
index which may be passed to 'DrawTexture' to specify the texture. In the the OS
X Psychtoolbox textures replace offscreen windows for fast drawing of images
during animation.The imageMatrix argument may consist of one monochrome plane
(Luminance), LA planes, RGB planes, or RGBA planes where A is alpha, the
transparency of a pixel. Alpha values range between zero (=fully transparent)
and 255 (=fully opaque). You need to enable Alpha-Blending via
[[Screen]]('BlendFunction',...) for the transparency values to have an effect. The
argument 'optimizeForDrawAngle' if provided, asks Psychtoolbox to optimize the
texture for especially fast drawing at the specified rotation angle. The default
is 0 ""=="" Optimize for upright drawing. If 'specialFlags' is set to 1 and the
width and height of the imageMatrix are powers of two (e.g., 64 x 64, 256 x 256,
512 x 512, ...), then the texture is created as an OpenGL power-of-two texture
of type GL_TEXTURE_2D. Otherwise Psychtoolbox will try to pick the most optimal
format for fast drawing and low memory consumption. Power-of-two textures are
especially useful for animation of drifting gratings (see the demos) and for
simple use with the OpenGL 3D graphics functions. If 'specialFlags' is set to 2
then PTB will try to use its own high quality texture filtering algorithm for
drawing of bilinearly filtered textures instead of the hardwares built-in
method. This only works on modern hardware with fragment shader support and is
slower than using the hardwares built in filtering, but it may provide higher
precision on some hardware. Please note that PTB automatically enables its own
filter algorithm when used with floating point textures or when
[[Screen]]('ColorRange') is used to enable unclamped color processing: PTB will
check if your hardware is capable of unrestricted high precision color
processing in that case. If your hardware can't guarantee high precision, PTB
will enable its own shader-based workarounds to provide higher precision at the
cost of lower speed.
graphics hardware manufactured before the year 2007. 'textureOrientation' This
optional argument labels textures with a special orientation. Normally (value 0)
a Matlab matrix is passed in standard Matlab column-major dataformat. This is
efficient for drawing of textures but not for processing them via
[[Screen]]('TransformTexture'). Therefore textures need to be transformed on demand
if used that way. This flag allows to short-cut the process: A setting of 1 will
ask for immediate conversion into the optimized format. A setting of 2 will tell
PTB that the Matlab matrix has been already converted into optimal format, so no
further processing is needed. A value of 3 tells PTB that the texture is
completely isotropic, with no real orientation,therefore no conversion is
required. This latter setting only makes sense for random noise textures or
other textures generated from a distribution with uncorrelated noise-like
pixels, e.g., some power spectrum distribution.
per-pixel parameters is input for some formula to compute the real image during
virtual textures, that only consist of such a shader and some virtual size, but
Additions:
""<div class="subfct" id="Screen">""===[[MakeTexture Screen('MakeTexture')]]===
Deletions:
""<div class="subfct" id="Screen" style="background-color:#eee; padding:1em; border-width:1px; border-style:solid; border-color:#ddd; margin-bottom: 2em;border-top: 5px solid #999999;">""===[[MakeTexture Screen('MakeTexture')]]===
Additions:
""<div class="subfct" id="Screen" style="background-color:#eee; padding:1em; border-width:1px; border-style:solid; border-color:#ddd; margin-bottom: 2em;border-top: 5px solid #999999;">""===[[MakeTexture Screen('MakeTexture')]]===
DrawTexture TransformTexture BlendFunction<<""</div>""
Deletions:
===[[MakeTexture Screen('MakeTexture')]]===
DrawTexture TransformTexture BlendFunction<<
Additions:
===[[MakeTexture Screen('MakeTexture')]]===
==[[Psychtoolbox]] › [[Screen]].{mex*,dll} subfunction==
%%(matlab;Usage)textureIndex=Screen('MakeTexture', WindowIndex, imageMatrix [, optimizeForDrawAngle=0] [, specialFlags=0] [, floatprecision=0] [, textureOrientation=0] [, textureShader=0]);%%
[[Screen]]('BlendFunction',...) for the transparency values to have an effect. The
is 0 ""=="" Optimize for upright drawing. If 'specialFlags' is set to 1 and the
then PTB will try to use its own high quality texture filtering algorithm for
filter algorithm when used with floating point textures or when
[[Screen]]('ColorRange') is used to enable unclamped color processing: PTB will
check if your hardware is capable of unrestricted high precision color
processing in that case. If your hardware can't guarantee high precision, PTB
will enable its own shader-based workarounds to provide higher precision at the
cost of lower speed.
[[Screen]]('TransformTexture'). Therefore textures need to be transformed on demand
this texture via the [[Screen]]('DrawTexture',...); command -- The normal texture
draw-time. The [[Screen]]('SetOpenGLTexture') command allows you to create purely
<<=====See also:=====
DrawTexture TransformTexture BlendFunction<<
Deletions:
===[[MakeTexture]]===
==ScreenFunctions==
Usage:
textureIndex=Screen('MakeTexture', WindowIndex, imageMatrix [, optimizeForDrawAngle=0] [, specialFlags=0] [, floatprecision=0] [, textureOrientation=0] [, textureShader=0]);
Screen('BlendFunction',...) for the transparency values to have an effect. The
is 0 == Optimize for upright drawing. If 'specialFlags' is set to 1 and the
then PTB will try to use an own high quality texture filtering algorithm for
filter algorithm when used with floating point textures on some old hardware.
Screen('TransformTexture'). Therefore textures need to be transformed on demand
this texture via the Screen('DrawTexture',...); command -- The normal texture
draw-time. The Screen('SetOpenGLTexture') command allows you to create purely
ScreenFunctions