Graphics Reference
In-Depth Information
class
UWB
_
Primitive {
.
Source file.
uwbgl
_
Primitive3.h
file in the
Common Files/
Primitives
// Sets attribute with DrawHelper
A:
virtual void
SetupDrawAttributes(UWB
_
DrawHelper&);
.
// Set file texture name
B:
void
SetTextureFileName(texFile);
// Get file texture name
const wchar
_
t
*
GetTextureFileName();
// Enable/disable texture mapping
void
EnableTexturing(
bool
on);
.
bool
IsTexturingEnabled()
const
;
protected
:
.
// Texture map on/off attribute
C:
bool
m
_
bTexturingEnabled;
// Name of file texture
std::wstring m
_
TexFileName;
.
subfolder
of
the
UWBGL
_
D3D
_
Lib13
project.
Listing 12.16.
Per-primitive texture attributes.
bool
UWBD3D
_
DrawHelper::EnableTexture(
bool
on)
.
Source file.
uwbgl
_
D3DDrawHelper5.cpp
file in the
D3D Files/
D3D_DrawHelper
if
(on)
// Enable file texture
subfolder
UWBGL
_
D3D
_
Lib13
of
the
UWBD3D
_
GraphicsSystem::GetSystem().ActivateTexture(m
_
TexFileName);
project.
A:
else
// Disable texturing
UWBD3D
_
GraphicsSystem::GetSystem().DeactivateTexture();
B:
.
Listing 12.17.
File texture attribute control.
Search WWH ::
Custom Search