00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #pragma once
00024
00025 #include "OgreCuda.h"
00026
00027 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
00028
00029 #include <OgreD3D9RenderSystem.h>
00030 #include <OgreD3D9Texture.h>
00031 #include <OgreD3D9HardwareVertexBuffer.h>
00032
00033 namespace Ogre
00034 {
00035 namespace Cuda
00036 {
00037 class D3D9Root : public Root
00038 {
00039 public:
00040 D3D9Root(Ogre::RenderWindow* renderWindow);
00041 virtual void init();
00042
00043 protected:
00044 LPDIRECT3DDEVICE9 mDevice;
00045 };
00046
00047 class D3D9Texture : public Texture
00048 {
00049 public:
00050 D3D9Texture(Ogre::TexturePtr& texture);
00051 virtual void registerForCudaUse();
00052
00053 protected:
00054 IDirect3DBaseTexture9* mD3D9Texture;
00055 };
00056
00057 class D3D9VertexBuffer : public VertexBuffer
00058 {
00059 public:
00060 D3D9VertexBuffer(Ogre::HardwareVertexBufferSharedPtr vertexBuffer);
00061 virtual void registerForCudaUse();
00062
00063 protected:
00064 IDirect3DVertexBuffer9* mD3D9VertexBuffer;
00065 };
00066
00067 class D3D9TextureManager : public TextureManager
00068 {
00069 public:
00070 virtual Texture* createTexture(Ogre::TexturePtr texture);
00071 virtual void destroyTexture(Texture* texture);
00072 };
00073
00074 class D3D9VertexBufferManager : public VertexBufferManager
00075 {
00076 public:
00077 virtual VertexBuffer* createVertexBuffer(Ogre::HardwareVertexBufferSharedPtr vertexBuffer);
00078 virtual void destroyVertexBuffer(VertexBuffer* vertexBuffer);
00079 };
00080 }
00081 }
00082
00083 #endif //if OGRE_PLATFORM == OGRE_PLATFORM_WIN32