1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- #pragma once
- #ifndef __SpoutSender__
- #define __SpoutSender__
- #include "spoutSDK.h"
- class SPOUT_DLLEXP SpoutSender {
- public:
- SpoutSender();
- ~SpoutSender();
- bool CreateSender(const char *Sendername, unsigned int width, unsigned int height, DWORD dwFormat = 0);
- bool UpdateSender(const char *Sendername, unsigned int width, unsigned int height);
- void ReleaseSender(DWORD dwMsec = 0);
- bool SendImage(const unsigned char* pixels, unsigned int width, unsigned int height, GLenum glFormat = GL_RGBA, bool bInvert=false, GLuint HostFBO = 0);
- bool SendTexture(GLuint TextureID, GLuint TextureTarget, unsigned int width, unsigned int height, bool bInvert=true, GLuint HostFBO = 0);
- bool DrawToSharedTexture(GLuint TextureID, GLuint TextureTarget, unsigned int width, unsigned int height, float max_x = 1.0, float max_y = 1.0, float aspect = 1.0, bool bInvert = false, GLuint HostFBO = 0);
- 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();
- bool SenderDebug(char *Sendername, int size);
- Spout spout;
- protected :
- };
- #endif
|