From: TravisCI-DocBuilder Date: Tue, 1 Dec 2015 12:01:03 +0000 (+0000) Subject: Doc generated from commit f7798302ea45eb1a7581d8862233b5cd5c52f24e X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=7e4de5d28f91f48c144fbc7ce71545201d5ed402;p=corbenik%2Fctrulib.git Doc generated from commit f7798302ea45eb1a7581d8862233b5cd5c52f24e --- diff --git a/apt_8h.html b/apt_8h.html index 263e8a1..3842b0b 100644 --- a/apt_8h.html +++ b/apt_8h.html @@ -2040,7 +2040,7 @@ Variables

Processes the current APT status.

Generally used within a main loop.

Returns
Whether the application is closing.
-
Examples:
app_launch/source/main.c, audio/mic/source/main.c, get_system_language/source/main.c, graphics/bitmap/24bit-color/source/main.c, graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, graphics/gpu/textured_cube/source/main.c, graphics/printing/both-screen-text/source/main.c, graphics/printing/colored-text/source/main.c, graphics/printing/hello-world/source/main.c, graphics/printing/multiple-windows-text/source/main.c, http/source/main.c, input/read-controls/source/main.c, input/touch-screen/source/main.c, libapplet_launch/source/main.c, mvd/source/main.c, qtm/source/main.c, sdmc/source/main.c, threads/event/source/main.c, and time/rtc/source/main.c.
+
Examples:
app_launch/source/main.c, audio/mic/source/main.c, get_system_language/source/main.c, graphics/bitmap/24bit-color/source/main.c, graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, graphics/gpu/textured_cube/source/main.c, graphics/printing/both-screen-text/source/main.c, graphics/printing/colored-text/source/main.c, graphics/printing/hello-world/source/main.c, graphics/printing/multiple-windows-text/source/main.c, http/source/main.c, input/read-controls/source/main.c, input/touch-screen/source/main.c, libapplet_launch/source/main.c, mvd/source/main.c, qtm/source/main.c, sdmc/source/main.c, threads/event/source/main.c, and time/rtc/source/main.c.
diff --git a/enums_8h.html b/enums_8h.html index 5079b49..d540432 100644 --- a/enums_8h.html +++ b/enums_8h.html @@ -192,6 +192,22 @@ Enumerations } Texture wrap modes. More...
  +enum  GPU_TEXTURE_MODE_PARAM {
+  GPU_TEX_2D = 0x0, +
+  GPU_TEX_CUBE_MAP = 0x1, +
+  GPU_TEX_SHADOW_2D = 0x2, +
+  GPU_TEX_PROJECTION = 0x3, +
+  GPU_TEX_SHADOW_CUBE = 0x4, +
+  GPU_TEX_DISABLED = 0x5 +
+ } Texture modes. More...
+  + enum  GPU_TEXUNIT {
  GPU_TEXUNIT0 = 0x1,
@@ -276,6 +292,18 @@ Enumerations } Test functions. More...
  +enum  GPU_EARLYDEPTHFUNC {
+  GPU_EARLYDEPTH_GEQUAL = 0, +
+  GPU_EARLYDEPTH_GREATER = 1, +
+  GPU_EARLYDEPTH_LEQUAL = 2, +
+  GPU_EARLYDEPTH_LESS = 3 +
+ } Early depth test functions. More...
+  + enum  GPU_SCISSORMODE {
  GPU_SCISSOR_DISABLE = 0,
@@ -899,6 +927,34 @@ Enumerations + + + +
+
+ + + + +
enum GPU_EARLYDEPTHFUNC
+
+ +

Early depth test functions.

+ + + + + +
Enumerator
GPU_EARLYDEPTH_GEQUAL  +

Pass if greater than or equal.

+
GPU_EARLYDEPTH_GREATER  +

Pass if greater than.

+
GPU_EARLYDEPTH_LEQUAL  +

Pass if less than or equal.

+
GPU_EARLYDEPTH_LESS  +

Pass if less than.

+
+
@@ -1584,6 +1640,40 @@ Enumerations + + + +
+
+ + + + +
enum GPU_TEXTURE_MODE_PARAM
+
+ +

Texture modes.

+ + + + + + + +
Enumerator
GPU_TEX_2D  +

2D texture

+
GPU_TEX_CUBE_MAP  +

Cube map.

+
GPU_TEX_SHADOW_2D  +

2D Shadow texture

+
GPU_TEX_PROJECTION  +

Projection texture.

+
GPU_TEX_SHADOW_CUBE  +

Shadow cube map.

+
GPU_TEX_DISABLED  +

Disabled.

+
+
diff --git a/enums_8h_source.html b/enums_8h_source.html index 061d5e3..690dbe4 100644 --- a/enums_8h_source.html +++ b/enums_8h_source.html @@ -124,560 +124,592 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
32  GPU_MIRRORED_REPEAT = 0x3, ///< Repeats with mirrored texture.
34 
-
35 /// Supported texture units.
-
36 typedef enum
+
35 /// Texture modes.
+
36 typedef enum
37 {
-
38  GPU_TEXUNIT0 = 0x1, ///< Texture unit 0.
-
39  GPU_TEXUNIT1 = 0x2, ///< Texture unit 1.
-
40  GPU_TEXUNIT2 = 0x4, ///< Texture unit 2.
-
41 } GPU_TEXUNIT;
-
42 
-
43 /// Supported texture formats.
-
44 typedef enum
-
45 {
-
46  GPU_RGBA8 = 0x0, ///< 8-bit Red + 8-bit Green + 8-bit Blue + 8-bit Alpha
-
47  GPU_RGB8 = 0x1, ///< 8-bit Red + 8-bit Green + 8-bit Blue
-
48  GPU_RGBA5551 = 0x2, ///< 5-bit Red + 5-bit Green + 5-bit Blue + 1-bit Alpha
-
49  GPU_RGB565 = 0x3, ///< 5-bit Red + 6-bit Green + 5-bit Blue
-
50  GPU_RGBA4 = 0x4, ///< 4-bit Red + 4-bit Green + 4-bit Blue + 4-bit Alpha
-
51  GPU_LA8 = 0x5, ///< 8-bit Luminance + 8-bit Alpha
-
52  GPU_HILO8 = 0x6, ///< 8-bit Hi + 8-bit Lo
-
53  GPU_L8 = 0x7, ///< 8-bit Luminance
-
54  GPU_A8 = 0x8, ///< 8-bit Alpha
-
55  GPU_LA4 = 0x9, ///< 4-bit Luminance + 4-bit Alpha
-
56  GPU_L4 = 0xA, ///< 4-bit Luminance
-
57  GPU_ETC1 = 0xB, ///< ETC1 texture compression
-
58  GPU_ETC1A4 = 0xC, ///< ETC1 texture compression + 4-bit Alpha
-
59 } GPU_TEXCOLOR;
-
60 
-
61 /// Supported color buffer formats.
-
62 typedef enum
-
63 {
-
64  GPU_RB_RGBA8 = 0, ///< 8-bit Red + 8-bit Green + 8-bit Blue + 8-bit Alpha
-
65  GPU_RB_RGB8 = 1, ///< 8-bit Red + 8-bit Green + 8-bit Blue
-
66  GPU_RB_RGBA5551 = 2, ///< 5-bit Red + 5-bit Green + 5-bit Blue + 1-bit Alpha
-
67  GPU_RB_RGB565 = 3, ///< 5-bit Red + 6-bit Green + 5-bit Blue
-
68  GPU_RB_RGBA4 = 4, ///< 4-bit Red + 4-bit Green + 4-bit Blue + 4-bit Alpha
-
69 } GPU_COLORBUF;
-
70 
-
71 /// Supported depth buffer formats.
-
72 typedef enum
-
73 {
-
74  GPU_RB_DEPTH16 = 0, ///< 16-bit Depth
-
75  GPU_RB_DEPTH24 = 2, ///< 24-bit Depth
-
76  GPU_RB_DEPTH24_STENCIL8 = 3, ///< 24-bit Depth + 8-bit Stencil
-
77 } GPU_DEPTHBUF;
-
78 
-
79 /// Test functions.
-
80 typedef enum
-
81 {
-
82  GPU_NEVER = 0, ///< Never pass.
-
83  GPU_ALWAYS = 1, ///< Always pass.
-
84  GPU_EQUAL = 2, ///< Pass if equal.
-
85  GPU_NOTEQUAL = 3, ///< Pass if not equal.
-
86  GPU_LESS = 4, ///< Pass if less than.
-
87  GPU_LEQUAL = 5, ///< Pass if less than or equal.
-
88  GPU_GREATER = 6, ///< Pass if greater than.
-
89  GPU_GEQUAL = 7, ///< Pass if greater than or equal.
- -
91 
-
92 /// Scissor test modes.
-
93 typedef enum
-
94 {
-
95  GPU_SCISSOR_DISABLE = 0, ///< Disable.
-
96  GPU_SCISSOR_INVERT = 1, ///< Exclude pixels inside the scissor box.
-
97  // 2 is the same as 0
-
98  GPU_SCISSOR_NORMAL = 3, ///< Exclude pixels outside of the scissor box.
- -
100 
-
101 /// Stencil operations.
-
102 typedef enum
-
103 {
-
104  GPU_STENCIL_KEEP = 0, ///< Keep old value. (old_stencil)
-
105  GPU_STENCIL_ZERO = 1, ///< Zero. (0)
-
106  GPU_STENCIL_REPLACE = 2, ///< Replace value. (ref)
-
107  GPU_STENCIL_INCR = 3, ///< Increment value. (old_stencil + 1 saturated to [0, 255])
-
108  GPU_STENCIL_DECR = 4, ///< Decrement value. (old_stencil - 1 saturated to [0, 255])
-
109  GPU_STENCIL_INVERT = 5, ///< Invert value. (~old_stencil)
-
110  GPU_STENCIL_INCR_WRAP = 6, ///< Increment value. (old_stencil + 1)
-
111  GPU_STENCIL_DECR_WRAP = 7, ///< Decrement value. (old_stencil - 1)
-
112 } GPU_STENCILOP;
-
113 
-
114 /// Pixel write mask.
-
115 typedef enum
-
116 {
-
117  GPU_WRITE_RED = 0x01, ///< Write red.
-
118  GPU_WRITE_GREEN = 0x02, ///< Write green.
-
119  GPU_WRITE_BLUE = 0x04, ///< Write blue.
-
120  GPU_WRITE_ALPHA = 0x08, ///< Write alpha.
-
121  GPU_WRITE_DEPTH = 0x10, ///< Write depth.
-
122 
-
123  GPU_WRITE_COLOR = 0x0F, ///< Write all color components.
-
124  GPU_WRITE_ALL = 0x1F, ///< Write all components.
-
125 } GPU_WRITEMASK;
-
126 
-
127 /// Blend modes.
-
128 typedef enum
-
129 {
-
130  GPU_BLEND_ADD = 0, ///< Add colors.
-
131  GPU_BLEND_SUBTRACT = 1, ///< Subtract colors.
-
132  GPU_BLEND_REVERSE_SUBTRACT = 2, ///< Reverse-subtract colors.
-
133  GPU_BLEND_MIN = 3, ///< Use the minimum color.
-
134  GPU_BLEND_MAX = 4, ///< Use the maximum color.
- -
136 
-
137 /// Blend factors.
-
138 typedef enum
-
139 {
-
140  GPU_ZERO = 0, ///< Zero.
-
141  GPU_ONE = 1, ///< One.
-
142  GPU_SRC_COLOR = 2, ///< Source color.
-
143  GPU_ONE_MINUS_SRC_COLOR = 3, ///< Source color - 1.
-
144  GPU_DST_COLOR = 4, ///< Destination color.
-
145  GPU_ONE_MINUS_DST_COLOR = 5, ///< Destination color - 1.
-
146  GPU_SRC_ALPHA = 6, ///< Source alpha.
-
147  GPU_ONE_MINUS_SRC_ALPHA = 7, ///< Source alpha - 1.
-
148  GPU_DST_ALPHA = 8, ///< Destination alpha.
-
149  GPU_ONE_MINUS_DST_ALPHA = 9, ///< Destination alpha - 1.
-
150  GPU_CONSTANT_COLOR = 10, ///< Constant color.
-
151  GPU_ONE_MINUS_CONSTANT_COLOR = 11, ///< Constant color - 1.
-
152  GPU_CONSTANT_ALPHA = 12, ///< Constant alpha.
-
153  GPU_ONE_MINUS_CONSTANT_ALPHA = 13, ///< Constant alpha - 1.
-
154  GPU_SRC_ALPHA_SATURATE = 14, ///< Saturated alpha.
- +
38  GPU_TEX_2D = 0x0, ///< 2D texture
+
39  GPU_TEX_CUBE_MAP = 0x1, ///< Cube map
+
40  GPU_TEX_SHADOW_2D = 0x2, ///< 2D Shadow texture
+
41  GPU_TEX_PROJECTION = 0x3, ///< Projection texture
+
42  GPU_TEX_SHADOW_CUBE = 0x4, ///< Shadow cube map
+
43  GPU_TEX_DISABLED = 0x5, ///< Disabled
+ +
45 
+
46 /// Supported texture units.
+
47 typedef enum
+
48 {
+
49  GPU_TEXUNIT0 = 0x1, ///< Texture unit 0.
+
50  GPU_TEXUNIT1 = 0x2, ///< Texture unit 1.
+
51  GPU_TEXUNIT2 = 0x4, ///< Texture unit 2.
+
52 } GPU_TEXUNIT;
+
53 
+
54 /// Supported texture formats.
+
55 typedef enum
+
56 {
+
57  GPU_RGBA8 = 0x0, ///< 8-bit Red + 8-bit Green + 8-bit Blue + 8-bit Alpha
+
58  GPU_RGB8 = 0x1, ///< 8-bit Red + 8-bit Green + 8-bit Blue
+
59  GPU_RGBA5551 = 0x2, ///< 5-bit Red + 5-bit Green + 5-bit Blue + 1-bit Alpha
+
60  GPU_RGB565 = 0x3, ///< 5-bit Red + 6-bit Green + 5-bit Blue
+
61  GPU_RGBA4 = 0x4, ///< 4-bit Red + 4-bit Green + 4-bit Blue + 4-bit Alpha
+
62  GPU_LA8 = 0x5, ///< 8-bit Luminance + 8-bit Alpha
+
63  GPU_HILO8 = 0x6, ///< 8-bit Hi + 8-bit Lo
+
64  GPU_L8 = 0x7, ///< 8-bit Luminance
+
65  GPU_A8 = 0x8, ///< 8-bit Alpha
+
66  GPU_LA4 = 0x9, ///< 4-bit Luminance + 4-bit Alpha
+
67  GPU_L4 = 0xA, ///< 4-bit Luminance
+
68  GPU_ETC1 = 0xB, ///< ETC1 texture compression
+
69  GPU_ETC1A4 = 0xC, ///< ETC1 texture compression + 4-bit Alpha
+
70 } GPU_TEXCOLOR;
+
71 
+
72 /// Supported color buffer formats.
+
73 typedef enum
+
74 {
+
75  GPU_RB_RGBA8 = 0, ///< 8-bit Red + 8-bit Green + 8-bit Blue + 8-bit Alpha
+
76  GPU_RB_RGB8 = 1, ///< 8-bit Red + 8-bit Green + 8-bit Blue
+
77  GPU_RB_RGBA5551 = 2, ///< 5-bit Red + 5-bit Green + 5-bit Blue + 1-bit Alpha
+
78  GPU_RB_RGB565 = 3, ///< 5-bit Red + 6-bit Green + 5-bit Blue
+
79  GPU_RB_RGBA4 = 4, ///< 4-bit Red + 4-bit Green + 4-bit Blue + 4-bit Alpha
+
80 } GPU_COLORBUF;
+
81 
+
82 /// Supported depth buffer formats.
+
83 typedef enum
+
84 {
+
85  GPU_RB_DEPTH16 = 0, ///< 16-bit Depth
+
86  GPU_RB_DEPTH24 = 2, ///< 24-bit Depth
+
87  GPU_RB_DEPTH24_STENCIL8 = 3, ///< 24-bit Depth + 8-bit Stencil
+
88 } GPU_DEPTHBUF;
+
89 
+
90 /// Test functions.
+
91 typedef enum
+
92 {
+
93  GPU_NEVER = 0, ///< Never pass.
+
94  GPU_ALWAYS = 1, ///< Always pass.
+
95  GPU_EQUAL = 2, ///< Pass if equal.
+
96  GPU_NOTEQUAL = 3, ///< Pass if not equal.
+
97  GPU_LESS = 4, ///< Pass if less than.
+
98  GPU_LEQUAL = 5, ///< Pass if less than or equal.
+
99  GPU_GREATER = 6, ///< Pass if greater than.
+
100  GPU_GEQUAL = 7, ///< Pass if greater than or equal.
+
101 } GPU_TESTFUNC;
+
102 
+
103 /// Early depth test functions.
+
104 typedef enum
+
105 {
+
106  GPU_EARLYDEPTH_GEQUAL = 0, ///< Pass if greater than or equal.
+
107  GPU_EARLYDEPTH_GREATER = 1, ///< Pass if greater than.
+
108  GPU_EARLYDEPTH_LEQUAL = 2, ///< Pass if less than or equal.
+
109  GPU_EARLYDEPTH_LESS = 3, ///< Pass if less than.
+ +
111 
+
112 /// Scissor test modes.
+
113 typedef enum
+
114 {
+
115  GPU_SCISSOR_DISABLE = 0, ///< Disable.
+
116  GPU_SCISSOR_INVERT = 1, ///< Exclude pixels inside the scissor box.
+
117  // 2 is the same as 0
+
118  GPU_SCISSOR_NORMAL = 3, ///< Exclude pixels outside of the scissor box.
+ +
120 
+
121 /// Stencil operations.
+
122 typedef enum
+
123 {
+
124  GPU_STENCIL_KEEP = 0, ///< Keep old value. (old_stencil)
+
125  GPU_STENCIL_ZERO = 1, ///< Zero. (0)
+
126  GPU_STENCIL_REPLACE = 2, ///< Replace value. (ref)
+
127  GPU_STENCIL_INCR = 3, ///< Increment value. (old_stencil + 1 saturated to [0, 255])
+
128  GPU_STENCIL_DECR = 4, ///< Decrement value. (old_stencil - 1 saturated to [0, 255])
+
129  GPU_STENCIL_INVERT = 5, ///< Invert value. (~old_stencil)
+
130  GPU_STENCIL_INCR_WRAP = 6, ///< Increment value. (old_stencil + 1)
+
131  GPU_STENCIL_DECR_WRAP = 7, ///< Decrement value. (old_stencil - 1)
+
132 } GPU_STENCILOP;
+
133 
+
134 /// Pixel write mask.
+
135 typedef enum
+
136 {
+
137  GPU_WRITE_RED = 0x01, ///< Write red.
+
138  GPU_WRITE_GREEN = 0x02, ///< Write green.
+
139  GPU_WRITE_BLUE = 0x04, ///< Write blue.
+
140  GPU_WRITE_ALPHA = 0x08, ///< Write alpha.
+
141  GPU_WRITE_DEPTH = 0x10, ///< Write depth.
+
142 
+
143  GPU_WRITE_COLOR = 0x0F, ///< Write all color components.
+
144  GPU_WRITE_ALL = 0x1F, ///< Write all components.
+
145 } GPU_WRITEMASK;
+
146 
+
147 /// Blend modes.
+
148 typedef enum
+
149 {
+
150  GPU_BLEND_ADD = 0, ///< Add colors.
+
151  GPU_BLEND_SUBTRACT = 1, ///< Subtract colors.
+
152  GPU_BLEND_REVERSE_SUBTRACT = 2, ///< Reverse-subtract colors.
+
153  GPU_BLEND_MIN = 3, ///< Use the minimum color.
+
154  GPU_BLEND_MAX = 4, ///< Use the maximum color.
+
156 
-
157 /// Logical operations.
-
158 typedef enum
+
157 /// Blend factors.
+
158 typedef enum
159 {
-
160  GPU_LOGICOP_CLEAR = 0, ///< Clear.
-
161  GPU_LOGICOP_AND = 1, ///< Bitwise AND.
-
162  GPU_LOGICOP_AND_REVERSE = 2, ///< Reverse bitwise AND.
-
163  GPU_LOGICOP_COPY = 3, ///< Copy.
-
164  GPU_LOGICOP_SET = 4, ///< Set.
-
165  GPU_LOGICOP_COPY_INVERTED = 5, ///< Inverted copy.
-
166  GPU_LOGICOP_NOOP = 6, ///< No operation.
-
167  GPU_LOGICOP_INVERT = 7, ///< Invert.
-
168  GPU_LOGICOP_NAND = 8, ///< Bitwise NAND.
-
169  GPU_LOGICOP_OR = 9, ///< Bitwise OR.
-
170  GPU_LOGICOP_NOR = 10, ///< Bitwise NOR.
-
171  GPU_LOGICOP_XOR = 11, ///< Bitwise XOR.
-
172  GPU_LOGICOP_EQUIV = 12, ///< Equivalent.
-
173  GPU_LOGICOP_AND_INVERTED = 13, ///< Inverted bitwise AND.
-
174  GPU_LOGICOP_OR_REVERSE = 14, ///< Reverse bitwise OR.
-
175  GPU_LOGICOP_OR_INVERTED = 15, ///< Inverted bitwize OR.
-
176 } GPU_LOGICOP;
-
177 
-
178 /// Fragment operation modes.
-
179 typedef enum
-
180 {
-
181  GPU_FRAGOPMODE_GL = 0, ///< OpenGL mode.
-
182  GPU_FRAGOPMODE_GAS_ACC = 1, ///< Gas mode (?).
-
183  GPU_FRAGOPMODE_SHADOW = 3, ///< Shadow mode (?).
- -
185 
-
186 /// Supported component formats.
-
187 typedef enum
-
188 {
-
189  GPU_BYTE = 0, ///< 8-bit byte.
-
190  GPU_UNSIGNED_BYTE = 1, ///< 8-bit unsigned byte.
-
191  GPU_SHORT = 2, ///< 16-bit short.
-
192  GPU_FLOAT = 3, ///< 32-bit float.
-
193 } GPU_FORMATS;
-
194 
-
195 /// Cull modes.
-
196 typedef enum
-
197 {
-
198  GPU_CULL_NONE = 0, ///< Disabled.
-
199  GPU_CULL_FRONT_CCW = 1, ///< Front, counter-clockwise.
-
200  GPU_CULL_BACK_CCW = 2, ///< Back, counter-clockwise.
-
201 } GPU_CULLMODE;
-
202 
-
203 /// Creates a VBO attribute parameter from its index, size, and format.
-
204 #define GPU_ATTRIBFMT(i, n, f) (((((n)-1)<<2)|((f)&3))<<((i)*4))
+
160  GPU_ZERO = 0, ///< Zero.
+
161  GPU_ONE = 1, ///< One.
+
162  GPU_SRC_COLOR = 2, ///< Source color.
+
163  GPU_ONE_MINUS_SRC_COLOR = 3, ///< Source color - 1.
+
164  GPU_DST_COLOR = 4, ///< Destination color.
+
165  GPU_ONE_MINUS_DST_COLOR = 5, ///< Destination color - 1.
+
166  GPU_SRC_ALPHA = 6, ///< Source alpha.
+
167  GPU_ONE_MINUS_SRC_ALPHA = 7, ///< Source alpha - 1.
+
168  GPU_DST_ALPHA = 8, ///< Destination alpha.
+
169  GPU_ONE_MINUS_DST_ALPHA = 9, ///< Destination alpha - 1.
+
170  GPU_CONSTANT_COLOR = 10, ///< Constant color.
+
171  GPU_ONE_MINUS_CONSTANT_COLOR = 11, ///< Constant color - 1.
+
172  GPU_CONSTANT_ALPHA = 12, ///< Constant alpha.
+
173  GPU_ONE_MINUS_CONSTANT_ALPHA = 13, ///< Constant alpha - 1.
+
174  GPU_SRC_ALPHA_SATURATE = 14, ///< Saturated alpha.
+ +
176 
+
177 /// Logical operations.
+
178 typedef enum
+
179 {
+
180  GPU_LOGICOP_CLEAR = 0, ///< Clear.
+
181  GPU_LOGICOP_AND = 1, ///< Bitwise AND.
+
182  GPU_LOGICOP_AND_REVERSE = 2, ///< Reverse bitwise AND.
+
183  GPU_LOGICOP_COPY = 3, ///< Copy.
+
184  GPU_LOGICOP_SET = 4, ///< Set.
+
185  GPU_LOGICOP_COPY_INVERTED = 5, ///< Inverted copy.
+
186  GPU_LOGICOP_NOOP = 6, ///< No operation.
+
187  GPU_LOGICOP_INVERT = 7, ///< Invert.
+
188  GPU_LOGICOP_NAND = 8, ///< Bitwise NAND.
+
189  GPU_LOGICOP_OR = 9, ///< Bitwise OR.
+
190  GPU_LOGICOP_NOR = 10, ///< Bitwise NOR.
+
191  GPU_LOGICOP_XOR = 11, ///< Bitwise XOR.
+
192  GPU_LOGICOP_EQUIV = 12, ///< Equivalent.
+
193  GPU_LOGICOP_AND_INVERTED = 13, ///< Inverted bitwise AND.
+
194  GPU_LOGICOP_OR_REVERSE = 14, ///< Reverse bitwise OR.
+
195  GPU_LOGICOP_OR_INVERTED = 15, ///< Inverted bitwize OR.
+
196 } GPU_LOGICOP;
+
197 
+
198 /// Fragment operation modes.
+
199 typedef enum
+
200 {
+
201  GPU_FRAGOPMODE_GL = 0, ///< OpenGL mode.
+
202  GPU_FRAGOPMODE_GAS_ACC = 1, ///< Gas mode (?).
+
203  GPU_FRAGOPMODE_SHADOW = 3, ///< Shadow mode (?).
+
205 
-
206 /// Texture combiner sources.
-
207 typedef enum
+
206 /// Supported component formats.
+
207 typedef enum
208 {
-
209  GPU_PRIMARY_COLOR = 0x00, ///< Primary color.
-
210  GPU_FRAGMENT_PRIMARY_COLOR = 0x01, ///< Primary fragment color.
-
211  GPU_FRAGMENT_SECONDARY_COLOR = 0x02, ///< Secondary fragment color.
-
212  GPU_TEXTURE0 = 0x03, ///< Texture unit 0.
-
213  GPU_TEXTURE1 = 0x04, ///< Texture unit 1.
-
214  GPU_TEXTURE2 = 0x05, ///< Texture unit 2.
-
215  GPU_TEXTURE3 = 0x06, ///< Texture unit 3.
-
216  GPU_PREVIOUS_BUFFER = 0x0D, ///< Previous buffer.
-
217  GPU_CONSTANT = 0x0E, ///< Constant value.
-
218  GPU_PREVIOUS = 0x0F, ///< Previous value.
-
219 } GPU_TEVSRC;
-
220 
-
221 /// Texture RGB combiner operands.
-
222 typedef enum
-
223 {
-
224  GPU_TEVOP_RGB_SRC_COLOR = 0x00, ///< Source color.
-
225  GPU_TEVOP_RGB_ONE_MINUS_SRC_COLOR = 0x01, ///< Source color - 1.
-
226  GPU_TEVOP_RGB_SRC_ALPHA = 0x02, ///< Source alpha.
-
227  GPU_TEVOP_RGB_ONE_MINUS_SRC_ALPHA = 0x03, ///< Source alpha - 1.
-
228  GPU_TEVOP_RGB_SRC_R = 0x04, ///< Source red.
-
229  GPU_TEVOP_RGB_ONE_MINUS_SRC_R = 0x05, ///< Source red - 1.
-
230  GPU_TEVOP_RGB_0x06 = 0x06, ///< Unknown.
-
231  GPU_TEVOP_RGB_0x07 = 0x07, ///< Unknown.
-
232  GPU_TEVOP_RGB_SRC_G = 0x08, ///< Source green.
-
233  GPU_TEVOP_RGB_ONE_MINUS_SRC_G = 0x09, ///< Source green - 1.
-
234  GPU_TEVOP_RGB_0x0A = 0x0A, ///< Unknown.
-
235  GPU_TEVOP_RGB_0x0B = 0x0B, ///< Unknown.
-
236  GPU_TEVOP_RGB_SRC_B = 0x0C, ///< Source blue.
-
237  GPU_TEVOP_RGB_ONE_MINUS_SRC_B = 0x0D, ///< Source blue - 1.
-
238  GPU_TEVOP_RGB_0x0E = 0x0E, ///< Unknown.
-
239  GPU_TEVOP_RGB_0x0F = 0x0F, ///< Unknown.
-
240 } GPU_TEVOP_RGB;
-
241 
-
242 /// Texture Alpha combiner operands.
-
243 typedef enum
-
244 {
-
245  GPU_TEVOP_A_SRC_ALPHA = 0x00, ///< Source alpha.
-
246  GPU_TEVOP_A_ONE_MINUS_SRC_ALPHA = 0x01, ///< Source alpha - 1.
-
247  GPU_TEVOP_A_SRC_R = 0x02, ///< Source red.
-
248  GPU_TEVOP_A_ONE_MINUS_SRC_R = 0x03, ///< Source red - 1.
-
249  GPU_TEVOP_A_SRC_G = 0x04, ///< Source green.
-
250  GPU_TEVOP_A_ONE_MINUS_SRC_G = 0x05, ///< Source green - 1.
-
251  GPU_TEVOP_A_SRC_B = 0x06, ///< Source blue.
-
252  GPU_TEVOP_A_ONE_MINUS_SRC_B = 0x07, ///< Source blue - 1.
-
253 } GPU_TEVOP_A;
-
254 
-
255 /// Texture combiner functions.
-
256 typedef enum
-
257 {
-
258  GPU_REPLACE = 0x00, ///< Replace.
-
259  GPU_MODULATE = 0x01, ///< Modulate.
-
260  GPU_ADD = 0x02, ///< Add.
-
261  GPU_ADD_SIGNED = 0x03, ///< Signed add.
-
262  GPU_INTERPOLATE = 0x04, ///< Interpolate.
-
263  GPU_SUBTRACT = 0x05, ///< Subtract.
-
264  GPU_DOT3_RGB = 0x06, ///< Dot3. RGB only.
-
265  GPU_MULTIPLY_ADD = 0x08, ///< Multiply then add.
-
266  GPU_ADD_MULTIPLY = 0x09, ///< Add then multiply.
- -
268 
-
269 /// Texture scale factors.
-
270 typedef enum
-
271 {
-
272  GPU_TEVSCALE_1 = 0x0, ///< 1x
-
273  GPU_TEVSCALE_2 = 0x1, ///< 2x
-
274  GPU_TEVSCALE_4 = 0x2, ///< 4x
-
275 } GPU_TEVSCALE;
-
276 
-
277 /// Creates a texture combiner source parameter from three sources.
-
278 #define GPU_TEVSOURCES(a,b,c) (((a))|((b)<<4)|((c)<<8))
-
279 /// Creates a texture combiner operand parameter from three operands.
-
280 #define GPU_TEVOPERANDS(a,b,c) (((a))|((b)<<4)|((c)<<8))
-
281 
-
282 /// Creates a light environment layer configuration parameter.
-
283 #define GPU_LIGHT_ENV_LAYER_CONFIG(n) ((n)+((n)==7))
-
284 /// Light shadow disable bits in GPUREG_LIGHT_CONFIG1.
-
285 #define GPU_LC1_SHADOWBIT(n) BIT(n)
-
286 /// Light spot disable bits in GPUREG_LIGHT_CONFIG1.
-
287 #define GPU_LC1_SPOTBIT(n) BIT((n)+8)
-
288 /// LUT disable bits in GPUREG_LIGHT_CONFIG1.
-
289 #define GPU_LC1_LUTBIT(n) BIT((n)+16)
-
290 /// Light distance attenuation disable bits in GPUREG_LIGHT_CONFIG1.
-
291 #define GPU_LC1_ATTNBIT(n) BIT((n)+24)
-
292 /// Creates a light permutation parameter.
-
293 #define GPU_LIGHTPERM(i,n) ((n) << (i))
-
294 /// Creates a light LUT input parameter.
-
295 #define GPU_LIGHTLUTINPUT(i,n) ((n) << ((i)*4))
-
296 /// Creates a light LUT index parameter.
-
297 #define GPU_LIGHTLUTIDX(c,i,o) ((o) | ((i) << 8) | ((c) << 11))
-
298 /// Creates a light color parameter from red, green, and blue components.
-
299 #define GPU_LIGHTCOLOR(r,g,b) (((b) & 0xFF) | (((g) << 10) & 0xFF) | (((r) << 20) & 0xFF))
-
300 
-
301 /// Fresnel options.
-
302 typedef enum
-
303 {
-
304  GPU_NO_FRESNEL = 0, ///< None.
-
305  GPU_PRI_ALPHA_FRESNEL = 1, ///< Primary alpha.
-
306  GPU_SEC_ALPHA_FRESNEL = 2, ///< Secondary alpha.
-
307  GPU_PRI_SEC_ALPHA_FRESNEL = 3, ///< Primary and secondary alpha.
- -
309 
-
310 /// Bump map modes.
-
311 typedef enum
-
312 {
-
313  GPU_BUMP_NOT_USED = 0, ///< Disabled.
-
314  GPU_BUMP_AS_BUMP = 1, ///< Bump as bump mapping.
-
315  GPU_BUMP_AS_TANG = 2, ///< Bump as tangent/normal mapping.
-
316 } GPU_BUMPMODE;
-
317 
-
318 /// LUT IDs.
-
319 typedef enum
-
320 {
-
321  GPU_LUT_D0 = 0, ///< D0 LUT.
-
322  GPU_LUT_D1 = 1, ///< D1 LUT.
-
323  GPU_LUT_SP = 2, ///< Spotlight LUT.
-
324  GPU_LUT_FR = 3, ///< Fresnel LUT.
-
325  GPU_LUT_RB = 4, ///< Reflection-Blue LUT.
-
326  GPU_LUT_RG = 5, ///< Reflection-Green LUT.
-
327  GPU_LUT_RR = 6, ///< Reflection-Red LUT.
-
328  GPU_LUT_DA = 7, ///< Distance attenuation LUT.
- -
330 
-
331 /// LUT inputs.
-
332 typedef enum
-
333 {
-
334  GPU_LUTINPUT_NH = 0, ///< Normal*HalfVector
-
335  GPU_LUTINPUT_VH = 1, ///< View*HalfVector
-
336  GPU_LUTINPUT_NV = 2, ///< Normal*View
-
337  GPU_LUTINPUT_LN = 3, ///< LightVector*Normal
-
338  GPU_LUTINPUT_SP = 4, ///< -LightVector*SpotlightVector
-
339  GPU_LUTINPUT_CP = 5, ///< cosine of phi
- -
341 
-
342 /// LUT scalers.
-
343 typedef enum
-
344 {
-
345  GPU_LUTSCALER_1x = 0, ///< 1x scale.
-
346  GPU_LUTSCALER_2x = 1, ///< 2x scale.
-
347  GPU_LUTSCALER_4x = 2, ///< 4x scale.
-
348  GPU_LUTSCALER_8x = 3, ///< 8x scale.
-
349  GPU_LUTSCALER_0_25x = 6, ///< 0.25x scale.
-
350  GPU_LUTSCALER_0_5x = 7, ///< 0.5x scale.
- -
352 
-
353 /// LUT selection.
-
354 typedef enum
-
355 {
-
356  GPU_LUTSELECT_COMMON = 0, ///< LUTs that are common to all lights.
-
357  GPU_LUTSELECT_SP = 1, ///< Spotlight LUT.
-
358  GPU_LUTSELECT_DA = 2, ///< Distance attenuation LUT.
- -
360 
-
361 /// Supported primitives.
-
362 typedef enum
-
363 {
-
364  GPU_TRIANGLES = 0x0000, ///< Triangles.
-
365  GPU_TRIANGLE_STRIP = 0x0100, ///< Triangle strip.
-
366  GPU_TRIANGLE_FAN = 0x0200, ///< Triangle fan.
-
367  GPU_GEOMETRY_PRIM = 0x0300, ///< Geometry shader primitive.
- -
369 
-
370 /// Shader types.
-
371 typedef enum
-
372 {
-
373  GPU_VERTEX_SHADER = 0x0, ///< Vertex shader.
-
374  GPU_GEOMETRY_SHADER = 0x1, ///< Geometry shader.
- -
Constant color - 1.
Definition: enums.h:151
-
Dot3. RGB only.
Definition: enums.h:264
-
Write all components.
Definition: enums.h:124
-
Normal*View.
Definition: enums.h:336
-
Secondary fragment color.
Definition: enums.h:211
-
8-bit Luminance + 8-bit Alpha
Definition: enums.h:51
-
Triangles.
Definition: enums.h:364
-
GPU_CULLMODE
Cull modes.
Definition: enums.h:196
-
Distance attenuation LUT.
Definition: enums.h:358
-
Exclude pixels inside the scissor box.
Definition: enums.h:96
-
D1 LUT.
Definition: enums.h:322
-
Back, counter-clockwise.
Definition: enums.h:200
-
Invert value. (~old_stencil)
Definition: enums.h:109
-
Spotlight LUT.
Definition: enums.h:323
-
Multiply then add.
Definition: enums.h:265
-
Source red - 1.
Definition: enums.h:229
-
Add then multiply.
Definition: enums.h:266
-
Source blue.
Definition: enums.h:251
-
Increment value. (old_stencil + 1 saturated to [0, 255])
Definition: enums.h:107
-
Triangle strip.
Definition: enums.h:365
-
GPU_TEVOP_RGB
Texture RGB combiner operands.
Definition: enums.h:222
-
4-bit Luminance + 4-bit Alpha
Definition: enums.h:55
-
Bump as bump mapping.
Definition: enums.h:314
-
Source blue.
Definition: enums.h:236
-
#define GPU_LIGHTLUTINPUT(i, n)
Creates a light LUT input parameter.
Definition: enums.h:295
-
Source green.
Definition: enums.h:249
-
Pass if less than.
Definition: enums.h:86
-
24-bit Depth + 8-bit Stencil
Definition: enums.h:76
-
Add colors.
Definition: enums.h:130
-
Distance attenuation LUT.
Definition: enums.h:328
-
Texture unit 2.
Definition: enums.h:40
-
Use the minimum color.
Definition: enums.h:133
-
4-bit Luminance
Definition: enums.h:56
-
Write alpha.
Definition: enums.h:120
-
GPU_FRAGOPMODE
Fragment operation modes.
Definition: enums.h:179
-
Source alpha.
Definition: enums.h:245
-
Source red.
Definition: enums.h:228
-
OpenGL mode.
Definition: enums.h:181
-
Previous buffer.
Definition: enums.h:216
-
Source red.
Definition: enums.h:247
-
4x scale.
Definition: enums.h:347
-
Destination color.
Definition: enums.h:144
-
GPU_STENCILOP
Stencil operations.
Definition: enums.h:102
-
2x
Definition: enums.h:273
-
Constant alpha.
Definition: enums.h:152
-
Pass if greater than or equal.
Definition: enums.h:89
-
GPU_FRESNELSEL
Fresnel options.
Definition: enums.h:302
-
Constant color.
Definition: enums.h:150
+
209  GPU_BYTE = 0, ///< 8-bit byte.
+
210  GPU_UNSIGNED_BYTE = 1, ///< 8-bit unsigned byte.
+
211  GPU_SHORT = 2, ///< 16-bit short.
+
212  GPU_FLOAT = 3, ///< 32-bit float.
+
213 } GPU_FORMATS;
+
214 
+
215 /// Cull modes.
+
216 typedef enum
+
217 {
+
218  GPU_CULL_NONE = 0, ///< Disabled.
+
219  GPU_CULL_FRONT_CCW = 1, ///< Front, counter-clockwise.
+
220  GPU_CULL_BACK_CCW = 2, ///< Back, counter-clockwise.
+
221 } GPU_CULLMODE;
+
222 
+
223 /// Creates a VBO attribute parameter from its index, size, and format.
+
224 #define GPU_ATTRIBFMT(i, n, f) (((((n)-1)<<2)|((f)&3))<<((i)*4))
+
225 
+
226 /// Texture combiner sources.
+
227 typedef enum
+
228 {
+
229  GPU_PRIMARY_COLOR = 0x00, ///< Primary color.
+
230  GPU_FRAGMENT_PRIMARY_COLOR = 0x01, ///< Primary fragment color.
+
231  GPU_FRAGMENT_SECONDARY_COLOR = 0x02, ///< Secondary fragment color.
+
232  GPU_TEXTURE0 = 0x03, ///< Texture unit 0.
+
233  GPU_TEXTURE1 = 0x04, ///< Texture unit 1.
+
234  GPU_TEXTURE2 = 0x05, ///< Texture unit 2.
+
235  GPU_TEXTURE3 = 0x06, ///< Texture unit 3.
+
236  GPU_PREVIOUS_BUFFER = 0x0D, ///< Previous buffer.
+
237  GPU_CONSTANT = 0x0E, ///< Constant value.
+
238  GPU_PREVIOUS = 0x0F, ///< Previous value.
+
239 } GPU_TEVSRC;
+
240 
+
241 /// Texture RGB combiner operands.
+
242 typedef enum
+
243 {
+
244  GPU_TEVOP_RGB_SRC_COLOR = 0x00, ///< Source color.
+
245  GPU_TEVOP_RGB_ONE_MINUS_SRC_COLOR = 0x01, ///< Source color - 1.
+
246  GPU_TEVOP_RGB_SRC_ALPHA = 0x02, ///< Source alpha.
+
247  GPU_TEVOP_RGB_ONE_MINUS_SRC_ALPHA = 0x03, ///< Source alpha - 1.
+
248  GPU_TEVOP_RGB_SRC_R = 0x04, ///< Source red.
+
249  GPU_TEVOP_RGB_ONE_MINUS_SRC_R = 0x05, ///< Source red - 1.
+
250  GPU_TEVOP_RGB_0x06 = 0x06, ///< Unknown.
+
251  GPU_TEVOP_RGB_0x07 = 0x07, ///< Unknown.
+
252  GPU_TEVOP_RGB_SRC_G = 0x08, ///< Source green.
+
253  GPU_TEVOP_RGB_ONE_MINUS_SRC_G = 0x09, ///< Source green - 1.
+
254  GPU_TEVOP_RGB_0x0A = 0x0A, ///< Unknown.
+
255  GPU_TEVOP_RGB_0x0B = 0x0B, ///< Unknown.
+
256  GPU_TEVOP_RGB_SRC_B = 0x0C, ///< Source blue.
+
257  GPU_TEVOP_RGB_ONE_MINUS_SRC_B = 0x0D, ///< Source blue - 1.
+
258  GPU_TEVOP_RGB_0x0E = 0x0E, ///< Unknown.
+
259  GPU_TEVOP_RGB_0x0F = 0x0F, ///< Unknown.
+
260 } GPU_TEVOP_RGB;
+
261 
+
262 /// Texture Alpha combiner operands.
+
263 typedef enum
+
264 {
+
265  GPU_TEVOP_A_SRC_ALPHA = 0x00, ///< Source alpha.
+
266  GPU_TEVOP_A_ONE_MINUS_SRC_ALPHA = 0x01, ///< Source alpha - 1.
+
267  GPU_TEVOP_A_SRC_R = 0x02, ///< Source red.
+
268  GPU_TEVOP_A_ONE_MINUS_SRC_R = 0x03, ///< Source red - 1.
+
269  GPU_TEVOP_A_SRC_G = 0x04, ///< Source green.
+
270  GPU_TEVOP_A_ONE_MINUS_SRC_G = 0x05, ///< Source green - 1.
+
271  GPU_TEVOP_A_SRC_B = 0x06, ///< Source blue.
+
272  GPU_TEVOP_A_ONE_MINUS_SRC_B = 0x07, ///< Source blue - 1.
+
273 } GPU_TEVOP_A;
+
274 
+
275 /// Texture combiner functions.
+
276 typedef enum
+
277 {
+
278  GPU_REPLACE = 0x00, ///< Replace.
+
279  GPU_MODULATE = 0x01, ///< Modulate.
+
280  GPU_ADD = 0x02, ///< Add.
+
281  GPU_ADD_SIGNED = 0x03, ///< Signed add.
+
282  GPU_INTERPOLATE = 0x04, ///< Interpolate.
+
283  GPU_SUBTRACT = 0x05, ///< Subtract.
+
284  GPU_DOT3_RGB = 0x06, ///< Dot3. RGB only.
+
285  GPU_MULTIPLY_ADD = 0x08, ///< Multiply then add.
+
286  GPU_ADD_MULTIPLY = 0x09, ///< Add then multiply.
+ +
288 
+
289 /// Texture scale factors.
+
290 typedef enum
+
291 {
+
292  GPU_TEVSCALE_1 = 0x0, ///< 1x
+
293  GPU_TEVSCALE_2 = 0x1, ///< 2x
+
294  GPU_TEVSCALE_4 = 0x2, ///< 4x
+
295 } GPU_TEVSCALE;
+
296 
+
297 /// Creates a texture combiner source parameter from three sources.
+
298 #define GPU_TEVSOURCES(a,b,c) (((a))|((b)<<4)|((c)<<8))
+
299 /// Creates a texture combiner operand parameter from three operands.
+
300 #define GPU_TEVOPERANDS(a,b,c) (((a))|((b)<<4)|((c)<<8))
+
301 
+
302 /// Creates a light environment layer configuration parameter.
+
303 #define GPU_LIGHT_ENV_LAYER_CONFIG(n) ((n)+((n)==7))
+
304 /// Light shadow disable bits in GPUREG_LIGHT_CONFIG1.
+
305 #define GPU_LC1_SHADOWBIT(n) BIT(n)
+
306 /// Light spot disable bits in GPUREG_LIGHT_CONFIG1.
+
307 #define GPU_LC1_SPOTBIT(n) BIT((n)+8)
+
308 /// LUT disable bits in GPUREG_LIGHT_CONFIG1.
+
309 #define GPU_LC1_LUTBIT(n) BIT((n)+16)
+
310 /// Light distance attenuation disable bits in GPUREG_LIGHT_CONFIG1.
+
311 #define GPU_LC1_ATTNBIT(n) BIT((n)+24)
+
312 /// Creates a light permutation parameter.
+
313 #define GPU_LIGHTPERM(i,n) ((n) << (i))
+
314 /// Creates a light LUT input parameter.
+
315 #define GPU_LIGHTLUTINPUT(i,n) ((n) << ((i)*4))
+
316 /// Creates a light LUT index parameter.
+
317 #define GPU_LIGHTLUTIDX(c,i,o) ((o) | ((i) << 8) | ((c) << 11))
+
318 /// Creates a light color parameter from red, green, and blue components.
+
319 #define GPU_LIGHTCOLOR(r,g,b) (((b) & 0xFF) | (((g) << 10) & 0xFF) | (((r) << 20) & 0xFF))
+
320 
+
321 /// Fresnel options.
+
322 typedef enum
+
323 {
+
324  GPU_NO_FRESNEL = 0, ///< None.
+
325  GPU_PRI_ALPHA_FRESNEL = 1, ///< Primary alpha.
+
326  GPU_SEC_ALPHA_FRESNEL = 2, ///< Secondary alpha.
+
327  GPU_PRI_SEC_ALPHA_FRESNEL = 3, ///< Primary and secondary alpha.
+ +
329 
+
330 /// Bump map modes.
+
331 typedef enum
+
332 {
+
333  GPU_BUMP_NOT_USED = 0, ///< Disabled.
+
334  GPU_BUMP_AS_BUMP = 1, ///< Bump as bump mapping.
+
335  GPU_BUMP_AS_TANG = 2, ///< Bump as tangent/normal mapping.
+
336 } GPU_BUMPMODE;
+
337 
+
338 /// LUT IDs.
+
339 typedef enum
+
340 {
+
341  GPU_LUT_D0 = 0, ///< D0 LUT.
+
342  GPU_LUT_D1 = 1, ///< D1 LUT.
+
343  GPU_LUT_SP = 2, ///< Spotlight LUT.
+
344  GPU_LUT_FR = 3, ///< Fresnel LUT.
+
345  GPU_LUT_RB = 4, ///< Reflection-Blue LUT.
+
346  GPU_LUT_RG = 5, ///< Reflection-Green LUT.
+
347  GPU_LUT_RR = 6, ///< Reflection-Red LUT.
+
348  GPU_LUT_DA = 7, ///< Distance attenuation LUT.
+ +
350 
+
351 /// LUT inputs.
+
352 typedef enum
+
353 {
+
354  GPU_LUTINPUT_NH = 0, ///< Normal*HalfVector
+
355  GPU_LUTINPUT_VH = 1, ///< View*HalfVector
+
356  GPU_LUTINPUT_NV = 2, ///< Normal*View
+
357  GPU_LUTINPUT_LN = 3, ///< LightVector*Normal
+
358  GPU_LUTINPUT_SP = 4, ///< -LightVector*SpotlightVector
+
359  GPU_LUTINPUT_CP = 5, ///< cosine of phi
+ +
361 
+
362 /// LUT scalers.
+
363 typedef enum
+
364 {
+
365  GPU_LUTSCALER_1x = 0, ///< 1x scale.
+
366  GPU_LUTSCALER_2x = 1, ///< 2x scale.
+
367  GPU_LUTSCALER_4x = 2, ///< 4x scale.
+
368  GPU_LUTSCALER_8x = 3, ///< 8x scale.
+
369  GPU_LUTSCALER_0_25x = 6, ///< 0.25x scale.
+
370  GPU_LUTSCALER_0_5x = 7, ///< 0.5x scale.
+ +
372 
+
373 /// LUT selection.
+
374 typedef enum
+
375 {
+
376  GPU_LUTSELECT_COMMON = 0, ///< LUTs that are common to all lights.
+
377  GPU_LUTSELECT_SP = 1, ///< Spotlight LUT.
+
378  GPU_LUTSELECT_DA = 2, ///< Distance attenuation LUT.
+ +
380 
+
381 /// Supported primitives.
+
382 typedef enum
+
383 {
+
384  GPU_TRIANGLES = 0x0000, ///< Triangles.
+
385  GPU_TRIANGLE_STRIP = 0x0100, ///< Triangle strip.
+
386  GPU_TRIANGLE_FAN = 0x0200, ///< Triangle fan.
+
387  GPU_GEOMETRY_PRIM = 0x0300, ///< Geometry shader primitive.
+ +
389 
+
390 /// Shader types.
+
391 typedef enum
+
392 {
+
393  GPU_VERTEX_SHADER = 0x0, ///< Vertex shader.
+
394  GPU_GEOMETRY_SHADER = 0x1, ///< Geometry shader.
+ +
Constant color - 1.
Definition: enums.h:171
+
Dot3. RGB only.
Definition: enums.h:284
+
Write all components.
Definition: enums.h:144
+
Normal*View.
Definition: enums.h:356
+
Secondary fragment color.
Definition: enums.h:231
+
8-bit Luminance + 8-bit Alpha
Definition: enums.h:62
+
Triangles.
Definition: enums.h:384
+
GPU_CULLMODE
Cull modes.
Definition: enums.h:216
+
Distance attenuation LUT.
Definition: enums.h:378
+
Exclude pixels inside the scissor box.
Definition: enums.h:116
+
D1 LUT.
Definition: enums.h:342
+
Back, counter-clockwise.
Definition: enums.h:220
+
Invert value. (~old_stencil)
Definition: enums.h:129
+
Spotlight LUT.
Definition: enums.h:343
+
Multiply then add.
Definition: enums.h:285
+
Source red - 1.
Definition: enums.h:249
+
Add then multiply.
Definition: enums.h:286
+
Source blue.
Definition: enums.h:271
+
Increment value. (old_stencil + 1 saturated to [0, 255])
Definition: enums.h:127
+
Triangle strip.
Definition: enums.h:385
+
GPU_TEVOP_RGB
Texture RGB combiner operands.
Definition: enums.h:242
+
4-bit Luminance + 4-bit Alpha
Definition: enums.h:66
+
Bump as bump mapping.
Definition: enums.h:334
+
Source blue.
Definition: enums.h:256
+
Pass if less than.
Definition: enums.h:109
+
#define GPU_LIGHTLUTINPUT(i, n)
Creates a light LUT input parameter.
Definition: enums.h:315
+
Source green.
Definition: enums.h:269
+
Pass if less than.
Definition: enums.h:97
+
24-bit Depth + 8-bit Stencil
Definition: enums.h:87
+
Add colors.
Definition: enums.h:150
+
Distance attenuation LUT.
Definition: enums.h:348
+
Texture unit 2.
Definition: enums.h:51
+
Use the minimum color.
Definition: enums.h:153
+
4-bit Luminance
Definition: enums.h:67
+
Write alpha.
Definition: enums.h:140
+
GPU_FRAGOPMODE
Fragment operation modes.
Definition: enums.h:199
+
Source alpha.
Definition: enums.h:265
+
Source red.
Definition: enums.h:248
+
OpenGL mode.
Definition: enums.h:201
+
Previous buffer.
Definition: enums.h:236
+
Source red.
Definition: enums.h:267
+
4x scale.
Definition: enums.h:367
+
Destination color.
Definition: enums.h:164
+
GPU_STENCILOP
Stencil operations.
Definition: enums.h:122
+
2x
Definition: enums.h:293
+
Constant alpha.
Definition: enums.h:172
+
Pass if greater than.
Definition: enums.h:107
+
Shadow cube map.
Definition: enums.h:42
+
Pass if greater than or equal.
Definition: enums.h:100
+
GPU_FRESNELSEL
Fresnel options.
Definition: enums.h:322
+
Constant color.
Definition: enums.h:170
Nearest-neighbor interpolation.
Definition: enums.h:22
-
GPU_BLENDEQUATION
Blend modes.
Definition: enums.h:128
-
Use the maximum color.
Definition: enums.h:134
-
Write depth.
Definition: enums.h:121
-
Source alpha - 1.
Definition: enums.h:227
-
32-bit float.
Definition: enums.h:192
-
Destination alpha.
Definition: enums.h:148
-
Primary color.
Definition: enums.h:209
-
8-bit Red + 8-bit Green + 8-bit Blue
Definition: enums.h:65
-
2x scale.
Definition: enums.h:346
-
Source blue - 1.
Definition: enums.h:237
-
Secondary alpha.
Definition: enums.h:306
-
GPU_TESTFUNC
Test functions.
Definition: enums.h:80
-
Bitwise OR.
Definition: enums.h:169
+
GPU_BLENDEQUATION
Blend modes.
Definition: enums.h:148
+
Use the maximum color.
Definition: enums.h:154
+
Write depth.
Definition: enums.h:141
+
Source alpha - 1.
Definition: enums.h:247
+
32-bit float.
Definition: enums.h:212
+
Destination alpha.
Definition: enums.h:168
+
Primary color.
Definition: enums.h:229
+
8-bit Red + 8-bit Green + 8-bit Blue
Definition: enums.h:76
+
2x scale.
Definition: enums.h:366
+
Source blue - 1.
Definition: enums.h:257
+
Projection texture.
Definition: enums.h:41
+
Secondary alpha.
Definition: enums.h:326
+
GPU_TESTFUNC
Test functions.
Definition: enums.h:91
+
Bitwise OR.
Definition: enums.h:189
Clamps to border.
Definition: enums.h:30
-
Unknown.
Definition: enums.h:239
-
GPU_BLENDFACTOR
Blend factors.
Definition: enums.h:138
-
Constant value.
Definition: enums.h:217
-
Reflection-Green LUT.
Definition: enums.h:326
-
Unknown.
Definition: enums.h:230
-
GPU_LOGICOP
Logical operations.
Definition: enums.h:158
-
Fresnel LUT.
Definition: enums.h:324
-
Previous value.
Definition: enums.h:218
-
GPU_COLORBUF
Supported color buffer formats.
Definition: enums.h:62
-
LUTs that are common to all lights.
Definition: enums.h:356
-
Subtract.
Definition: enums.h:263
-
Gas mode (?).
Definition: enums.h:182
-
GPU_SHADER_TYPE
Shader types.
Definition: enums.h:371
-
Texture unit 1.
Definition: enums.h:39
-
Pass if equal.
Definition: enums.h:84
-
8-bit Red + 8-bit Green + 8-bit Blue + 8-bit Alpha
Definition: enums.h:46
-
Destination alpha - 1.
Definition: enums.h:149
-
Bitwise AND.
Definition: enums.h:161
-
Clear.
Definition: enums.h:160
-
GPU_SCISSORMODE
Scissor test modes.
Definition: enums.h:93
-
Never pass.
Definition: enums.h:82
-
Inverted bitwise AND.
Definition: enums.h:173
-
Texture unit 0.
Definition: enums.h:212
-
Source red - 1.
Definition: enums.h:248
-
Reverse-subtract colors.
Definition: enums.h:132
-
16-bit Depth
Definition: enums.h:74
-
Texture unit 0.
Definition: enums.h:38
-
Increment value. (old_stencil + 1)
Definition: enums.h:110
-
Source alpha.
Definition: enums.h:146
-
LightVector*Normal.
Definition: enums.h:337
-
Destination color - 1.
Definition: enums.h:145
-
Signed add.
Definition: enums.h:261
-
16-bit short.
Definition: enums.h:191
-
Pass if not equal.
Definition: enums.h:85
-
Replace.
Definition: enums.h:258
-
Source alpha - 1.
Definition: enums.h:246
+
Unknown.
Definition: enums.h:259
+
GPU_BLENDFACTOR
Blend factors.
Definition: enums.h:158
+
Constant value.
Definition: enums.h:237
+
Reflection-Green LUT.
Definition: enums.h:346
+
Unknown.
Definition: enums.h:250
+
GPU_LOGICOP
Logical operations.
Definition: enums.h:178
+
Fresnel LUT.
Definition: enums.h:344
+
Previous value.
Definition: enums.h:238
+
GPU_COLORBUF
Supported color buffer formats.
Definition: enums.h:73
+
LUTs that are common to all lights.
Definition: enums.h:376
+
Subtract.
Definition: enums.h:283
+
Gas mode (?).
Definition: enums.h:202
+
GPU_SHADER_TYPE
Shader types.
Definition: enums.h:391
+
Texture unit 1.
Definition: enums.h:50
+
Pass if equal.
Definition: enums.h:95
+
8-bit Red + 8-bit Green + 8-bit Blue + 8-bit Alpha
Definition: enums.h:57
+
Disabled.
Definition: enums.h:43
+
Destination alpha - 1.
Definition: enums.h:169
+
Bitwise AND.
Definition: enums.h:181
+
Clear.
Definition: enums.h:180
+
GPU_SCISSORMODE
Scissor test modes.
Definition: enums.h:113
+
GPU_EARLYDEPTHFUNC
Early depth test functions.
Definition: enums.h:104
+
Never pass.
Definition: enums.h:93
+
Inverted bitwise AND.
Definition: enums.h:193
+
Texture unit 0.
Definition: enums.h:232
+
Source red - 1.
Definition: enums.h:268
+
Reverse-subtract colors.
Definition: enums.h:152
+
16-bit Depth
Definition: enums.h:85
+
Texture unit 0.
Definition: enums.h:49
+
Increment value. (old_stencil + 1)
Definition: enums.h:130
+
Source alpha.
Definition: enums.h:166
+
LightVector*Normal.
Definition: enums.h:357
+
Destination color - 1.
Definition: enums.h:165
+
Signed add.
Definition: enums.h:281
+
16-bit short.
Definition: enums.h:211
+
Pass if not equal.
Definition: enums.h:96
+
Replace.
Definition: enums.h:278
+
Source alpha - 1.
Definition: enums.h:266
GPU_TEXTURE_FILTER_PARAM
Texture filters.
Definition: enums.h:20
-
GPU_COMBINEFUNC
Texture combiner functions.
Definition: enums.h:256
-
ETC1 texture compression.
Definition: enums.h:57
-
Spotlight LUT.
Definition: enums.h:357
-
5-bit Red + 6-bit Green + 5-bit Blue
Definition: enums.h:49
-
View*HalfVector.
Definition: enums.h:335
-
Set.
Definition: enums.h:164
-
Write red.
Definition: enums.h:117
-
Source green - 1.
Definition: enums.h:233
-
Copy.
Definition: enums.h:163
-
Source color - 1.
Definition: enums.h:225
-
Decrement value. (old_stencil - 1)
Definition: enums.h:111
-
4-bit Red + 4-bit Green + 4-bit Blue + 4-bit Alpha
Definition: enums.h:68
-
8-bit Hi + 8-bit Lo
Definition: enums.h:52
-
GPU_FORMATS
Supported component formats.
Definition: enums.h:187
-
One.
Definition: enums.h:141
-
Pass if less than or equal.
Definition: enums.h:87
-
Bitwise NOR.
Definition: enums.h:170
-
Geometry shader primitive.
Definition: enums.h:367
-
Reverse bitwise AND.
Definition: enums.h:162
-
GPU_LIGHTLUTSCALER
LUT scalers.
Definition: enums.h:343
-
Exclude pixels outside of the scissor box.
Definition: enums.h:98
-
Reflection-Red LUT.
Definition: enums.h:327
-
Write all color components.
Definition: enums.h:123
-
Primary and secondary alpha.
Definition: enums.h:307
-
4-bit Red + 4-bit Green + 4-bit Blue + 4-bit Alpha
Definition: enums.h:50
-
Source color.
Definition: enums.h:224
-
GPU_Primitive_t
Supported primitives.
Definition: enums.h:362
-
Add.
Definition: enums.h:260
-
Primary alpha.
Definition: enums.h:305
-
GPU_LIGHTLUTSELECT
LUT selection.
Definition: enums.h:354
+
GPU_COMBINEFUNC
Texture combiner functions.
Definition: enums.h:276
+
ETC1 texture compression.
Definition: enums.h:68
+
Spotlight LUT.
Definition: enums.h:377
+
5-bit Red + 6-bit Green + 5-bit Blue
Definition: enums.h:60
+
View*HalfVector.
Definition: enums.h:355
+
Set.
Definition: enums.h:184
+
Write red.
Definition: enums.h:137
+
Source green - 1.
Definition: enums.h:253
+
Copy.
Definition: enums.h:183
+
Source color - 1.
Definition: enums.h:245
+
Decrement value. (old_stencil - 1)
Definition: enums.h:131
+
4-bit Red + 4-bit Green + 4-bit Blue + 4-bit Alpha
Definition: enums.h:79
+
8-bit Hi + 8-bit Lo
Definition: enums.h:63
+
GPU_FORMATS
Supported component formats.
Definition: enums.h:207
+
One.
Definition: enums.h:161
+
Pass if less than or equal.
Definition: enums.h:98
+
Bitwise NOR.
Definition: enums.h:190
+
Cube map.
Definition: enums.h:39
+
Geometry shader primitive.
Definition: enums.h:387
+
Reverse bitwise AND.
Definition: enums.h:182
+
GPU_LIGHTLUTSCALER
LUT scalers.
Definition: enums.h:363
+
Exclude pixels outside of the scissor box.
Definition: enums.h:118
+
Reflection-Red LUT.
Definition: enums.h:347
+
Write all color components.
Definition: enums.h:143
+
Primary and secondary alpha.
Definition: enums.h:327
+
4-bit Red + 4-bit Green + 4-bit Blue + 4-bit Alpha
Definition: enums.h:61
+
Source color.
Definition: enums.h:244
+
2D texture
Definition: enums.h:38
+
GPU_Primitive_t
Supported primitives.
Definition: enums.h:382
+
Add.
Definition: enums.h:280
+
Primary alpha.
Definition: enums.h:325
+
GPU_LIGHTLUTSELECT
LUT selection.
Definition: enums.h:374
Clamps to edge.
Definition: enums.h:29
-
Interpolate.
Definition: enums.h:262
-
Replace value. (ref)
Definition: enums.h:106
-
Unknown.
Definition: enums.h:235
-
8-bit unsigned byte.
Definition: enums.h:190
-
Modulate.
Definition: enums.h:259
-
Triangle fan.
Definition: enums.h:366
-
Write green.
Definition: enums.h:118
-
Constant alpha - 1.
Definition: enums.h:153
-
No operation.
Definition: enums.h:166
-
Invert.
Definition: enums.h:167
-
Texture unit 3.
Definition: enums.h:215
-
0.25x scale.
Definition: enums.h:349
-
Texture unit 2.
Definition: enums.h:214
-
Geometry shader.
Definition: enums.h:374
-
Bitwise NAND.
Definition: enums.h:168
-
GPU_DEPTHBUF
Supported depth buffer formats.
Definition: enums.h:72
-
GPU_TEVSRC
Texture combiner sources.
Definition: enums.h:207
-
Shadow mode (?).
Definition: enums.h:183
-
Inverted copy.
Definition: enums.h:165
-
GPU_WRITEMASK
Pixel write mask.
Definition: enums.h:115
-
5-bit Red + 5-bit Green + 5-bit Blue + 1-bit Alpha
Definition: enums.h:66
-
Unknown.
Definition: enums.h:231
-
1x scale.
Definition: enums.h:345
-
Subtract colors.
Definition: enums.h:131
-
0.5x scale.
Definition: enums.h:350
-
Source color - 1.
Definition: enums.h:143
-
Pass if greater than.
Definition: enums.h:88
-
Vertex shader.
Definition: enums.h:373
-
5-bit Red + 5-bit Green + 5-bit Blue + 1-bit Alpha
Definition: enums.h:48
-
Always pass.
Definition: enums.h:83
-
Texture unit 1.
Definition: enums.h:213
-
Reverse bitwise OR.
Definition: enums.h:174
-
Front, counter-clockwise.
Definition: enums.h:199
-
cosine of phi
Definition: enums.h:339
-
GPU_TEXUNIT
Supported texture units.
Definition: enums.h:36
-
Keep old value. (old_stencil)
Definition: enums.h:104
-
Source alpha.
Definition: enums.h:226
-
Unknown.
Definition: enums.h:238
-
4x
Definition: enums.h:274
-
GPU_TEXCOLOR
Supported texture formats.
Definition: enums.h:44
-
Source color.
Definition: enums.h:142
-
5-bit Red + 6-bit Green + 5-bit Blue
Definition: enums.h:67
-
8-bit Red + 8-bit Green + 8-bit Blue + 8-bit Alpha
Definition: enums.h:64
-
Source blue - 1.
Definition: enums.h:252
-
Bitwise XOR.
Definition: enums.h:171
-
Source green - 1.
Definition: enums.h:250
-
Normal*HalfVector.
Definition: enums.h:334
-
1x
Definition: enums.h:272
-
Write blue.
Definition: enums.h:119
-
GPU_BUMPMODE
Bump map modes.
Definition: enums.h:311
-
Primary fragment color.
Definition: enums.h:210
-
8x scale.
Definition: enums.h:348
-
8-bit byte.
Definition: enums.h:189
-
GPU_TEVOP_A
Texture Alpha combiner operands.
Definition: enums.h:243
+
Interpolate.
Definition: enums.h:282
+
Replace value. (ref)
Definition: enums.h:126
+
Unknown.
Definition: enums.h:255
+
8-bit unsigned byte.
Definition: enums.h:210
+
Modulate.
Definition: enums.h:279
+
Triangle fan.
Definition: enums.h:386
+
Write green.
Definition: enums.h:138
+
Constant alpha - 1.
Definition: enums.h:173
+
No operation.
Definition: enums.h:186
+
Invert.
Definition: enums.h:187
+
Texture unit 3.
Definition: enums.h:235
+
2D Shadow texture
Definition: enums.h:40
+
0.25x scale.
Definition: enums.h:369
+
Texture unit 2.
Definition: enums.h:234
+
Geometry shader.
Definition: enums.h:394
+
Bitwise NAND.
Definition: enums.h:188
+
GPU_DEPTHBUF
Supported depth buffer formats.
Definition: enums.h:83
+
GPU_TEVSRC
Texture combiner sources.
Definition: enums.h:227
+
Shadow mode (?).
Definition: enums.h:203
+
Inverted copy.
Definition: enums.h:185
+
GPU_WRITEMASK
Pixel write mask.
Definition: enums.h:135
+
Pass if less than or equal.
Definition: enums.h:108
+
5-bit Red + 5-bit Green + 5-bit Blue + 1-bit Alpha
Definition: enums.h:77
+
Unknown.
Definition: enums.h:251
+
1x scale.
Definition: enums.h:365
+
Subtract colors.
Definition: enums.h:151
+
0.5x scale.
Definition: enums.h:370
+
Source color - 1.
Definition: enums.h:163
+
Pass if greater than.
Definition: enums.h:99
+
Pass if greater than or equal.
Definition: enums.h:106
+
Vertex shader.
Definition: enums.h:393
+
5-bit Red + 5-bit Green + 5-bit Blue + 1-bit Alpha
Definition: enums.h:59
+
Always pass.
Definition: enums.h:94
+
Texture unit 1.
Definition: enums.h:233
+
Reverse bitwise OR.
Definition: enums.h:194
+
Front, counter-clockwise.
Definition: enums.h:219
+
cosine of phi
Definition: enums.h:359
+
GPU_TEXUNIT
Supported texture units.
Definition: enums.h:47
+
Keep old value. (old_stencil)
Definition: enums.h:124
+
Source alpha.
Definition: enums.h:246
+
Unknown.
Definition: enums.h:258
+
4x
Definition: enums.h:294
+
GPU_TEXCOLOR
Supported texture formats.
Definition: enums.h:55
+
Source color.
Definition: enums.h:162
+
5-bit Red + 6-bit Green + 5-bit Blue
Definition: enums.h:78
+
8-bit Red + 8-bit Green + 8-bit Blue + 8-bit Alpha
Definition: enums.h:75
+
Source blue - 1.
Definition: enums.h:272
+
Bitwise XOR.
Definition: enums.h:191
+
Source green - 1.
Definition: enums.h:270
+
Normal*HalfVector.
Definition: enums.h:354
+
1x
Definition: enums.h:292
+
Write blue.
Definition: enums.h:139
+
GPU_TEXTURE_MODE_PARAM
Texture modes.
Definition: enums.h:36
+
GPU_BUMPMODE
Bump map modes.
Definition: enums.h:331
+
Primary fragment color.
Definition: enums.h:230
+
8x scale.
Definition: enums.h:368
+
8-bit byte.
Definition: enums.h:209
+
GPU_TEVOP_A
Texture Alpha combiner operands.
Definition: enums.h:263
Repeats with mirrored texture.
Definition: enums.h:32
GPU_TEXTURE_WRAP_PARAM
Texture wrap modes.
Definition: enums.h:27
-
D0 LUT.
Definition: enums.h:321
-
Saturated alpha.
Definition: enums.h:154
+
D0 LUT.
Definition: enums.h:341
+
Saturated alpha.
Definition: enums.h:174
Linear interpolation.
Definition: enums.h:23
-
Source green.
Definition: enums.h:232
-
Zero.
Definition: enums.h:140
-
Zero. (0)
Definition: enums.h:105
-
GPU_LIGHTLUTID
LUT IDs.
Definition: enums.h:319
-
8-bit Alpha
Definition: enums.h:54
-
Bump as tangent/normal mapping.
Definition: enums.h:315
-
Inverted bitwize OR.
Definition: enums.h:175
+
Source green.
Definition: enums.h:252
+
Zero.
Definition: enums.h:160
+
Zero. (0)
Definition: enums.h:125
+
GPU_LIGHTLUTID
LUT IDs.
Definition: enums.h:339
+
8-bit Alpha
Definition: enums.h:65
+
Bump as tangent/normal mapping.
Definition: enums.h:335
+
Inverted bitwize OR.
Definition: enums.h:195
Repeats texture.
Definition: enums.h:31
-
Disabled.
Definition: enums.h:198
-
Disable.
Definition: enums.h:95
-
-LightVector*SpotlightVector
Definition: enums.h:338
-
Equivalent.
Definition: enums.h:172
-
GPU_TEVSCALE
Texture scale factors.
Definition: enums.h:270
-
Source alpha - 1.
Definition: enums.h:147
-
8-bit Red + 8-bit Green + 8-bit Blue
Definition: enums.h:47
-
Reflection-Blue LUT.
Definition: enums.h:325
-
None.
Definition: enums.h:304
-
Disabled.
Definition: enums.h:313
-
Decrement value. (old_stencil - 1 saturated to [0, 255])
Definition: enums.h:108
-
8-bit Luminance
Definition: enums.h:53
-
24-bit Depth
Definition: enums.h:75
-
ETC1 texture compression + 4-bit Alpha.
Definition: enums.h:58
-
Unknown.
Definition: enums.h:234
+
Disabled.
Definition: enums.h:218
+
Disable.
Definition: enums.h:115
+
-LightVector*SpotlightVector
Definition: enums.h:358
+
Equivalent.
Definition: enums.h:192
+
GPU_TEVSCALE
Texture scale factors.
Definition: enums.h:290
+
Source alpha - 1.
Definition: enums.h:167
+
8-bit Red + 8-bit Green + 8-bit Blue
Definition: enums.h:58
+
Reflection-Blue LUT.
Definition: enums.h:345
+
None.
Definition: enums.h:324
+
Disabled.
Definition: enums.h:333
+
Decrement value. (old_stencil - 1 saturated to [0, 255])
Definition: enums.h:128
+
8-bit Luminance
Definition: enums.h:64
+
24-bit Depth
Definition: enums.h:86
+
ETC1 texture compression + 4-bit Alpha.
Definition: enums.h:69
+
Unknown.
Definition: enums.h:254
Deprecated:
-
Examples:
graphics/gpu/textured_cube/source/main.c.
+
Examples:
graphics/gpu/textured_cube/source/main.c.
diff --git a/gpu-old_8h_source.html b/gpu-old_8h_source.html index 95c040c..e7fc4fd 100644 --- a/gpu-old_8h_source.html +++ b/gpu-old_8h_source.html @@ -326,30 +326,30 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
234  */
void GPU_SetStencilOp(GPU_STENCILOP sfail, GPU_STENCILOP dfail, GPU_STENCILOP pass) DEPRECATED
Sets the stencil test operators.
-
GPU_CULLMODE
Cull modes.
Definition: enums.h:196
+
GPU_CULLMODE
Cull modes.
Definition: enums.h:216
void GPU_SetTextureEnable(GPU_TEXUNIT units) DEPRECATED
Sets the enabled texture units.
void GPU_SetAlphaBlending(GPU_BLENDEQUATION colorEquation, GPU_BLENDEQUATION alphaEquation, GPU_BLENDFACTOR colorSrc, GPU_BLENDFACTOR colorDst, GPU_BLENDFACTOR alphaSrc, GPU_BLENDFACTOR alphaDst) DEPRECATED
Sets the alpha blending parameters.
void GPU_Init(Handle *gsphandle) DEPRECATED
Initializes the GPU.
void GPU_SetFaceCulling(GPU_CULLMODE mode) DEPRECATED
Sets the face culling mode.
void GPU_SetViewport(u32 *depthBuffer, u32 *colorBuffer, u32 x, u32 y, u32 w, u32 h) DEPRECATED
Sets the viewport.
uint16_t u16
16-bit unsigned integer
Definition: types.h:22
-
GPU_STENCILOP
Stencil operations.
Definition: enums.h:102
+
GPU_STENCILOP
Stencil operations.
Definition: enums.h:122
void GPU_Reset(u32 *gxbuf, u32 *gpuBuf, u32 gpuBufSize) DEPRECATED
Resets the GPU.
void GPU_DrawElements(GPU_Primitive_t primitive, u32 *indexArray, u32 n) DEPRECATED
Draws vertex elements.
-
GPU_BLENDEQUATION
Blend modes.
Definition: enums.h:128
+
GPU_BLENDEQUATION
Blend modes.
Definition: enums.h:148
void GPU_SetTexEnv(u8 id, u16 rgbSources, u16 alphaSources, u16 rgbOperands, u16 alphaOperands, GPU_COMBINEFUNC rgbCombine, GPU_COMBINEFUNC alphaCombine, u32 constantColor) DEPRECATED
Sets the parameters of a texture combiner.
void GPU_DepthMap(float zScale, float zOffset) DEPRECATED
Sets the depth map.
u32 Handle
Resource handle.
Definition: types.h:41
void GPU_SetDepthTestAndWriteMask(bool enable, GPU_TESTFUNC function, GPU_WRITEMASK writemask) DEPRECATED
Sets the depth test parameters and pixel write mask.
-
GPU_TESTFUNC
Test functions.
Definition: enums.h:80
-
GPU_BLENDFACTOR
Blend factors.
Definition: enums.h:138
+
GPU_TESTFUNC
Test functions.
Definition: enums.h:91
+
GPU_BLENDFACTOR
Blend factors.
Definition: enums.h:158
uint8_t u8
would be nice if newlib had this already
Definition: types.h:21
void GPU_DrawArray(GPU_Primitive_t primitive, u32 first, u32 count) DEPRECATED
Draws an array of vertex data.
void GPU_SetColorLogicOp(GPU_LOGICOP op) DEPRECATED
Sets the color logic operator.
-
GPU_LOGICOP
Logical operations.
Definition: enums.h:158
+
GPU_LOGICOP
Logical operations.
Definition: enums.h:178
uint64_t u64
64-bit unsigned integer
Definition: types.h:24
-
GPU_SHADER_TYPE
Shader types.
Definition: enums.h:371
-
GPU_SCISSORMODE
Scissor test modes.
Definition: enums.h:93
+
GPU_SHADER_TYPE
Shader types.
Definition: enums.h:391
+
GPU_SCISSORMODE
Scissor test modes.
Definition: enums.h:113
void GPU_SetScissorTest(GPU_SCISSORMODE mode, u32 left, u32 bottom, u32 right, u32 top) DEPRECATED
Sets the current scissor test mode.
uint32_t u32
32-bit unsigned integer
Definition: types.h:23
Barebones GPU communications driver.
@@ -357,17 +357,17 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
void GPU_SetTexture(GPU_TEXUNIT unit, u32 *data, u16 width, u16 height, u32 param, GPU_TEXCOLOR colorType) DEPRECATED
Sets the texture data of a texture unit.
void GPU_SetStencilTest(bool enable, GPU_TESTFUNC function, u8 ref, u8 input_mask, u8 write_mask) DEPRECATED
Sets the stencil test parameters.
void GPU_SetAlphaTest(bool enable, GPU_TESTFUNC function, u8 ref) DEPRECATED
Sets the alpha test parameters.
-
GPU_COMBINEFUNC
Texture combiner functions.
Definition: enums.h:256
+
GPU_COMBINEFUNC
Texture combiner functions.
Definition: enums.h:276
void GPU_FinishDrawing() DEPRECATED
Finishes drawing.
-
GPU_Primitive_t
Supported primitives.
Definition: enums.h:362
+
GPU_Primitive_t
Supported primitives.
Definition: enums.h:382
void GPU_SetAttributeBuffers(u8 totalAttributes, u32 *baseAddress, u64 attributeFormats, u16 attributeMask, u64 attributePermutation, u8 numBuffers, u32 bufferOffsets[], u64 bufferPermutations[], u8 bufferNumAttributes[]) DEPRECATED
Sets the VBO attribute buffers.
void GPU_SetTextureBorderColor(GPU_TEXUNIT unit, u32 borderColor) DEPRECATED
Sets the border color of a texture unit.
#define DEPRECATED
Flags a function as deprecated.
Definition: types.h:55
void GPU_SetBlendingColor(u8 r, u8 g, u8 b, u8 a) DEPRECATED
Sets the blending color.
-
GPU_WRITEMASK
Pixel write mask.
Definition: enums.h:115
+
GPU_WRITEMASK
Pixel write mask.
Definition: enums.h:135
void GPU_SetCombinerBufferWrite(u8 rgb_config, u8 alpha_config) DEPRECATED
Sets the combiner buffer write parameters.
-
GPU_TEXUNIT
Supported texture units.
Definition: enums.h:36
-
GPU_TEXCOLOR
Supported texture formats.
Definition: enums.h:44
+
GPU_TEXUNIT
Supported texture units.
Definition: enums.h:47
+
GPU_TEXCOLOR
Supported texture formats.
Definition: enums.h:55
-
Examples:
graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, and graphics/gpu/textured_cube/source/main.c.
+
Examples:
graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, and graphics/gpu/textured_cube/source/main.c.
diff --git a/graphics_2gpu_2geoshader_2source_2main_8c-example.html b/graphics_2gpu_2geoshader_2source_2main_8c-example.html index defa173..1c360d2 100644 --- a/graphics_2gpu_2geoshader_2source_2main_8c-example.html +++ b/graphics_2gpu_2geoshader_2source_2main_8c-example.html @@ -158,12 +158,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
// This is unknown
- - +
GPUCMD_AddMaskedWrite(GPUREG_0062, 0x1, 0);
+
GPUCMD_AddWrite(GPUREG_0118, 0);
// Configure alpha blending and test
- - + +
int i;
for (i = 0; i < 6; i ++)
@@ -173,30 +173,30 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
void gpuFrameEnd(void)
{
// Finish rendering
- - - -
gspWaitForP3D(); // Wait for the rendering to complete
+ + + +
gspWaitForP3D(); // Wait for the rendering to complete
// Transfer the GPU output to the framebuffer
- -
colorBuf, GX_BUFFER_DIM(240, 400),
-
(u32*)gfxGetFramebuffer(GFX_TOP, GFX_LEFT, NULL, NULL), GX_BUFFER_DIM(240, 400),
+ +
colorBuf, GX_BUFFER_DIM(240, 400),
+
(u32*)gfxGetFramebuffer(GFX_TOP, GFX_LEFT, NULL, NULL), GX_BUFFER_DIM(240, 400),
DISPLAY_TRANSFER_FLAGS);
-
gspWaitForPPF(); // Wait for the transfer to complete
+
gspWaitForPPF(); // Wait for the transfer to complete
// Reset the command buffer
- +
};
void GPU_SetDummyTexEnv(int id)
{
- - + + -
GPU_TEVOPERANDS(0, 0, 0),
+
GPU_TEVOPERANDS(0, 0, 0),
GPU_TEVOPERANDS(0, 0, 0),
- +
0xFFFFFFFF);
}
@@ -568,8 +568,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
#define vertex_list_count (sizeof(vertex_list)/sizeof(vertex_list[0]))
-
static DVLB_s *vshader_dvlb, *gshader_dvlb;
-
static shaderProgram_s program;
+
static DVLB_s *vshader_dvlb, *gshader_dvlb;
+
static shaderProgram_s program;
static int uLoc_projection;
static matrix_4x4 projection;
@@ -579,14 +579,14 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
{
// Load the shaders and create a shader program
// The geoshader stride is set to 6 so that it processes a triangle at a time
-
vshader_dvlb = DVLB_ParseFile((u32*)vshader_shbin, vshader_shbin_size);
+
vshader_dvlb = DVLB_ParseFile((u32*)vshader_shbin, vshader_shbin_size);
gshader_dvlb = DVLB_ParseFile((u32*)gshader_shbin, gshader_shbin_size);
-
shaderProgramInit(&program);
-
shaderProgramSetVsh(&program, &vshader_dvlb->DVLE[0]);
-
shaderProgramSetGsh(&program, &gshader_dvlb->DVLE[0], 6);
+
shaderProgramInit(&program);
+
shaderProgramSetVsh(&program, &vshader_dvlb->DVLE[0]);
+
shaderProgramSetGsh(&program, &gshader_dvlb->DVLE[0], 6);
// Get the location of the projection matrix uniform
-
uLoc_projection = shaderInstanceGetUniformLocation(program.geometryShader, "projection");
+
uLoc_projection = shaderInstanceGetUniformLocation(program.geometryShader, "projection");
// Compute the projection matrix
m4x4_ortho_tilt(&projection, 0.0, 400.0, 0.0, 240.0, 0.0, 1.0);
@@ -599,12 +599,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
static void sceneRender(void)
{
// Bind the shader program
-
shaderProgramUse(&program);
+
shaderProgramUse(&program);
// Configure the first fragment shading substage to just pass through the vertex color
// See https://www.opengl.org/sdk/docs/man2/xhtml/glTexEnv.xml for more insight
- +
GPU_TEVOPERANDS(0, 0, 0), // RGB
GPU_TEVOPERANDS(0, 0, 0), // Alpha
@@ -612,10 +612,10 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
0xFFFFFFFF);
// Configure the "attribute buffers" (that is, the vertex input buffers)
- +
2, // Number of inputs per vertex
(u32*)osConvertVirtToPhys(vbo_data), // Location of the VBO
- +
GPU_ATTRIBFMT(1, 4, GPU_FLOAT), // Format of the inputs (in this case the only input is a 3-element float vector)
0xFFC, // Unused attribute mask, in our case bit 0 is cleared since it is used
0x10, // Attribute permutations (here it is the identity)
@@ -625,10 +625,10 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
(u8[]) { 2 }); // Number of attributes for each buffer
// Upload the projection matrix
-
GPU_SetFloatUniformMatrix(GPU_GEOMETRY_SHADER, uLoc_projection, &projection);
+
GPU_SetFloatUniformMatrix(GPU_GEOMETRY_SHADER, uLoc_projection, &projection);
// Draw the VBO - GPU_GEOMETRY_PRIM allows the geoshader to control primitive emission
-
GPU_DrawArray(GPU_GEOMETRY_PRIM, 0, vertex_list_count);
+
GPU_DrawArray(GPU_GEOMETRY_PRIM, 0, vertex_list_count);
}
static void sceneExit(void)
@@ -637,15 +637,15 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
linearFree(vbo_data);
// Free the shader program
-
shaderProgramFree(&program);
-
DVLB_Free(vshader_dvlb);
+
shaderProgramFree(&program);
+
DVLB_Free(vshader_dvlb);
DVLB_Free(gshader_dvlb);
}
int main()
{
// Initialize graphics
- +
gpuInit();
// Initialize the scene
@@ -653,15 +653,15 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
gpuClearBuffers(CLEAR_COLOR);
// Main loop
-
while (aptMainLoop())
+
while (aptMainLoop())
{
-
gspWaitForVBlank(); // Synchronize with the start of VBlank
-
gfxSwapBuffersGpu(); // Swap the framebuffers so that the frame that we rendered last frame is now visible
-
hidScanInput(); // Read the user input
+
gspWaitForVBlank(); // Synchronize with the start of VBlank
+
gfxSwapBuffersGpu(); // Swap the framebuffers so that the frame that we rendered last frame is now visible
+
hidScanInput(); // Read the user input
// Respond to user input
-
u32 kDown = hidKeysDown();
-
if (kDown & KEY_START)
+
u32 kDown = hidKeysDown();
+
if (kDown & KEY_START)
break; // break in order to return to hbmenu
// Render the scene
@@ -679,7 +679,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
// Deinitialize graphics
gpuExit();
- +
return 0;
}
diff --git a/graphics_2gpu_2simple_tri_2source_2main_8c-example.html b/graphics_2gpu_2simple_tri_2source_2main_8c-example.html index f8b4c89..78162c4 100644 --- a/graphics_2gpu_2simple_tri_2source_2main_8c-example.html +++ b/graphics_2gpu_2simple_tri_2source_2main_8c-example.html @@ -158,12 +158,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
// This is unknown
- - +
GPUCMD_AddMaskedWrite(GPUREG_0062, 0x1, 0);
+
GPUCMD_AddWrite(GPUREG_0118, 0);
// Configure alpha blending and test
- - + +
int i;
for (i = 0; i < 6; i ++)
@@ -173,30 +173,30 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
void gpuFrameEnd(void)
{
// Finish rendering
- - - -
gspWaitForP3D(); // Wait for the rendering to complete
+ + + +
gspWaitForP3D(); // Wait for the rendering to complete
// Transfer the GPU output to the framebuffer
- -
colorBuf, GX_BUFFER_DIM(240, 400),
-
(u32*)gfxGetFramebuffer(GFX_TOP, GFX_LEFT, NULL, NULL), GX_BUFFER_DIM(240, 400),
+ +
colorBuf, GX_BUFFER_DIM(240, 400),
+
(u32*)gfxGetFramebuffer(GFX_TOP, GFX_LEFT, NULL, NULL), GX_BUFFER_DIM(240, 400),
DISPLAY_TRANSFER_FLAGS);
-
gspWaitForPPF(); // Wait for the transfer to complete
+
gspWaitForPPF(); // Wait for the transfer to complete
// Reset the command buffer
- +
};
void GPU_SetDummyTexEnv(int id)
{
- - + + -
GPU_TEVOPERANDS(0, 0, 0),
+
GPU_TEVOPERANDS(0, 0, 0),
GPU_TEVOPERANDS(0, 0, 0),
- +
0xFFFFFFFF);
}
@@ -484,8 +484,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
#define vertex_list_count (sizeof(vertex_list)/sizeof(vertex_list[0]))
-
static DVLB_s* vshader_dvlb;
-
static shaderProgram_s program;
+
static DVLB_s* vshader_dvlb;
+
static shaderProgram_s program;
static int uLoc_projection;
static matrix_4x4 projection;
@@ -494,12 +494,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
static void sceneInit(void)
{
// Load the vertex shader and create a shader program
-
vshader_dvlb = DVLB_ParseFile((u32*)vshader_shbin, vshader_shbin_size);
-
shaderProgramInit(&program);
-
shaderProgramSetVsh(&program, &vshader_dvlb->DVLE[0]);
+
vshader_dvlb = DVLB_ParseFile((u32*)vshader_shbin, vshader_shbin_size);
+
shaderProgramInit(&program);
+
shaderProgramSetVsh(&program, &vshader_dvlb->DVLE[0]);
// Get the location of the projection matrix uniform
-
uLoc_projection = shaderInstanceGetUniformLocation(program.vertexShader, "projection");
+
uLoc_projection = shaderInstanceGetUniformLocation(program.vertexShader, "projection");
// Compute the projection matrix
m4x4_ortho_tilt(&projection, 0.0, 400.0, 0.0, 240.0, 0.0, 1.0);
@@ -512,12 +512,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
static void sceneRender(void)
{
// Bind the shader program
-
shaderProgramUse(&program);
+
shaderProgramUse(&program);
// Configure the first fragment shading substage to just pass through the vertex color
// See https://www.opengl.org/sdk/docs/man2/xhtml/glTexEnv.xml for more insight
- +
GPU_TEVOPERANDS(0, 0, 0), // RGB
GPU_TEVOPERANDS(0, 0, 0), // Alpha
@@ -525,10 +525,10 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
0xFFFFFFFF);
// Configure the "attribute buffers" (that is, the vertex input buffers)
- +
1, // Number of inputs per vertex
(u32*)osConvertVirtToPhys((u32)vbo_data), // Location of the VBO
-
GPU_ATTRIBFMT(0, 3, GPU_FLOAT), // Format of the inputs (in this case the only input is a 3-element float vector)
+
GPU_ATTRIBFMT(0, 3, GPU_FLOAT), // Format of the inputs (in this case the only input is a 3-element float vector)
0xFFE, // Unused attribute mask, in our case bit 0 is cleared since it is used
0x0, // Attribute permutations (here it is the identity)
1, // Number of buffers
@@ -537,10 +537,10 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
(u8[]) { 1 }); // Number of attributes for each buffer
// Upload the projection matrix
-
GPU_SetFloatUniformMatrix(GPU_VERTEX_SHADER, uLoc_projection, &projection);
+
GPU_SetFloatUniformMatrix(GPU_VERTEX_SHADER, uLoc_projection, &projection);
// Draw the VBO
-
GPU_DrawArray(GPU_TRIANGLES, 0, vertex_list_count);
+
GPU_DrawArray(GPU_TRIANGLES, 0, vertex_list_count);
}
static void sceneExit(void)
@@ -549,14 +549,14 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
linearFree(vbo_data);
// Free the shader program
-
shaderProgramFree(&program);
-
DVLB_Free(vshader_dvlb);
+
shaderProgramFree(&program);
+
DVLB_Free(vshader_dvlb);
}
int main()
{
// Initialize graphics
- +
gpuInit();
// Initialize the scene
@@ -564,15 +564,15 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
gpuClearBuffers(CLEAR_COLOR);
// Main loop
-
while (aptMainLoop())
+
while (aptMainLoop())
{
-
gspWaitForVBlank(); // Synchronize with the start of VBlank
-
gfxSwapBuffersGpu(); // Swap the framebuffers so that the frame that we rendered last frame is now visible
-
hidScanInput(); // Read the user input
+
gspWaitForVBlank(); // Synchronize with the start of VBlank
+
gfxSwapBuffersGpu(); // Swap the framebuffers so that the frame that we rendered last frame is now visible
+
hidScanInput(); // Read the user input
// Respond to user input
-
u32 kDown = hidKeysDown();
-
if (kDown & KEY_START)
+
u32 kDown = hidKeysDown();
+
if (kDown & KEY_START)
break; // break in order to return to hbmenu
// Render the scene
@@ -590,7 +590,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
// Deinitialize graphics
gpuExit();
- +
return 0;
}
diff --git a/graphics_2gpu_2textured_cube_2source_2main_8c-example.html b/graphics_2gpu_2textured_cube_2source_2main_8c-example.html index 24b5f16..8e74dc7 100644 --- a/graphics_2gpu_2textured_cube_2source_2main_8c-example.html +++ b/graphics_2gpu_2textured_cube_2source_2main_8c-example.html @@ -158,12 +158,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
// This is unknown
- - +
GPUCMD_AddMaskedWrite(GPUREG_0062, 0x1, 0);
+
GPUCMD_AddWrite(GPUREG_0118, 0);
// Configure alpha blending and test
- - + +
int i;
for (i = 0; i < 6; i ++)
@@ -173,30 +173,30 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
void gpuFrameEnd(void)
{
// Finish rendering
- - - -
gspWaitForP3D(); // Wait for the rendering to complete
+ + + +
gspWaitForP3D(); // Wait for the rendering to complete
// Transfer the GPU output to the framebuffer
- -
colorBuf, GX_BUFFER_DIM(240, 400),
-
(u32*)gfxGetFramebuffer(GFX_TOP, GFX_LEFT, NULL, NULL), GX_BUFFER_DIM(240, 400),
+ +
colorBuf, GX_BUFFER_DIM(240, 400),
+
(u32*)gfxGetFramebuffer(GFX_TOP, GFX_LEFT, NULL, NULL), GX_BUFFER_DIM(240, 400),
DISPLAY_TRANSFER_FLAGS);
-
gspWaitForPPF(); // Wait for the transfer to complete
+
gspWaitForPPF(); // Wait for the transfer to complete
// Reset the command buffer
- +
};
void GPU_SetDummyTexEnv(int id)
{
- - + + -
GPU_TEVOPERANDS(0, 0, 0),
+
GPU_TEVOPERANDS(0, 0, 0),
GPU_TEVOPERANDS(0, 0, 0),
- +
0xFFFFFFFF);
}
@@ -599,8 +599,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
#define vertex_list_count (sizeof(vertex_list)/sizeof(vertex_list[0]))
-
static DVLB_s* vshader_dvlb;
-
static shaderProgram_s program;
+
static DVLB_s* vshader_dvlb;
+
static shaderProgram_s program;
static int uLoc_projection, uLoc_modelView;
static int uLoc_lightVec, uLoc_lightHalfVec, uLoc_lightClr, uLoc_material;
static matrix_4x4 projection;
@@ -621,12 +621,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
static void sceneInit(void)
{
// Load the vertex shader and create a shader program
-
vshader_dvlb = DVLB_ParseFile((u32*)vshader_shbin, vshader_shbin_size);
-
shaderProgramInit(&program);
-
shaderProgramSetVsh(&program, &vshader_dvlb->DVLE[0]);
+
vshader_dvlb = DVLB_ParseFile((u32*)vshader_shbin, vshader_shbin_size);
+
shaderProgramInit(&program);
+
shaderProgramSetVsh(&program, &vshader_dvlb->DVLE[0]);
// Get the location of the uniforms
-
uLoc_projection = shaderInstanceGetUniformLocation(program.vertexShader, "projection");
+
uLoc_projection = shaderInstanceGetUniformLocation(program.vertexShader, "projection");
uLoc_modelView = shaderInstanceGetUniformLocation(program.vertexShader, "modelView");
uLoc_lightVec = shaderInstanceGetUniformLocation(program.vertexShader, "lightVec");
uLoc_lightHalfVec = shaderInstanceGetUniformLocation(program.vertexShader, "lightHalfVec");
@@ -648,35 +648,35 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
static void sceneRender(void)
{
// Bind the shader program
-
shaderProgramUse(&program);
+
shaderProgramUse(&program);
// Configure the first fragment shading substage to blend the texture color with
// the vertex color (calculated by the vertex shader using a lighting algorithm)
// See https://www.opengl.org/sdk/docs/man2/xhtml/glTexEnv.xml for more insight
- +
GPU_TEVOPERANDS(0, 0, 0), // RGB
GPU_TEVOPERANDS(0, 0, 0), // Alpha
-
GPU_MODULATE, GPU_MODULATE, // RGB, Alpha
+
GPU_MODULATE, GPU_MODULATE, // RGB, Alpha
0xFFFFFFFF);
// Configure the first texture unit
- - + +
(u32*)osConvertVirtToPhys(tex_data),
64, // Width
64, // Height
- -
GPU_RGBA8 // Pixel format
+ +
GPU_RGBA8 // Pixel format
);
// Configure the "attribute buffers" (that is, the vertex input buffers)
- +
3, // Number of inputs per vertex
(u32*)osConvertVirtToPhys(vbo_data), // Location of the VBO
-
GPU_ATTRIBFMT(0, 3, GPU_FLOAT) | // Format of the inputs
+
GPU_ATTRIBFMT(0, 3, GPU_FLOAT) | // Format of the inputs
0xFFC, // Unused attribute mask, in our case bits 0~2 are cleared since they are used
@@ -698,7 +698,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
angleY += M_PI / 360;
// Upload the uniforms
-
GPU_SetFloatUniformMatrix(GPU_VERTEX_SHADER, uLoc_projection, &projection);
+
GPU_SetFloatUniformMatrix(GPU_VERTEX_SHADER, uLoc_projection, &projection);
GPU_SetFloatUniformMatrix(GPU_VERTEX_SHADER, uLoc_modelView, &modelView);
GPU_SetFloatUniformMatrix(GPU_VERTEX_SHADER, uLoc_material, &material);
GPU_SetFloatUniform(GPU_VERTEX_SHADER, uLoc_lightVec, (u32*)(float[]){0.0f, -1.0f, 0.0f, 0.0f}, 1);
@@ -706,7 +706,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
GPU_SetFloatUniform(GPU_VERTEX_SHADER, uLoc_lightClr, (u32*)(float[]){1.0f, 1.0f, 1.0f, 1.0f}, 1);
// Draw the VBO
-
GPU_DrawArray(GPU_TRIANGLES, 0, vertex_list_count);
+
GPU_DrawArray(GPU_TRIANGLES, 0, vertex_list_count);
}
static void sceneExit(void)
@@ -718,14 +718,14 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
linearFree(vbo_data);
// Free the shader program
-
shaderProgramFree(&program);
-
DVLB_Free(vshader_dvlb);
+
shaderProgramFree(&program);
+
DVLB_Free(vshader_dvlb);
}
int main()
{
// Initialize graphics
- +
gpuInit();
// Initialize the scene
@@ -733,15 +733,15 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
gpuClearBuffers(CLEAR_COLOR);
// Main loop
-
while (aptMainLoop())
+
while (aptMainLoop())
{
-
gspWaitForVBlank(); // Synchronize with the start of VBlank
-
gfxSwapBuffersGpu(); // Swap the framebuffers so that the frame that we rendered last frame is now visible
-
hidScanInput(); // Read the user input
+
gspWaitForVBlank(); // Synchronize with the start of VBlank
+
gfxSwapBuffersGpu(); // Swap the framebuffers so that the frame that we rendered last frame is now visible
+
hidScanInput(); // Read the user input
// Respond to user input
-
u32 kDown = hidKeysDown();
-
if (kDown & KEY_START)
+
u32 kDown = hidKeysDown();
+
if (kDown & KEY_START)
break; // break in order to return to hbmenu
// Render the scene
@@ -759,7 +759,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
// Deinitialize graphics
gpuExit();
- +
return 0;
}
diff --git a/gx_8h.html b/gx_8h.html index 32bc80a..f5fbedf 100644 --- a/gx_8h.html +++ b/gx_8h.html @@ -356,7 +356,7 @@ Variables
-
Examples:
graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, and graphics/gpu/textured_cube/source/main.c.
+
Examples:
graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, and graphics/gpu/textured_cube/source/main.c.
diff --git a/hid_8h.html b/hid_8h.html index 027d510..7a0b712 100644 --- a/hid_8h.html +++ b/hid_8h.html @@ -520,7 +520,7 @@ Variables

Gets keys that were just pressed.

Individual keys can be checked by ORing them with this value.

Returns
Keys down.
-
Examples:
app_launch/source/main.c, audio/mic/source/main.c, get_system_language/source/main.c, graphics/bitmap/24bit-color/source/main.c, graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, graphics/gpu/textured_cube/source/main.c, graphics/printing/both-screen-text/source/main.c, graphics/printing/colored-text/source/main.c, graphics/printing/hello-world/source/main.c, graphics/printing/multiple-windows-text/source/main.c, http/source/main.c, input/read-controls/source/main.c, input/touch-screen/source/main.c, libapplet_launch/source/main.c, mvd/source/main.c, qtm/source/main.c, threads/event/source/main.c, and time/rtc/source/main.c.
+
Examples:
app_launch/source/main.c, audio/mic/source/main.c, get_system_language/source/main.c, graphics/bitmap/24bit-color/source/main.c, graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, graphics/gpu/textured_cube/source/main.c, graphics/printing/both-screen-text/source/main.c, graphics/printing/colored-text/source/main.c, graphics/printing/hello-world/source/main.c, graphics/printing/multiple-windows-text/source/main.c, http/source/main.c, input/read-controls/source/main.c, input/touch-screen/source/main.c, libapplet_launch/source/main.c, mvd/source/main.c, qtm/source/main.c, threads/event/source/main.c, and time/rtc/source/main.c.
diff --git a/registers_8h.html b/registers_8h.html index ee203df..7c5881c 100644 --- a/registers_8h.html +++ b/registers_8h.html @@ -383,26 +383,26 @@ Macros #define GPUREG_0046   0x0046  Unknown.
  - -#define GPUREG_0047   0x0047 - Unknown.
-  - -#define GPUREG_0048   0x0048 - Unknown.
-  - -#define GPUREG_0049   0x0049 - Unknown.
-  - -#define GPUREG_004A   0x004A - Unknown.
-  - -#define GPUREG_004B   0x004B - Unknown.
-  + +#define GPUREG_FRAGOP_CLIP   0x0047 + Unknown.
+  + +#define GPUREG_FRAGOP_CLIP_DATA0   0x0048 + Unknown.
+  + +#define GPUREG_FRAGOP_CLIP_DATA1   0x0049 + Unknown.
+  + +#define GPUREG_FRAGOP_CLIP_DATA2   0x004A + Unknown.
+  + +#define GPUREG_FRAGOP_CLIP_DATA3   0x004B + Unknown.
#define GPUREG_004C   0x004C  Unknown.
@@ -487,22 +487,22 @@ Macros #define GPUREG_0060   0x0060  Unknown.
  - -#define GPUREG_0061   0x0061 - Unknown.
-  - -#define GPUREG_0062   0x0062 - Unknown.
-  - -#define GPUREG_0063   0x0063 - Unknown.
-  - -#define GPUREG_0064   0x0064 - Unknown.
-  + +#define GPUREG_EARLYDEPTH_FUNC   0x0061 + Unknown.
+  + +#define GPUREG_EARLYDEPTH_TEST1   0x0062 + Unknown.
+  + +#define GPUREG_EARLYDEPTH_CLEAR   0x0063 + Unknown.
+  + +#define GPUREG_SH_OUTATTR_MODE   0x0064 + Shader output attributes mode.
#define GPUREG_SCISSORTEST_MODE   0x0065  Scissor test mode.
@@ -523,10 +523,10 @@ Macros #define GPUREG_0069   0x0069  Unknown.
  - -#define GPUREG_006A   0x006A - Unknown.
-  + +#define GPUREG_EARLYDEPTH_DATA   0x006A + Unknown.
#define GPUREG_006B   0x006B  Unknown.
@@ -535,18 +535,18 @@ Macros #define GPUREG_006C   0x006C  Unknown.
  - -#define GPUREG_006D   0x006D - Unknown.
-  - -#define GPUREG_FRAMEBUFFER_DIM2   0x006E - Framebuffer dimensions.
-  - -#define GPUREG_006F   0x006F - Unknown.
-  + +#define GPUREG_DEPTHMAP_ENABLE   0x006D + Depth map enable.
+  + +#define GPUREG_RENDERBUF_DIM   0x006E + Renderbuffer dimensions.
+  + +#define GPUREG_SH_OUTATTR_CLOCK   0x006F + Shader output attributes clock enable.
#define GPUREG_0070   0x0070  Unknown.
@@ -612,10 +612,10 @@ Macros  Unknown.
 
Texturing registers (0x080-0x0FF)
- -#define GPUREG_TEXUNIT_ENABLE   0x0080 - Enabled texture units.
-  + +#define GPUREG_TEXUNIT_CONFIG   0x0080 + Texture unit configuration.
#define GPUREG_TEXUNIT0_BORDER_COLOR   0x0081  Texture unit 0 border color.
@@ -628,38 +628,38 @@ Macros #define GPUREG_TEXUNIT0_PARAM   0x0083  Texture unit 0 parameters.
  - -#define GPUREG_0084   0x0084 - Unknown.
-  - -#define GPUREG_TEXUNIT0_LOC   0x0085 - Texture unit 0 address.
-  - -#define GPUREG_0086   0x0086 - Unknown.
-  - -#define GPUREG_0087   0x0087 - Unknown.
-  - -#define GPUREG_0088   0x0088 - Unknown.
-  - -#define GPUREG_0089   0x0089 - Unknown.
-  - -#define GPUREG_008A   0x008A - Unknown.
-  - -#define GPUREG_008B   0x008B - Unknown.
-  + +#define GPUREG_TEXUNIT0_LOD   0x0084 + Texture unit 0 LOD.
+  + +#define GPUREG_TEXUNIT0_ADDR1   0x0085 + Texture unit 0 address.
+  + +#define GPUREG_TEXUNIT0_ADDR2   0x0086 + Unknown.
+  + +#define GPUREG_TEXUNIT0_ADDR3   0x0087 + Unknown.
+  + +#define GPUREG_TEXUNIT0_ADDR4   0x0088 + Unknown.
+  + +#define GPUREG_TEXUNIT0_ADDR5   0x0089 + Unknown.
+  + +#define GPUREG_TEXUNIT0_ADDR6   0x008A + Unknown.
+  + +#define GPUREG_TEXUNIT0_SHADOW   0x008B + Unknown.
#define GPUREG_008C   0x008C  Unknown.
@@ -692,14 +692,14 @@ Macros #define GPUREG_TEXUNIT1_PARAM   0x0093  Texture unit 1 parameters.
  - -#define GPUREG_0094   0x0094 - Unknown.
-  - -#define GPUREG_TEXUNIT1_LOC   0x0095 - Texture unit 1 address.
-  + +#define GPUREG_TEXUNIT1_LOD   0x0094 + Texture unit 1 LOD.
+  + +#define GPUREG_TEXUNIT1_ADDR   0x0095 + Texture unit 1 address.
#define GPUREG_TEXUNIT1_TYPE   0x0096  Texture unit 1 type.
@@ -724,14 +724,14 @@ Macros #define GPUREG_TEXUNIT2_PARAM   0x009B  Texture unit 2 parameters.
  - -#define GPUREG_009C   0x009C - Unknown.
-  - -#define GPUREG_TEXUNIT2_LOC   0x009D - Texture unit 2 location.
-  + +#define GPUREG_TEXUNIT2_LOD   0x009C + Texture unit 2 LOD.
+  + +#define GPUREG_TEXUNIT2_ADDR   0x009D + Texture unit 2 address.
#define GPUREG_TEXUNIT2_TYPE   0x009E  Texture unit 2 type.
@@ -772,70 +772,70 @@ Macros #define GPUREG_00A7   0x00A7  Unknown.
  - -#define GPUREG_00A8   0x00A8 - Unknown.
-  - -#define GPUREG_00A9   0x00A9 - Unknown.
-  - -#define GPUREG_00AA   0x00AA - Unknown.
-  - -#define GPUREG_00AB   0x00AB - Unknown.
-  - -#define GPUREG_00AC   0x00AC - Unknown.
-  - -#define GPUREG_00AD   0x00AD - Unknown.
-  + +#define GPUREG_TEXUNIT3_PROTEX0   0x00A8 + Unknown.
+  + +#define GPUREG_TEXUNIT3_PROTEX1   0x00A9 + Unknown.
+  + +#define GPUREG_TEXUNIT3_PROTEX2   0x00AA + Unknown.
+  + +#define GPUREG_TEXUNIT3_PROTEX3   0x00AB + Unknown.
+  + +#define GPUREG_TEXUNIT3_PROTEX4   0x00AC + Unknown.
+  + +#define GPUREG_TEXUNIT3_PROTEX5   0x00AD + Unknown.
#define GPUREG_00AE   0x00AE  Unknown.
  - -#define GPUREG_00AF   0x00AF - Unknown.
-  - -#define GPUREG_00B0   0x00B0 - Unknown.
-  - -#define GPUREG_00B1   0x00B1 - Unknown.
-  - -#define GPUREG_00B2   0x00B2 - Unknown.
-  - -#define GPUREG_00B3   0x00B3 - Unknown.
-  - -#define GPUREG_00B4   0x00B4 - Unknown.
-  - -#define GPUREG_00B5   0x00B5 - Unknown.
-  - -#define GPUREG_00B6   0x00B6 - Unknown.
-  - -#define GPUREG_00B7   0x00B7 - Unknown.
-  + +#define GPUREG_PROTEX_LUT   0x00AF + Unknown.
+  + +#define GPUREG_PROTEX_LUT_DATA0   0x00B0 + Unknown.
+  + +#define GPUREG_PROTEX_LUT_DATA1   0x00B1 + Unknown.
+  + +#define GPUREG_PROTEX_LUT_DATA2   0x00B2 + Unknown.
+  + +#define GPUREG_PROTEX_LUT_DATA3   0x00B3 + Unknown.
+  + +#define GPUREG_PROTEX_LUT_DATA4   0x00B4 + Unknown.
+  + +#define GPUREG_PROTEX_LUT_DATA5   0x00B5 + Unknown.
+  + +#define GPUREG_PROTEX_LUT_DATA6   0x00B6 + Unknown.
+  + +#define GPUREG_PROTEX_LUT_DATA7   0x00B7 + Unknown.
#define GPUREG_00B8   0x00B8  Unknown.
@@ -1000,10 +1000,10 @@ Macros #define GPUREG_TEXENV_UPDATE_BUFFER   0x00E0  Texture env buffer update flag.
  - -#define GPUREG_00E1   0x00E1 - Unknown.
-  + +#define GPUREG_FOG_COLOR   0x00E1 + Unknown.
#define GPUREG_00E2   0x00E2  Unknown.
@@ -1012,54 +1012,54 @@ Macros #define GPUREG_00E3   0x00E3  Unknown.
  - -#define GPUREG_00E4   0x00E4 - Unknown.
-  - -#define GPUREG_00E5   0x00E5 - Unknown.
-  - -#define GPUREG_00E6   0x00E6 - Unknown.
-  + +#define GPUREG_GAS_ATTENUATION   0x00E4 + Unknown.
+  + +#define GPUREG_GAS_ACCMAX   0x00E5 + Unknown.
+  + +#define GPUREG_FOG_LUT_INDEX   0x00E6 + Unknown.
#define GPUREG_00E7   0x00E7  Unknown.
  - -#define GPUREG_00E8   0x00E8 - Unknown.
-  - -#define GPUREG_00E9   0x00E9 - Unknown.
-  - -#define GPUREG_00EA   0x00EA - Unknown.
-  - -#define GPUREG_00EB   0x00EB - Unknown.
-  - -#define GPUREG_00EC   0x00EC - Unknown.
-  - -#define GPUREG_00ED   0x00ED - Unknown.
-  - -#define GPUREG_00EE   0x00EE - Unknown.
-  - -#define GPUREG_00EF   0x00EF - Unknown.
-  + +#define GPUREG_FOG_LUT_DATA0   0x00E8 + Unknown.
+  + +#define GPUREG_FOG_LUT_DATA1   0x00E9 + Unknown.
+  + +#define GPUREG_FOG_LUT_DATA2   0x00EA + Unknown.
+  + +#define GPUREG_FOG_LUT_DATA3   0x00EB + Unknown.
+  + +#define GPUREG_FOG_LUT_DATA4   0x00EC + Unknown.
+  + +#define GPUREG_FOG_LUT_DATA5   0x00ED + Unknown.
+  + +#define GPUREG_FOG_LUT_DATA6   0x00EE + Unknown.
+  + +#define GPUREG_FOG_LUT_DATA7   0x00EF + Unknown.
#define GPUREG_TEXENV4_SOURCE   0x00F0  Texture env 4 source.
@@ -1220,10 +1220,10 @@ Macros #define GPUREG_COLORBUFFER_FORMAT   0x0117  Color buffer format.
  - -#define GPUREG_0118   0x0118 - Unknown.
-  + +#define GPUREG_EARLYDEPTH_TEST2   0x0118 + Unknown.
#define GPUREG_0119   0x0119  Unknown.
@@ -1252,34 +1252,34 @@ Macros #define GPUREG_011F   0x011F  Unknown.
  - -#define GPUREG_0120   0x0120 - Unknown.
-  - -#define GPUREG_0121   0x0121 - Unknown.
-  - -#define GPUREG_0122   0x0122 - Unknown.
-  - -#define GPUREG_0123   0x0123 - Unknown.
-  - -#define GPUREG_0124   0x0124 - Unknown.
-  + +#define GPUREG_GAS_LIGHT_XY   0x0120 + Unknown.
+  + +#define GPUREG_GAS_LIGHT_Z   0x0121 + Unknown.
+  + +#define GPUREG_GAS_LIGHT_Z_COLOR   0x0122 + Unknown.
+  + +#define GPUREG_GAS_LUT_INDEX   0x0123 + Unknown.
+  + +#define GPUREG_GAS_LUT_DATA   0x0124 + Unknown.
#define GPUREG_0125   0x0125  Unknown.
  - -#define GPUREG_0126   0x0126 - Unknown.
-  + +#define GPUREG_GAS_DELTAZ_DEPTH   0x0126 + Unknown.
#define GPUREG_0127   0x0127  Unknown.
@@ -1316,10 +1316,10 @@ Macros #define GPUREG_012F   0x012F  Unknown.
  - -#define GPUREG_0130   0x0130 - Unknown.
-  + +#define GPUREG_FRAGOP_SHADOW   0x0130 + Unknown.
#define GPUREG_0131   0x0131  Unknown.
@@ -2328,10 +2328,10 @@ Macros #define GPUREG_022C   0x022C  Unknown.
  - -#define GPUREG_022D   0x022D - Unknown.
-  + +#define GPUREG_POST_VERTEX_CACHE_NUM   0x022D + Unknown.
#define GPUREG_DRAWARRAYS   0x022E  Draw arrays trigger.
@@ -2344,10 +2344,10 @@ Macros #define GPUREG_0230   0x0230  Unknown.
  - -#define GPUREG_0231   0x0231 - Unknown.
-  + +#define GPUREG_VTX_FUNC   0x0231 + Unknown.
#define GPUREG_FIXEDATTRIB_INDEX   0x0232  Fixed attribute index.
@@ -2412,22 +2412,22 @@ Macros #define GPUREG_0241   0x0241  Unknown.
  - -#define GPUREG_0242   0x0242 - Unknown.
-  + +#define GPUREG_VSH_NUM_ATTR   0x0242 + Unknown.
#define GPUREG_0243   0x0243  Unknown.
  - -#define GPUREG_0244   0x0244 - Unknown.
-  - -#define GPUREG_0245   0x0245 - Unknown.
-  + +#define GPUREG_VSH_COM_MODE   0x0244 + Unknown.
+  + +#define GPUREG_START_DRAW_FUNC0   0x0245 + Unknown.
#define GPUREG_0246   0x0246  Unknown.
@@ -2444,10 +2444,10 @@ Macros #define GPUREG_0249   0x0249  Unknown.
  - -#define GPUREG_024A   0x024A - Unknown.
-  + +#define GPUREG_VSH_OUTMAP_TOTAL1   0x024A + Unknown.
#define GPUREG_024B   0x024B  Unknown.
@@ -2472,22 +2472,22 @@ Macros #define GPUREG_0250   0x0250  Unknown.
  - -#define GPUREG_0251   0x0251 - Unknown.
-  - -#define GPUREG_0252   0x0252 - Unknown.
-  - -#define GPUREG_0253   0x0253 - Unknown.
-  - -#define GPUREG_0254   0x0254 - Unknown.
-  + +#define GPUREG_VSH_OUTMAP_TOTAL2   0x0251 + Unknown.
+  + +#define GPUREG_GSH_MISC0   0x0252 + Unknown.
+  + +#define GPUREG_GEOSTAGE_CONFIG2   0x0253 + Unknown.
+  + +#define GPUREG_GSH_MISC1   0x0254 + Unknown.
#define GPUREG_0255   0x0255  Unknown.
diff --git a/registers_8h_source.html b/registers_8h_source.html index 884c1d7..a110875 100644 --- a/registers_8h_source.html +++ b/registers_8h_source.html @@ -173,11 +173,11 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
81 #define GPUREG_VIEWPORT_INVH 0x0044 ///< Inverted viewport height.
82 #define GPUREG_0045 0x0045 ///< Unknown
83 #define GPUREG_0046 0x0046 ///< Unknown
-
84 #define GPUREG_0047 0x0047 ///< Unknown
-
85 #define GPUREG_0048 0x0048 ///< Unknown
-
86 #define GPUREG_0049 0x0049 ///< Unknown
-
87 #define GPUREG_004A 0x004A ///< Unknown
-
88 #define GPUREG_004B 0x004B ///< Unknown
+
84 #define GPUREG_FRAGOP_CLIP 0x0047 ///< Unknown
+
85 #define GPUREG_FRAGOP_CLIP_DATA0 0x0048 ///< Unknown
+
86 #define GPUREG_FRAGOP_CLIP_DATA1 0x0049 ///< Unknown
+
87 #define GPUREG_FRAGOP_CLIP_DATA2 0x004A ///< Unknown
+
88 #define GPUREG_FRAGOP_CLIP_DATA3 0x004B ///< Unknown
89 #define GPUREG_004C 0x004C ///< Unknown
90 #define GPUREG_DEPTHMAP_SCALE 0x004D ///< Depth map scale.
91 #define GPUREG_DEPTHMAP_OFFSET 0x004E ///< Depth map offset.
@@ -199,21 +199,21 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
107 #define GPUREG_005E 0x005E ///< Unknown
108 #define GPUREG_005F 0x005F ///< Unknown
109 #define GPUREG_0060 0x0060 ///< Unknown
-
110 #define GPUREG_0061 0x0061 ///< Unknown
-
111 #define GPUREG_0062 0x0062 ///< Unknown
-
112 #define GPUREG_0063 0x0063 ///< Unknown
-
113 #define GPUREG_0064 0x0064 ///< Unknown
+
110 #define GPUREG_EARLYDEPTH_FUNC 0x0061 ///< Unknown
+
111 #define GPUREG_EARLYDEPTH_TEST1 0x0062 ///< Unknown
+
112 #define GPUREG_EARLYDEPTH_CLEAR 0x0063 ///< Unknown
+
113 #define GPUREG_SH_OUTATTR_MODE 0x0064 ///< Shader output attributes mode.
114 #define GPUREG_SCISSORTEST_MODE 0x0065 ///< Scissor test mode.
115 #define GPUREG_SCISSORTEST_POS 0x0066 ///< Scissor test position.
116 #define GPUREG_SCISSORTEST_DIM 0x0067 ///< Scissor text dimensions.
117 #define GPUREG_VIEWPORT_XY 0x0068 ///< Viewport X and Y.
118 #define GPUREG_0069 0x0069 ///< Unknown
-
119 #define GPUREG_006A 0x006A ///< Unknown
+
119 #define GPUREG_EARLYDEPTH_DATA 0x006A ///< Unknown
120 #define GPUREG_006B 0x006B ///< Unknown
121 #define GPUREG_006C 0x006C ///< Unknown
-
122 #define GPUREG_006D 0x006D ///< Unknown
-
123 #define GPUREG_FRAMEBUFFER_DIM2 0x006E ///< Framebuffer dimensions.
-
124 #define GPUREG_006F 0x006F ///< Unknown
+
122 #define GPUREG_DEPTHMAP_ENABLE 0x006D ///< Depth map enable.
+
123 #define GPUREG_RENDERBUF_DIM 0x006E ///< Renderbuffer dimensions.
+
124 #define GPUREG_SH_OUTATTR_CLOCK 0x006F ///< Shader output attributes clock enable.
125 #define GPUREG_0070 0x0070 ///< Unknown
126 #define GPUREG_0071 0x0071 ///< Unknown
127 #define GPUREG_0072 0x0072 ///< Unknown
@@ -234,18 +234,18 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
142 
143 ///@name Texturing registers (0x080-0x0FF)
144 ///@{
-
145 #define GPUREG_TEXUNIT_ENABLE 0x0080 ///< Enabled texture units.
+
145 #define GPUREG_TEXUNIT_CONFIG 0x0080 ///< Texture unit configuration.
146 #define GPUREG_TEXUNIT0_BORDER_COLOR 0x0081 ///< Texture unit 0 border color.
147 #define GPUREG_TEXUNIT0_DIM 0x0082 ///< Texture unit 0 dimensions.
148 #define GPUREG_TEXUNIT0_PARAM 0x0083 ///< Texture unit 0 parameters.
-
149 #define GPUREG_0084 0x0084 ///< Unknown.
-
150 #define GPUREG_TEXUNIT0_LOC 0x0085 ///< Texture unit 0 address.
-
151 #define GPUREG_0086 0x0086 ///< Unknown.
-
152 #define GPUREG_0087 0x0087 ///< Unknown.
-
153 #define GPUREG_0088 0x0088 ///< Unknown.
-
154 #define GPUREG_0089 0x0089 ///< Unknown.
-
155 #define GPUREG_008A 0x008A ///< Unknown.
-
156 #define GPUREG_008B 0x008B ///< Unknown.
+
149 #define GPUREG_TEXUNIT0_LOD 0x0084 ///< Texture unit 0 LOD.
+
150 #define GPUREG_TEXUNIT0_ADDR1 0x0085 ///< Texture unit 0 address.
+
151 #define GPUREG_TEXUNIT0_ADDR2 0x0086 ///< Unknown.
+
152 #define GPUREG_TEXUNIT0_ADDR3 0x0087 ///< Unknown.
+
153 #define GPUREG_TEXUNIT0_ADDR4 0x0088 ///< Unknown.
+
154 #define GPUREG_TEXUNIT0_ADDR5 0x0089 ///< Unknown.
+
155 #define GPUREG_TEXUNIT0_ADDR6 0x008A ///< Unknown.
+
156 #define GPUREG_TEXUNIT0_SHADOW 0x008B ///< Unknown.
157 #define GPUREG_008C 0x008C ///< Unknown.
158 #define GPUREG_008D 0x008D ///< Unknown.
159 #define GPUREG_TEXUNIT0_TYPE 0x008E ///< Texture unit 0 type.
@@ -254,16 +254,16 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
162 #define GPUREG_TEXUNIT1_BORDER_COLOR 0x0091 ///< Texture unit 1 border color.
163 #define GPUREG_TEXUNIT1_DIM 0x0092 ///< Texture unit 1 dimensions.
164 #define GPUREG_TEXUNIT1_PARAM 0x0093 ///< Texture unit 1 parameters.
-
165 #define GPUREG_0094 0x0094 ///< Unknown.
-
166 #define GPUREG_TEXUNIT1_LOC 0x0095 ///< Texture unit 1 address.
+
165 #define GPUREG_TEXUNIT1_LOD 0x0094 ///< Texture unit 1 LOD.
+
166 #define GPUREG_TEXUNIT1_ADDR 0x0095 ///< Texture unit 1 address.
167 #define GPUREG_TEXUNIT1_TYPE 0x0096 ///< Texture unit 1 type.
168 #define GPUREG_0097 0x0097 ///< Unknown.
169 #define GPUREG_0098 0x0098 ///< Unknown.
170 #define GPUREG_TEXUNIT2_BORDER_COLOR 0x0099 ///< Texture unit 2 border color.
171 #define GPUREG_TEXUNIT2_DIM 0x009A ///< Texture unit 2 dimensions.
172 #define GPUREG_TEXUNIT2_PARAM 0x009B ///< Texture unit 2 parameters.
-
173 #define GPUREG_009C 0x009C ///< Unknown.
-
174 #define GPUREG_TEXUNIT2_LOC 0x009D ///< Texture unit 2 location.
+
173 #define GPUREG_TEXUNIT2_LOD 0x009C ///< Texture unit 2 LOD.
+
174 #define GPUREG_TEXUNIT2_ADDR 0x009D ///< Texture unit 2 address.
175 #define GPUREG_TEXUNIT2_TYPE 0x009E ///< Texture unit 2 type.
176 #define GPUREG_009F 0x009F ///< Unknown.
177 #define GPUREG_00A0 0x00A0 ///< Unknown.
@@ -274,22 +274,22 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
182 #define GPUREG_00A5 0x00A5 ///< Unknown.
183 #define GPUREG_00A6 0x00A6 ///< Unknown.
184 #define GPUREG_00A7 0x00A7 ///< Unknown.
-
185 #define GPUREG_00A8 0x00A8 ///< Unknown.
-
186 #define GPUREG_00A9 0x00A9 ///< Unknown.
-
187 #define GPUREG_00AA 0x00AA ///< Unknown.
-
188 #define GPUREG_00AB 0x00AB ///< Unknown.
-
189 #define GPUREG_00AC 0x00AC ///< Unknown.
-
190 #define GPUREG_00AD 0x00AD ///< Unknown.
+
185 #define GPUREG_TEXUNIT3_PROTEX0 0x00A8 ///< Unknown.
+
186 #define GPUREG_TEXUNIT3_PROTEX1 0x00A9 ///< Unknown.
+
187 #define GPUREG_TEXUNIT3_PROTEX2 0x00AA ///< Unknown.
+
188 #define GPUREG_TEXUNIT3_PROTEX3 0x00AB ///< Unknown.
+
189 #define GPUREG_TEXUNIT3_PROTEX4 0x00AC ///< Unknown.
+
190 #define GPUREG_TEXUNIT3_PROTEX5 0x00AD ///< Unknown.
191 #define GPUREG_00AE 0x00AE ///< Unknown.
-
192 #define GPUREG_00AF 0x00AF ///< Unknown.
-
193 #define GPUREG_00B0 0x00B0 ///< Unknown.
-
194 #define GPUREG_00B1 0x00B1 ///< Unknown.
-
195 #define GPUREG_00B2 0x00B2 ///< Unknown.
-
196 #define GPUREG_00B3 0x00B3 ///< Unknown.
-
197 #define GPUREG_00B4 0x00B4 ///< Unknown.
-
198 #define GPUREG_00B5 0x00B5 ///< Unknown.
-
199 #define GPUREG_00B6 0x00B6 ///< Unknown.
-
200 #define GPUREG_00B7 0x00B7 ///< Unknown.
+
192 #define GPUREG_PROTEX_LUT 0x00AF ///< Unknown.
+
193 #define GPUREG_PROTEX_LUT_DATA0 0x00B0 ///< Unknown.
+
194 #define GPUREG_PROTEX_LUT_DATA1 0x00B1 ///< Unknown.
+
195 #define GPUREG_PROTEX_LUT_DATA2 0x00B2 ///< Unknown.
+
196 #define GPUREG_PROTEX_LUT_DATA3 0x00B3 ///< Unknown.
+
197 #define GPUREG_PROTEX_LUT_DATA4 0x00B4 ///< Unknown.
+
198 #define GPUREG_PROTEX_LUT_DATA5 0x00B5 ///< Unknown.
+
199 #define GPUREG_PROTEX_LUT_DATA6 0x00B6 ///< Unknown.
+
200 #define GPUREG_PROTEX_LUT_DATA7 0x00B7 ///< Unknown.
201 #define GPUREG_00B8 0x00B8 ///< Unknown.
202 #define GPUREG_00B9 0x00B9 ///< Unknown.
203 #define GPUREG_00BA 0x00BA ///< Unknown.
@@ -331,21 +331,21 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
239 #define GPUREG_00DE 0x00DE ///< Unknown.
240 #define GPUREG_00DF 0x00DF ///< Unknown.
241 #define GPUREG_TEXENV_UPDATE_BUFFER 0x00E0 ///< Texture env buffer update flag.
-
242 #define GPUREG_00E1 0x00E1 ///< Unknown.
+
242 #define GPUREG_FOG_COLOR 0x00E1 ///< Unknown.
243 #define GPUREG_00E2 0x00E2 ///< Unknown.
244 #define GPUREG_00E3 0x00E3 ///< Unknown.
-
245 #define GPUREG_00E4 0x00E4 ///< Unknown.
-
246 #define GPUREG_00E5 0x00E5 ///< Unknown.
-
247 #define GPUREG_00E6 0x00E6 ///< Unknown.
+
245 #define GPUREG_GAS_ATTENUATION 0x00E4 ///< Unknown.
+
246 #define GPUREG_GAS_ACCMAX 0x00E5 ///< Unknown.
+
247 #define GPUREG_FOG_LUT_INDEX 0x00E6 ///< Unknown.
248 #define GPUREG_00E7 0x00E7 ///< Unknown.
-
249 #define GPUREG_00E8 0x00E8 ///< Unknown.
-
250 #define GPUREG_00E9 0x00E9 ///< Unknown.
-
251 #define GPUREG_00EA 0x00EA ///< Unknown.
-
252 #define GPUREG_00EB 0x00EB ///< Unknown.
-
253 #define GPUREG_00EC 0x00EC ///< Unknown.
-
254 #define GPUREG_00ED 0x00ED ///< Unknown.
-
255 #define GPUREG_00EE 0x00EE ///< Unknown.
-
256 #define GPUREG_00EF 0x00EF ///< Unknown.
+
249 #define GPUREG_FOG_LUT_DATA0 0x00E8 ///< Unknown.
+
250 #define GPUREG_FOG_LUT_DATA1 0x00E9 ///< Unknown.
+
251 #define GPUREG_FOG_LUT_DATA2 0x00EA ///< Unknown.
+
252 #define GPUREG_FOG_LUT_DATA3 0x00EB ///< Unknown.
+
253 #define GPUREG_FOG_LUT_DATA4 0x00EC ///< Unknown.
+
254 #define GPUREG_FOG_LUT_DATA5 0x00ED ///< Unknown.
+
255 #define GPUREG_FOG_LUT_DATA6 0x00EE ///< Unknown.
+
256 #define GPUREG_FOG_LUT_DATA7 0x00EF ///< Unknown.
257 #define GPUREG_TEXENV4_SOURCE 0x00F0 ///< Texture env 4 source.
258 #define GPUREG_TEXENV4_OPERAND 0x00F1 ///< Texture env 4 operand.
259 #define GPUREG_TEXENV4_COMBINER 0x00F2 ///< Texture env 4 combiner.
@@ -390,7 +390,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
298 #define GPUREG_DEPTHBUFFER_WRITE 0x0115 ///< Writes to the depth buffer.
299 #define GPUREG_DEPTHBUFFER_FORMAT 0x0116 ///< Depth buffer format.
300 #define GPUREG_COLORBUFFER_FORMAT 0x0117 ///< Color buffer format.
-
301 #define GPUREG_0118 0x0118 ///< Unknown.
+
301 #define GPUREG_EARLYDEPTH_TEST2 0x0118 ///< Unknown.
302 #define GPUREG_0119 0x0119 ///< Unknown.
303 #define GPUREG_011A 0x011A ///< Unknown.
304 #define GPUREG_FRAMEBUFFER_BLOCK32 0x011B ///< Frame buffer block 32.
@@ -398,13 +398,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
306 #define GPUREG_COLORBUFFER_LOC 0x011D ///< Color buffer location.
307 #define GPUREG_FRAMEBUFFER_DIM 0x011E ///< Frame buffer dimensions.
308 #define GPUREG_011F 0x011F ///< Unknown.
-
309 #define GPUREG_0120 0x0120 ///< Unknown.
-
310 #define GPUREG_0121 0x0121 ///< Unknown.
-
311 #define GPUREG_0122 0x0122 ///< Unknown.
-
312 #define GPUREG_0123 0x0123 ///< Unknown.
-
313 #define GPUREG_0124 0x0124 ///< Unknown.
+
309 #define GPUREG_GAS_LIGHT_XY 0x0120 ///< Unknown.
+
310 #define GPUREG_GAS_LIGHT_Z 0x0121 ///< Unknown.
+
311 #define GPUREG_GAS_LIGHT_Z_COLOR 0x0122 ///< Unknown.
+
312 #define GPUREG_GAS_LUT_INDEX 0x0123 ///< Unknown.
+
313 #define GPUREG_GAS_LUT_DATA 0x0124 ///< Unknown.
314 #define GPUREG_0125 0x0125 ///< Unknown.
-
315 #define GPUREG_0126 0x0126 ///< Unknown.
+
315 #define GPUREG_GAS_DELTAZ_DEPTH 0x0126 ///< Unknown.
316 #define GPUREG_0127 0x0127 ///< Unknown.
317 #define GPUREG_0128 0x0128 ///< Unknown.
318 #define GPUREG_0129 0x0129 ///< Unknown.
@@ -414,7 +414,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
322 #define GPUREG_012D 0x012D ///< Unknown.
323 #define GPUREG_012E 0x012E ///< Unknown.
324 #define GPUREG_012F 0x012F ///< Unknown.
-
325 #define GPUREG_0130 0x0130 ///< Unknown.
+
325 #define GPUREG_FRAGOP_SHADOW 0x0130 ///< Unknown.
326 #define GPUREG_0131 0x0131 ///< Unknown.
327 #define GPUREG_0132 0x0132 ///< Unknown.
328 #define GPUREG_0133 0x0133 ///< Unknown.
@@ -675,11 +675,11 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
583 #define GPUREG_VERTEX_OFFSET 0x022A ///< Vertex offset.
584 #define GPUREG_022B 0x022B ///< Unknown.
585 #define GPUREG_022C 0x022C ///< Unknown.
-
586 #define GPUREG_022D 0x022D ///< Unknown.
+
586 #define GPUREG_POST_VERTEX_CACHE_NUM 0x022D ///< Unknown.
587 #define GPUREG_DRAWARRAYS 0x022E ///< Draw arrays trigger.
588 #define GPUREG_DRAWELEMENTS 0x022F ///< Draw arrays elements.
589 #define GPUREG_0230 0x0230 ///< Unknown.
-
590 #define GPUREG_0231 0x0231 ///< Unknown.
+
590 #define GPUREG_VTX_FUNC 0x0231 ///< Unknown.
591 #define GPUREG_FIXEDATTRIB_INDEX 0x0232 ///< Fixed attribute index.
592 #define GPUREG_FIXEDATTRIB_DATA0 0x0233 ///< Fixed attribute data 0.
593 #define GPUREG_FIXEDATTRIB_DATA1 0x0234 ///< Fixed attribute data 1.
@@ -696,25 +696,25 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
604 #define GPUREG_023F 0x023F ///< Unknown.
605 #define GPUREG_0240 0x0240 ///< Unknown.
606 #define GPUREG_0241 0x0241 ///< Unknown.
-
607 #define GPUREG_0242 0x0242 ///< Unknown.
+
607 #define GPUREG_VSH_NUM_ATTR 0x0242 ///< Unknown.
608 #define GPUREG_0243 0x0243 ///< Unknown.
-
609 #define GPUREG_0244 0x0244 ///< Unknown.
-
610 #define GPUREG_0245 0x0245 ///< Unknown.
+
609 #define GPUREG_VSH_COM_MODE 0x0244 ///< Unknown.
+
610 #define GPUREG_START_DRAW_FUNC0 0x0245 ///< Unknown.
611 #define GPUREG_0246 0x0246 ///< Unknown.
612 #define GPUREG_0247 0x0247 ///< Unknown.
613 #define GPUREG_0248 0x0248 ///< Unknown.
614 #define GPUREG_0249 0x0249 ///< Unknown.
-
615 #define GPUREG_024A 0x024A ///< Unknown.
+
615 #define GPUREG_VSH_OUTMAP_TOTAL1 0x024A ///< Unknown.
616 #define GPUREG_024B 0x024B ///< Unknown.
617 #define GPUREG_024C 0x024C ///< Unknown.
618 #define GPUREG_024D 0x024D ///< Unknown.
619 #define GPUREG_024E 0x024E ///< Unknown.
620 #define GPUREG_024F 0x024F ///< Unknown.
621 #define GPUREG_0250 0x0250 ///< Unknown.
-
622 #define GPUREG_0251 0x0251 ///< Unknown.
-
623 #define GPUREG_0252 0x0252 ///< Unknown.
-
624 #define GPUREG_0253 0x0253 ///< Unknown.
-
625 #define GPUREG_0254 0x0254 ///< Unknown.
+
622 #define GPUREG_VSH_OUTMAP_TOTAL2 0x0251 ///< Unknown.
+
623 #define GPUREG_GSH_MISC0 0x0252 ///< Unknown.
+
624 #define GPUREG_GEOSTAGE_CONFIG2 0x0253 ///< Unknown.
+
625 #define GPUREG_GSH_MISC1 0x0254 ///< Unknown.
626 #define GPUREG_0255 0x0255 ///< Unknown.
627 #define GPUREG_0256 0x0256 ///< Unknown.
628 #define GPUREG_0257 0x0257 ///< Unknown.
diff --git a/shaderProgram_8h.html b/shaderProgram_8h.html index 9ce2a68..6577448 100644 --- a/shaderProgram_8h.html +++ b/shaderProgram_8h.html @@ -253,7 +253,7 @@ Functions
-
Examples:
graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, and graphics/gpu/textured_cube/source/main.c.
+
Examples:
graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, and graphics/gpu/textured_cube/source/main.c.
@@ -397,7 +397,7 @@ Functions
-
Examples:
graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, and graphics/gpu/textured_cube/source/main.c.
+
Examples:
graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, and graphics/gpu/textured_cube/source/main.c.
@@ -422,7 +422,7 @@ Functions
-
Examples:
graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, and graphics/gpu/textured_cube/source/main.c.
+
Examples:
graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, and graphics/gpu/textured_cube/source/main.c.
@@ -465,7 +465,7 @@ Functions
-
Examples:
graphics/gpu/geoshader/source/main.c.
+
Examples:
graphics/gpu/geoshader/source/main.c.
@@ -536,7 +536,7 @@ Functions
-
Examples:
graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, and graphics/gpu/textured_cube/source/main.c.
+
Examples:
graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, and graphics/gpu/textured_cube/source/main.c.
@@ -561,7 +561,7 @@ Functions
-
Examples:
graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, and graphics/gpu/textured_cube/source/main.c.
+
Examples:
graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, and graphics/gpu/textured_cube/source/main.c.
diff --git a/shbin_8h.html b/shbin_8h.html index d7b5e93..fa5c0ca 100644 --- a/shbin_8h.html +++ b/shbin_8h.html @@ -290,7 +290,7 @@ Functions
-
Examples:
graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, and graphics/gpu/textured_cube/source/main.c.
+
Examples:
graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, and graphics/gpu/textured_cube/source/main.c.
@@ -327,7 +327,7 @@ Functions
Returns
The parsed shader binary.
-
Examples:
graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, and graphics/gpu/textured_cube/source/main.c.
+
Examples:
graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, and graphics/gpu/textured_cube/source/main.c.
diff --git a/shbin_8h_source.html b/shbin_8h_source.html index dd100c8..4fef7d5 100644 --- a/shbin_8h_source.html +++ b/shbin_8h_source.html @@ -248,13 +248,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
DVLE_type
DVLE type.
Definition: shbin.h:10
Bool.
Definition: shbin.h:17
DVLE_constEntry_s * constTableData
Constant table data.
Definition: shbin.h:71
-
Geometry shader.
Definition: enums.h:374
+
Geometry shader.
Definition: enums.h:394
DVLE uniform entry data.
Definition: shbin.h:58
u32 outTableSize
Output table size.
Definition: shbin.h:72
DVLE_s * DVLE
Contained DVLE.
Definition: shbin.h:85
Vertex shader.
Definition: shbin.h:11
Texture coordinate 2.
Definition: shbin.h:30
-
Vertex shader.
Definition: enums.h:373
+
Vertex shader.
Definition: enums.h:393
u32 mainOffset
Offset of the start of the main function.
Definition: shbin.h:68
24-bit float.
Definition: shbin.h:19
DVLB data.
Definition: shbin.h:82
diff --git a/structDVLB__s.html b/structDVLB__s.html index 9f4620f..43a1068 100644 --- a/structDVLB__s.html +++ b/structDVLB__s.html @@ -112,7 +112,7 @@ Data Fields

Detailed Description


The documentation for this struct was generated from the following file: diff --git a/structshaderProgram__s.html b/structshaderProgram__s.html index 3ac0729..a857fae 100644 --- a/structshaderProgram__s.html +++ b/structshaderProgram__s.html @@ -116,7 +116,7 @@ Data Fields

Detailed Description


The documentation for this struct was generated from the following file: