123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259 |
- #ifndef Bildschirm_H
- #define Bildschirm_H
- #include "Array.h"
- #include "Punkt.h"
- #include "Critical.h"
- struct ID3D11Device;
- struct ID3D11DeviceContext;
- struct IDXGISwapChain;
- struct ID3D11Texture2D;
- struct ID3D11SamplerState;
- struct ID3D11ShaderResourceView;
- struct ID3D11RenderTargetView;
- struct ID3D11DepthStencilView;
- struct ID3D11DepthStencilState;
- struct ID3D11RasterizerState;
- struct ID3D11BlendState;
- struct D3D11_VIEWPORT;
- struct IDirect3D9;
- struct IDirect3DDevice9;
- struct IDirect3DSurface9;
- struct _D3DLOCKED_RECT;
- namespace Framework
- {
- class Bild;
- class WFenster;
- class Bildschirm;
- class Zeichnung;
- class Zeichnung3D;
- class ZeitMesser;
- struct MausEreignis;
- struct TastaturEreignis;
- class ToolTip;
- class PixelShader;
- class VertexShader;
- class Kam3D;
- class Render3D;
- class DXVertexBuffer;
- class DXIndexBuffer;
- class Textur;
- class TexturModel;
-
- struct Monitor
- {
- int x, y, breite, height;
- bool existiert;
- };
-
- class Bildschirm
- {
- protected:
- WFenster *fenster;
- Bild *renderB;
- int ref;
- RCArray<Zeichnung> *members;
- int fillColor;
- int deckFarbe;
- Zeichnung *onTop;
- bool renderOnTop;
- bool renderZeichnungen;
- bool vollbild;
- bool rendering;
- ZeitMesser *renderZeit;
- Punkt backBufferSize;
- Critical cs;
- RCArray< ToolTip > *tips;
- int tipAnzahl;
- bool testRend;
- bool fill;
- bool rend;
- public:
-
-
- __declspec( dllexport ) Bildschirm( WFenster *fenster );
-
- __declspec( dllexport ) virtual ~Bildschirm();
-
-
- __declspec( dllexport ) virtual void lock();
-
-
- __declspec( dllexport ) virtual void unlock();
-
-
- __declspec( dllexport ) virtual void setFill( bool f );
-
- __declspec( dllexport ) virtual void update() = 0;
-
-
- __declspec( dllexport ) virtual void setTestRend( bool tr );
-
-
- __declspec( dllexport ) virtual void setRenderZeichnungen( bool rO );
-
-
- __declspec( dllexport ) virtual void setOnTop( bool onTop );
-
-
- __declspec( dllexport ) virtual void setOnTopZeichnung( Zeichnung *obj );
-
-
- __declspec( dllexport ) virtual void setdeckFarbe( int f );
-
-
- __declspec( dllexport ) virtual void addMember( Zeichnung *obj );
-
-
- __declspec( dllexport ) virtual void removeMember( Zeichnung *zObj );
-
- __declspec( dllexport ) virtual void render() = 0;
-
-
- __declspec( dllexport ) virtual void setFillFarbe( int f );
-
-
- __declspec( dllexport ) virtual void setVollbild( bool fullscreen );
-
-
-
- __declspec( dllexport ) virtual void tick( double tickval );
-
-
-
- __declspec( dllexport ) virtual void setBackBufferSize( int breite, int height );
-
-
- __declspec( dllexport ) virtual void setBackBufferSize( Punkt &size );
-
-
-
- __declspec( dllexport ) virtual void doMausEreignis( MausEreignis &me );
-
-
-
- __declspec( dllexport ) virtual void doTastaturEreignis( TastaturEreignis &te );
-
-
- __declspec( dllexport ) virtual void addToolTip( ToolTip *tip );
-
-
- __declspec( dllexport ) virtual bool removeToolTip( ToolTip *zTip );
-
- __declspec( dllexport ) virtual Bild *getRenderBild() const;
-
- __declspec( dllexport ) virtual Bild *zRenderBild() const;
-
- __declspec( dllexport ) virtual Iterator<Zeichnung*> getMembers() const;
-
- __declspec( dllexport ) virtual int getFillFarbe() const;
-
- __declspec( dllexport ) virtual bool istVolbild() const;
-
- __declspec( dllexport ) virtual const Punkt &getBackBufferSize() const;
-
- __declspec( dllexport ) virtual void warteAufRendern() const;
-
- __declspec( dllexport ) virtual double getRenderZeit() const;
-
-
- __declspec( dllexport ) virtual Bildschirm *getThis();
-
-
- __declspec( dllexport ) virtual Bildschirm *release();
- };
- #ifdef WIN32
-
- class Bildschirm2D : public Bildschirm
- {
- private:
- IDirect3D9 *pDirect3D;
- IDirect3DDevice9 *pDevice;
- IDirect3DSurface9 *pBackBuffer;
- _D3DLOCKED_RECT *backRect;
- void cleanUpDirectX();
- public:
-
-
- __declspec( dllexport ) Bildschirm2D( WFenster *fenster );
-
- __declspec( dllexport ) virtual ~Bildschirm2D();
-
- __declspec( dllexport ) virtual void update();
-
- __declspec( dllexport ) virtual void render();
- };
-
- class Bildschirm3D : public Bildschirm
- {
- private:
- ID3D11Device *d3d11Device;
- ID3D11DeviceContext *d3d11Context;
- IDXGISwapChain *d3d11SpawChain;
- Textur *frameworkTextur;
- ID3D11SamplerState* sampleState;
- ID3D11RenderTargetView *rtview;
- ID3D11DepthStencilView *dsView;
- ID3D11Texture2D *depthStencilBuffer;
- ID3D11DepthStencilState *depthStencilState;
- ID3D11DepthStencilState *depthDisabledStencilState;
- ID3D11BlendState *blendStateAlphaBlend;
- RCArray< Kam3D > *kameras;
- PixelShader *pixelShader;
- VertexShader *vertexShader;
- Render3D *renderObj;
- D3D11_VIEWPORT *vp;
- TexturModel *texturModel;
- bool rend3D;
- void cleanUpDirectX();
- public:
-
-
- __declspec( dllexport ) Bildschirm3D( WFenster *fenster );
-
- __declspec( dllexport ) virtual ~Bildschirm3D();
-
-
- __declspec( dllexport ) void addKamera( Kam3D *obj );
-
- __declspec( dllexport ) void removeKamera( Kam3D *zObj );
-
-
-
- __declspec( dllexport ) void tick( double tickval );
-
-
-
- __declspec( dllexport ) void doMausEreignis( MausEreignis &me );
-
-
-
- __declspec( dllexport ) void doTastaturEreignis( TastaturEreignis &te );
-
- __declspec( dllexport ) void update();
-
- __declspec( dllexport ) void render();
- };
-
-
- __declspec( dllexport ) Monitor getMonitor( int id );
- #endif
- }
- #endif
|