Skip to Main Content
3D Game Engine Design, 2nd Edition
book

3D Game Engine Design, 2nd Edition

by David Eberly
November 2006
Intermediate to advanced content levelIntermediate to advanced
1040 pages
26h 31m
English
CRC Press
Content preview from 3D Game Engine Design, 2nd Edition
202 Chapter 3 Renderers
if (pkVProgram)
{
// The programs have already been loaded.
return;
}
VertexProgramPtr spkVProgram =
VertexProgramCatalog::GetActive()->Find(
m_kVShader[iPass]->GetShaderName());
PixelProgramPtr spkPProgram =
PixelProgramCatalog::GetActive()->Find(
m_kPShader[iPass]->GetShaderName());
<remainder of implementation>
}
The function checks to see if the shader programs have already been loaded. In
the common case they should be, since loading should occur only once, because of
either the first attempt to draw or an explicit resource load forced by the application
code.
When the programs have not been loaded, the function checks the catalogs for
the vertex and pixel programs. For example, the
Find function for vertex programs is
VertexProgram* ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

3D Game Engine Architecture

3D Game Engine Architecture

David Eberly
Blender 3D By Example - Second Edition

Blender 3D By Example - Second Edition

Oscar Baechler, Xury Greer
Computer Graphics

Computer Graphics

Alexey Boreskov, Evgeniy Shikin

Publisher Resources

ISBN: 9781482267303