class IVdjPluginVideoFx : public IVdjPlugin{public: // called when openGL is initialized and closed, or when the size changes // if you need to allocate private surfaces or textures, // this is the place to do it virtual HRESULT VDJ_API OnDXInit() {return 0;} virtual HRESULT VDJ_API OnDXClose() {return 0;}

// use this function to render the GL surface on the device, using any modification you want // return S_OK if you actually draw the texture on the device, or S_FALSE to let VirtualDJ do it // texture is a GL_TEXTURE_RECTANGLE_EXT // if using VDJPLUGINFLAG_VIDEOINPLACE, texture and vertices will be NULL virtual HRESULT VDJ_API OnDraw(DWORD texture,TVertex *vertices)=0;

// variables you can use (once AGL has been initialized) AGLContext Context; int ImageWidth,ImageHeight;};

class IVdjPluginVideoTransition : public IVdjPlugin{public: // called when OpenGL is initialized and closed, or when the size changes // if you need to allocate private surfaces or textures, // this is the place to do it virtual HRESULT VDJ_API OnDXInit() {return 0;} virtual HRESULT VDJ_API OnDXClose() {return 0;}

// use this function to compose both surfaces on the device. // calling the RenderSurface[x] function will render the image on the actual render target, // using the vertices[x] given. virtual HRESULT VDJ_API Compose(int crossfader,HRESULT(VDJ_API *RenderSurface[2])(),TVertex *vertices[2])=0;

// OnStart() and OnStop() are called if the user activate the auto-transition. // once activated, OnCrossfaderTimer() will be called every frame to let you change // the value of the video crossfader before rendering. // return S_FALSE will stop the auto-transition (OnStop() will not be called). // return E_NOTIMPL will use the default auto-transition. // NOTE: if crossfader is set to 0 or 4096, the Compose() function will not be called. virtual HRESULT VDJ_API OnStart(int chan) {return 0;} virtual HRESULT VDJ_API OnStop() {return 0;} virtual HRESULT VDJ_API OnCrossfaderTimer(int *crossfader) {return E_NOTIMPL;}

// variables you can use (once AGL has been initialized) AGLContext Context; int ImageWidth,ImageHeight;};

//////////////////////////////////////////////////////////////////////////// flags used in OnGetPluginInfo()#define VDJPLUGINFLAG_VIDEOINPLACE 0x20 // tell VirtualDJ not to send textures in OnDraw() but instead use directly the backbuffer