40 #include <QOpenGLContext> 48 #ifdef SPOUTLIBRARY_EXPORTS 49 #define SPOUTAPI __declspec(dllexport) 51 #define SPOUTAPI __declspec(dllimport) 65 virtual bool CreateSender(
const char *Sendername,
unsigned int width,
unsigned int height, DWORD dwFormat = 0) = 0;
66 virtual void ReleaseSender(DWORD dwMsec = 0) = 0;
67 virtual bool UpdateSender(
const char* Sendername,
unsigned int width,
unsigned int height) = 0;
68 virtual bool SendTexture(GLuint TextureID, GLuint TextureTarget,
unsigned int width,
unsigned int height,
bool bInvert =
true, GLuint HostFBO = 0) = 0;
69 virtual bool SendImage(
const unsigned char* pixels,
unsigned int width,
unsigned int height, GLenum glFormat = GL_RGBA,
bool bInvert=
false) = 0;
72 virtual bool CreateReceiver(
char* Sendername,
unsigned int &width,
unsigned int &height,
bool bUseActive =
false) = 0;
73 virtual void ReleaseReceiver() = 0;
74 virtual bool ReceiveTexture(
char* Sendername,
unsigned int &width,
unsigned int &height, GLuint TextureID = 0, GLuint TextureTarget = 0,
bool bInvert =
false, GLuint HostFBO = 0) = 0;
75 virtual bool ReceiveImage(
char* Sendername,
unsigned int &width,
unsigned int &height,
unsigned char* pixels, GLenum glFormat = GL_RGBA,
bool bInvert =
false, GLuint HostFBO=0) = 0;
76 virtual bool CheckReceiver(
char* Sendername,
unsigned int &width,
unsigned int &height,
bool &bConnected) = 0;
77 virtual bool GetImageSize(
char* sendername,
unsigned int &width,
unsigned int &height,
bool &bMemoryMode) = 0;
79 virtual bool BindSharedTexture() = 0;
80 virtual bool UnBindSharedTexture() = 0;
82 virtual bool DrawSharedTexture(
float max_x = 1.0,
float max_y = 1.0,
float aspect = 1.0,
bool bInvert =
true) = 0;
83 virtual 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) = 0;
85 virtual int GetSenderCount() = 0;
86 virtual bool GetSenderName(
int index,
char* sendername,
int MaxSize = 256) = 0;
87 virtual bool GetSenderInfo(
const char* sendername,
unsigned int &width,
unsigned int &height, HANDLE &dxShareHandle, DWORD &dwFormat) = 0;
88 virtual bool GetActiveSender(
char* Sendername) = 0;
89 virtual bool SetActiveSender(
const char* Sendername) = 0;
92 virtual bool SetDX9(
bool bDX9 =
true) = 0;
93 virtual bool GetDX9() = 0;
94 virtual bool SetMemoryShareMode(
bool bMem =
true) = 0;
95 virtual bool GetMemoryShareMode() = 0;
96 virtual int GetMaxSenders() = 0;
97 virtual void SetMaxSenders(
int maxSenders) = 0;
98 virtual bool GetHostPath(
const char *sendername,
char *hostpath,
int maxchars) = 0;
99 virtual int GetVerticalSync() = 0;
100 virtual bool SetVerticalSync(
bool bSync =
true) = 0;
101 virtual bool SelectSenderPanel(
const char* message = NULL) = 0;
104 virtual bool GetSpoutSenderName(
char * sendername,
int maxchars) = 0;
105 virtual bool IsSpoutInitialized() = 0;
108 virtual int GetNumAdapters() = 0;
109 virtual bool GetAdapterName(
int index,
char *adaptername,
int maxchars) = 0;
110 virtual bool SetAdapter(
int index = 0) = 0;
111 virtual int GetAdapter() = 0;
114 virtual void Release() = 0;
123 extern "C" SPOUTAPI
SPOUTHANDLE WINAPI GetSpout(VOID);