NLS Engine  v0.1
The Next Logical Step in game engine design.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Defines
HeightmapRenderable.h
Go to the documentation of this file.
00001 
00007 #pragma once
00008 
00009 #include <string>
00010 
00011 #include <d3d9.h>
00012 #include <d3dx9tex.h>
00013 
00014 #include "../RenderableComponent.h"
00015 
00016 class Grid;
00017 
00018 namespace GraphicsCore {
00019 
00020   class HeightmapRenderable: public RenderableComponent {
00021   public:
00022     HeightmapRenderable(EntitySPTR, ModuleInterface*, LPDIRECT3DDEVICE9);
00023     virtual ~HeightmapRenderable();
00024 
00025     void Initialize(LPDIRECT3DDEVICE9);
00026     void Render(LPDIRECT3DDEVICE9);
00027     void CreateHeightmap(LPDIRECT3DDEVICE9);
00028 
00029     bool LoadHeightmapFromFile(const std::string&);
00030     bool LoadTextureFromFile(const std::string&);
00031 
00032   private:
00033     
00034     LPDIRECT3DDEVICE9 pd3dDevice;
00035 
00036     LPDIRECT3DTEXTURE9 texture;
00037     Grid* grid;
00038     
00039   };
00040 }