Game Development Reference
In-Depth Information
SimpleVertexShader.hlsl
SimplePixelShader.hlsl
Once these files have been removed, we need to remove any references to the files
that we just removed. Now create a new header ( Game.h ) and code ( Game.cpp )
file and add the following class declaration and some stub functions into Game.h
and Game.cpp , respectively. Once you've done that, search for any references to
CubeRenderer and replace them with Game . To compile this you'll also need to en-
sure that any #include statements that previously pointed to CubeRenderer.h
now point to Game.h .
Note
Remember that Microsoft introduced the C++/CX (Component Extensions) to
help you write C++ code that works with WinRT. Make sure that you're creating
the right type of class.
#pragma once
#include "Direct3DBase.h"
ref class Game sealed : public Direct3DBase
{
public:
Game();
virtual void Render() override;
void Update(float totalTime, float
deltaTime);
};
Tip
Downloading the example code
You can download the example code files for all Packt topics you have pur-
chased from your account at http://www.packtpub.com . If you purchased this
Search WWH ::




Custom Search