1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- #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, 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);
-
- 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();
- 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 :
- bool bInv;
- };
- #endif
|