File: GL_ONE.m

package info (click to toggle)
psychtoolbox-3 3.0.15.20190207.dfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 101,848 kB
  • sloc: ansic: 174,133; cpp: 11,232; objc: 4,832; sh: 1,874; python: 1,047; php: 384; makefile: 189; java: 113
file content (58 lines) | stat: -rw-r--r-- 2,028 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
function constantString=GL_ONE

% constantString=GL_ONE
%
% Return the string 'GL_ONE', which specifies an alpha blending
% factor to Screen('BlendFunction', ...).  
%
% "Alpha" is a factor which weights RGB values when combining pixels by
% drawing or copying.  Alpha values weight the pixels drawn, the "source
% surface".   Separate alpha values weight the pixels drawn onto, the
% "destination surface".   A given pixel's alpha factor is not necessarily
% the alpha component of that pixel's [rgba] color vector, but may instead
% be the other combined surface's alpha component, a function of either or
% both both alpha compoenents, a constant, or it may derive from RGB values
% of the other combined surface.  The Psychtoolbox command
% Screen('BlendFunction') selects which. It implements the OpenGL function
% "glBlendFunc".
%
% In MATLAB, Screen('BlendFunction') accepts strings named for C constants
% passed to the OpenGL function glBlendFunc().Enter "Help
% PsychAlphaBlending" in the MATLAB command window for a list of blending
% constants (and other functions related to alpha blending).  
%
% GL_ONE may be used as either a source or a destination factor.
% 
%
% see also: PsychAlphaBlending, AlphaDemo, AlphaBlendingTest.

constantString='GL_ONE';
return;


% HISTORY
%
% 2/9/05  awi   Wrote it

% NOTES
% 
% 2/9/05  awi   These alpha blending factor functions are an excuse
%               for documentation, but I don't see anytyhing wrong with that.
%               By defining them as functions we get them to appear upon "Help
%               PsychAlphBlendning", which is exaclty the right place to look.
%               In MATLAB, There is a way to get help on a function.  There is no way
%               to get help on a string.      


% All constants:
% 	"GL_ZERO",
% 	"GL_ONE",
% 	"GL_SRC_COLOR",
% 	"GL_ONE_MINUS_SRC_COLOR",
% 	"GL_DST_COLOR",
% 	"GL_ONE_MINUS_DST_COLOR",
% 	"GL_SRC_ALPHA",
% 	"GL_ONE_MINUS_SRC_ALPHA",
% 	"GL_DST_ALPHA",
% 	"GL_ONE_MINUS_DST_ALPHA",
% 	"GL_SRC_ALPHA_SATURATE"