| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- #pragma once
- #include "GraphicsApi.h"
- //! DirectX 9 Types
- struct IDirect3D9;
- struct IDirect3DDevice9;
- struct IDirect3DSurface9;
- struct _D3DLOCKED_RECT;
- struct tagRECT;
- namespace Framework
- {
- class NativeWindow; //! NativeWindow.h
- class Image; //! Image.h
- class Cam3D; //! Camera3D.h
- class Texture; //! Texture.h
- class Model3DData; //! Model3D.h
- //! A graphics API that uses DirectX 9. Only supports 2D rendering
- class DirectX9 : public GraphicsApi
- {
- private:
- IDirect3D9* pDirect3D;
- IDirect3DDevice9* pDevice;
- IDirect3DSurface9* pBackBuffer;
- _D3DLOCKED_RECT* backRect;
- Image* uiImage;
- public:
- DLLEXPORT DirectX9();
- DLLEXPORT ~DirectX9();
- DLLEXPORT void initialize(NativeWindow* fenster,
- Vec2<int> backBufferSize,
- bool fullScreen) override;
- DLLEXPORT void beginFrame(
- bool fill2D, bool fill3D, int fillColor) override;
- DLLEXPORT void renderKamera(Cam3D* zKamera) override;
- DLLEXPORT void presentFrame() override;
- DLLEXPORT Texture* createOrGetTexture(
- const char* name, Image* b, TextureDirection dir) override;
- DLLEXPORT Image* zUIRenderImage() const override;
- DLLEXPORT virtual DXBuffer* createStructuredBuffer(int eSize) override;
- };
- } // namespace Framework
|