|
11 | 11 | <description><![CDATA[ |
12 | 12 | Set various hints and hacks for the renderer. This is used to handle obscure rendering features that cannot be implemented in a consistent manner across renderers. Each hint is enabled with the "ENABLE" syntax and disabled with "DISABLE." Some are enabled by default and other are disabled. For example, to turn on native fonts, use <b>hint(ENABLE_NATIVE_FONTS)</b> and later use <b>hint(DISABLE_NATIVE_FONTS)</b> to stop using the feature. Some options might graduate to standard features instead of hints over time. |
13 | 13 | <br/><br/> |
14 | | -hint(ENABLE_NATIVE_FONTS) - Use the native version fonts when they are installed, rather than the bitmapped version from a .vlw file. This is useful with the default renderer setting, as it will improve font rendering speed. This is not enabled by default, because it can be misleading while testing because the type will look great on your machine (because you have the font installed) but lousy on others' machines if the identical font is unavailable. This option can only be set per-sketch, and must be called before any use of <b>textFont()</b>. |
| 14 | +<b>hint(ENABLE_NATIVE_FONTS)</b> - Use the native version fonts when they are installed, rather than the bitmapped version from a .vlw file. This is useful with the default renderer setting, as it will improve font rendering speed. This is not enabled by default, because it can be misleading while testing because the type will look great on your machine (because you have the font installed) but lousy on others' machines if the identical font is unavailable. This option can only be set per-sketch, and must be called before any use of <b>textFont()</b>. |
15 | 15 | <br/><br/> |
16 | | -hint(DISABLE_DEPTH_TEST) - Disable the zbuffer, allowing you to draw on top of everything at will. When depth testing is disabled, items will be drawn to the screen sequentially, like a painting. This hint is most often used to draw in 3D, then draw in 2D on top of it (for instance, to draw GUI controls in 2D on top of a 3D interface). Starting in release 0149, this will also clear the depth buffer. Restore the default with hint(ENABLE_DEPTH_TEST), but note that with the depth buffer cleared, any 3D drawing that happens later in <b>draw()</b> will ignore existing shapes on the screen. |
| 16 | +<b>hint(DISABLE_DEPTH_TEST)</b> - Disable the zbuffer, allowing you to draw on top of everything at will. When depth testing is disabled, items will be drawn to the screen sequentially, like a painting. This hint is most often used to draw in 3D, then draw in 2D on top of it (for instance, to draw GUI controls in 2D on top of a 3D interface). Starting in release 0149, this will also clear the depth buffer. Restore the default with <b>hint(ENABLE_DEPTH_TEST)</b>, but note that with the depth buffer cleared, any 3D drawing that happens later in <b>draw()</b> will ignore existing shapes on the screen. |
17 | 17 | <br/><br/> |
18 | | -hint(ENABLE_DEPTH_SORT) - Enable primitive z-sorting of triangles and lines in P3D. This can slow performance considerably, and the algorithm is not yet perfect. |
| 18 | +<b>hint(ENABLE_DEPTH_SORT)</b> - Enable primitive z-sorting of triangles and lines in <b>P3D</b>. This can slow performance considerably, and the algorithm is not yet perfect. |
19 | 19 | <br/><br/> |
20 | | -hint(DISABLE_OPENGL_ERRORS) - Speeds up the P3D renderer setting by not checking for errors while running. |
| 20 | +<b>hint(DISABLE_OPENGL_ERRORS)</b> - Speeds up the <b>P3D</b> renderer setting by not checking for errors while running. |
21 | 21 | <br/><br/> |
22 | | -hint(DISABLE_DEPTH_MASK) - Disables writing into the depth buffer. This means that a shape drawn with this hint can be hidden by another shape drawn later, irrespective of their distances to the camera. Note that this is different from disabling the depth test. The depth test is still applied, as long as the DISABLE_DEPTH_TEST hint is not called, but the depth values of the objects are not recorded. This is useful when drawing a semi-transparent 3D object without depth sorting, in order to avoid visual glitches due the faces of the object being at different distances from the camera, but still having the object properly occluded by the rest of the objects in the scene. |
| 22 | +<b>hint(DISABLE_DEPTH_MASK)</b> - Disables writing into the depth buffer. This means that a shape drawn with this hint can be hidden by another shape drawn later, irrespective of their distances to the camera. Note that this is different from disabling the depth test. The depth test is still applied, as long as the <b>DISABLE_DEPTH_TEST</b> hint is not called, but the depth values of the objects are not recorded. This is useful when drawing a semi-transparent 3D object without depth sorting, in order to avoid visual glitches due the faces of the object being at different distances from the camera, but still having the object properly occluded by the rest of the objects in the scene. |
23 | 23 | <br/><br/> |
24 | | -hint(ENABLE_ACCURATE_2D) - It forces the P3D renderer to draw each shape (including its strokes) separately, instead of batching them into larger groups for better performance. One consequence of this is that 2D items drawn with P3D are correctly stacked on the screen, depending on the order in which they were drawn. Otherwise, glitches such as the stroke lines being drawn on top of the interior of all the shapes will occur. However, this hint could make rendering substantially slower, so it is recommended to use it only when drawing a small amount of shapes. For drawing entirely two-dimensional scenes, it is advised to use the P2D renderer instead, which doesn't need the hint to properly stack shapes and their strokes. |
| 24 | +<b>hint(ENABLE_ACCURATE_2D)</b> - It forces the <b>P3D</b> renderer to draw each shape (including its strokes) separately, instead of batching them into larger groups for better performance. One consequence of this is that 2D items drawn with <b>P3D</b> are correctly stacked on the screen, depending on the order in which they were drawn. Otherwise, glitches such as the stroke lines being drawn on top of the interior of all the shapes will occur. However, this hint could make rendering substantially slower, so it is recommended to use it only when drawing a small amount of shapes. For drawing entirely two-dimensional scenes, it is advised to use the <b>P2D</b> renderer instead, which doesn't need the hint to properly stack shapes and their strokes. |
25 | 25 | <br/><br/> |
26 | | -hint(ENABLE_STROKE_PERSPECTIVE) - It makes the stroke geometry (lines and points) to be affected by the perspective, meaning that they will look smaller as they move away from the camera. |
| 26 | +<b>hint(ENABLE_STROKE_PERSPECTIVE)</b> - It makes the stroke geometry (lines and points) to be affected by the perspective, meaning that they will look smaller as they move away from the camera. |
27 | 27 | <br/><br/> |
28 | | -hint(DISABLE_TEXTURE_MIPMAPS) - Disable generation of texture mipmaps in P2D or P3D. This results in lower quality - but faster - rendering of texture images when they appear smaller than their native resolutions (the mipmaps are scaled-down versions of a texture that make it look better when drawing it at a small size). However, the difference in performance is fairly minor on recent desktop video cards. |
| 28 | +<b>hint(DISABLE_TEXTURE_MIPMAPS)</b> - Disable generation of texture mipmaps in <b>P2D</b> or <b>P3D</b>. This results in lower quality - but faster - rendering of texture images when they appear smaller than their native resolutions (the mipmaps are scaled-down versions of a texture that make it look better when drawing it at a small size). However, the difference in performance is fairly minor on recent desktop video cards. |
29 | 29 | <br/><br/> |
30 | | -hint(ENABLE_STROKE_PURE) - Improves rendering glitches with <b>vertex()</b> in the default renderer |
| 30 | +<b>hint(ENABLE_STROKE_PURE)</b> - Improves rendering glitches with <b>vertex()</b> in the default renderer |
31 | 31 | <br/><br/> |
32 | 32 | As of release 0149, <b>unhint()</b> has been removed in favor of adding additional ENABLE/DISABLE constants to reset the default behavior. This prevents the double negatives, and also reinforces which hints can be enabled or disabled. |
33 | 33 | ]]></description> |
|
0 commit comments