Conventions
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text are shown as follows: "The maximum number of color attachments supported on any GPU can be queried using the GL_MAX_COLOR_ATTACHMENTS
field."
A block of code is set as follows:
for(int i=0;i<16;i++) { float indexA = (random(vec4(gl_FragCoord.xyx, i))*0.25); float indexB = (random(vec4(gl_FragCoord.yxy, i))*0.25); sum += textureProj(shadowMap, vShadowCoords + vec4(indexA, indexB, 0, 0)); }
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
void main()
{
vEyeSpacePosition = (MV*vec4(vVertex,1)).xyz;
vEyeSpaceNormal = N*vNormal;
vShadowCoords = S*(M*vec4(vVertex,1));
gl_Position = MVP*vec4(vVertex,1);
}
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "by going to the Properties menu item in the Project menu".
Note
Warnings or important notes appear in a box like this.
Tip
Tips and tricks appear like this.