opengl_20programming
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
opengl_20programming [2018/04/13 16:17] – Added syntax highlighting richardrussell | opengl_20programming [2024/01/05 00:22] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 91: | Line 91: | ||
</ | </ | ||
- | Note particularly that each //double// parameter must be passed as a pair of values, the first using **FN_dl** and the second using **FN_dh**. When there is a choice, passing single-precision values will usually be easier.\\ \\ Some OpenGL functions require an array of values. In this case it is easier to pass a double-precision array, since BBC BASIC for Windows supports this data type natively (in ***FLOAT64** mode). For example to call **glLoadMatrixd** you would use code similar to the following: | + | Note particularly that each //double// parameter must be passed as a pair of values, the first using **FN_dl** and the second using **FN_dh**. When there is a choice, passing single-precision values will usually be easier.\\ \\ Some OpenGL functions require an array of values. In this case it is easier to pass a double-precision array, since BBC BASIC for Windows supports this data type natively (by using the # suffix). For example to call **glLoadMatrixd** you would use code similar to the following: |
<code bb4w> | <code bb4w> | ||
- | DIM matrix(3, | + | DIM matrix#(3,3) |
- | matrix() = a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 | + | matrix#() = a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 |
- | matrix() *= 1.0 | + | matrix#() *= 1.0 |
- | SYS `glLoadMatrixd`, | + | SYS `glLoadMatrixd`, |
</ | </ | ||
- | Note that for this to work your program must be in ***FLOAT64** mode.\\ \\ | + | |
===== Rendering ===== | ===== Rendering ===== | ||
\\ OpenGL under Windows uses a // | \\ OpenGL under Windows uses a // |
opengl_20programming.1523636243.txt.gz · Last modified: 2024/01/05 00:17 (external edit)