eXTReMe Tracker
 
 

OSX UNDOCUMENTED

 
 

There is some undocumented functions from CGS & CGL that allow,
for example, draw into GL surface from another process.

/* * CGS-CGL.h
*
* Undocumented CGL & CGS methods
*
* Created by Sergey Seitov on 2/11/08.
*
*/

#ifndef __CGS_CGL_H__
#define __CGS_CGL_H__

#include
#include
#include

#ifdef __cplusplus
extern "C" {
#endif

typedef int CGSConnectionID;
typedef int CGSWindowID;
typedef int CGSSurfaceID;

typedef enum {
kCGSSharingNone,
kCGSSharingReadOnly,
kCGSSharingReadWrite
} CGSSharingState;

// Undocumented CGL
CGLError CGLSetSurface(CGLContextObj, CGSConnectionID, CGSWindowID, CGSSurfaceID);
CGLError CGLGetSurface(CGLContextObj, CGSConnectionID*, CGSWindowID*, CGSSurfaceID*);
CGLError CGLUpdateContext(CGLContextObj);

// Undocumented CGS
CGSConnectionID CGSMainConnectionID();
CGError CGSSetWindowSharingState(CGSConnectionID cid, CGSWindowID winId, CGSSharingState state);
CGError CGSGetSurfaceCount(CGSConnectionID, CGWindowID, int* countIds);
CGError CGSGetSurfaceList(CGSConnectionID, CGWindowID, int countIds, CGSSurfaceID* ids, int* filled);
CGError CGSAddSurface(CGSConnectionID, CGWindowID, CGSSurfaceID*);
CGError CGSRemoveSurface(CGSConnectionID, CGWindowID, CGSSurfaceID);
CGError CGSSetSurfaceBounds(CGSConnectionID, CGWindowID, CGSSurfaceID, float xOrg, float yOrg, float width, float height);
CGError CGSGetSurfaceBounds(CGSConnectionID, CGWindowID, CGSSurfaceID, float* bounds);
CGError CGSGetWindowBounds(CGSConnectionID, CGWindowID, float* bounds);
CGError CGSOrderSurface(CGSConnectionID, CGWindowID, CGSSurfaceID, int param1 = 1, int param2 = 0);
CGError CGSFlushSurface(CGSConnectionID, CGWindowID, CGSSurfaceID, int param = 0);

#ifdef __cplusplus
}
#endif

#endif