123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- #pragma once
- #ifndef __SpoutReceiver__
- #define __SpoutReceiver__
- #include "spoutSDK.h"
- class SPOUT_DLLEXP SpoutReceiver {
- public:
- SpoutReceiver();
- ~SpoutReceiver();
- bool CreateReceiver(char* Sendername, unsigned int &width, unsigned int &height, bool bUseActive = false);
- bool ReceiveTexture(char* Sendername, unsigned int &width, unsigned int &height, GLuint TextureID = 0, GLuint TextureTarget = 0, bool bInvert = false, GLuint HostFBO = 0);
- bool ReceiveImage(char* Sendername, unsigned int &width, unsigned int &height, unsigned char* pixels, GLenum glFormat = GL_RGBA, bool bInvert = false, GLuint HostFBO=0);
- bool CheckReceiver (char* Sendername, unsigned int &width, unsigned int &height, bool &bConnected);
- bool GetImageSize (char* Sendername, unsigned int &width, unsigned int &height, bool &bMemoryMode);
- void ReleaseReceiver();
- bool BindSharedTexture();
- bool UnBindSharedTexture();
- bool DrawSharedTexture(float max_x = 1.0, float max_y = 1.0, float aspect = 1.0, bool bInvert = true, GLuint HostFBO=0);
-
- int GetSenderCount();
- bool GetSenderName(int index, char* Sendername, int MaxSize = 256);
- bool GetSenderInfo(const char* Sendername, unsigned int &width, unsigned int &height, HANDLE &dxShareHandle, DWORD &dwFormat);
- bool GetActiveSender(char* Sendername);
- bool SetActiveSender(const char* Sendername);
-
- bool SelectSenderPanel(const char* message = NULL);
- bool SetDX9(bool bDX9 = true);
- bool GetDX9();
- bool SetMemoryShareMode(bool bMem = true);
- bool GetMemoryShareMode();
- bool SetCPUmode(bool bCPU = true);
- bool GetCPUmode();
- int GetShareMode();
- bool SetShareMode(int mode);
- void SetBufferMode(bool bActive);
- bool GetBufferMode();
- void SetDX9compatible(bool bCompatible = true);
- bool GetDX9compatible();
- int GetNumAdapters();
- bool GetAdapterName(int index, char *adaptername, int maxchars);
- bool SetAdapter(int index = 0);
- int GetAdapter();
- bool GetHostPath(const char *sendername, char *hostpath, int maxchars);
- bool SetVerticalSync(bool bSync = true);
- int GetVerticalSync();
- Spout spout;
- protected :
- };
- #endif
|