doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Functions | Variables
macosx_glimp.mm File Reference
#import "../../idlib/precompiled.h"
#import "../../renderer/tr_local.h"
#import "macosx_glimp.h"
#import "macosx_local.h"
#import "macosx_sys.h"
#import "macosx_display.h"
#import <AppKit/AppKit.h>
#import <Foundation/Foundation.h>
#import <mach-o/dyld.h>
#import <mach/mach.h>
#import <mach/mach_error.h>

Go to the source code of this file.

Classes

category  NSOpenGLContext(CGLContextAccess)
 

Macros

#define ADD_ATTR(x)
 
#define MAX_RENDERER_INFO_COUNT   128
 
#define MAX_DISPLAYS   128
 
#define FADE_DURATION   0.5
 
#define MAX_DISPLAYS   128
 

Functions

CGDisplayErr Sys_CaptureActiveDisplays (void)
 
void CheckErrors (void)
 
bool GLimp_SetMode (glimpParms_t parms)
 
void Sys_UpdateWindowMouseInputRect (void)
 
void Sys_PauseGL ()
 
void Sys_ResumeGL ()
 
bool GLimp_Init (glimpParms_t parms)
 
void GLimp_SwapBuffers (void)
 
void GLimp_Shutdown (void)
 
void GLimp_LogComment (char *comment)
 
void GLimp_SetGamma (unsigned short red[256], unsigned short green[256], unsigned short blue[256])
 
GLuint glGenFragmentShadersATI (GLuint ID)
 
void glBindFragmentShaderATI (GLuint ID)
 
void glDeleteFragmentShaderATI (GLuint ID)
 
void glBeginFragmentShaderATI (void)
 
void glEndFragmentShaderATI (void)
 
void glSetFragmentShaderConstantATI (GLuint num, const GLfloat *val)
 
char * makeArgStr (GLuint arg)
 
void glPassTexCoordATI (GLuint dst, GLuint coord, GLenum swizzle)
 
void glSampleMapATI (GLuint dst, GLuint interp, GLenum swizzle)
 
char * makeMaskStr (GLuint mask)
 
char * makeDstModStr (GLuint mod)
 
char * makeArgModStr (GLuint mod)
 
void glColorFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod)
 
void glColorFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod)
 
void glColorFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod)
 
void glAlphaFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod)
 
void glAlphaFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod)
 
void glAlphaFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod)
 
GLExtension_t GLimp_ExtensionPointer (const char *name)
 
voidwglGetProcAddress (const char *name)
 
bool Sys_Hide ()
 
bool Sys_Unhide ()
 
bool GLimp_SpawnRenderThread (void(*function)(void))
 
voidGLimp_RendererSleep (void)
 
void GLimp_FrontEndSleep (void)
 
void GLimp_WakeRenderer (void *data)
 
voidGLimp_BackEndSleep (void)
 
void GLimp_WakeBackEnd (void *data)
 
void GLimp_DeactivateContext (void)
 
void GLimp_ActivateContext (void)
 
void GLimp_EnableLogging (bool stat)
 
NSDictionary * Sys_GetMatchingDisplayMode (glimpParms_t parms)
 
void Sys_GetGammaTable (glwgamma_t *table)
 
void Sys_SetGammaTable (glwgamma_t *table)
 
void Sys_StoreGammaTables ()
 
void Sys_SetScreenFade (glwgamma_t *table, float fraction)
 
void Sys_FadeScreens ()
 
void Sys_FadeScreen (CGDirectDisplayID display)
 
void Sys_UnfadeScreens ()
 
void Sys_UnfadeScreen (CGDirectDisplayID display, glwgamma_t *table)
 
CGDirectDisplayID Sys_DisplayToUse (void)
 
bool GLimp_SetScreenParms (glimpParms_t parms)
 
void Sys_GrabMouseCursor (bool grabIt)
 

Variables

glwstate_t glw_state
 

Macro Definition Documentation

#define ADD_ATTR (   x)
Value:
do { \
if (attributeIndex >= attributeSize) { \
attributeSize *= 2; \
pixelAttributes = (NSOpenGLPixelFormatAttribute *)NSZoneRealloc(NULL, pixelAttributes, sizeof(*pixelAttributes) * attributeSize); \
} \
pixelAttributes[attributeIndex] = (NSOpenGLPixelFormatAttribute)x; \
attributeIndex++; \
if ( verbose ) { \
common->Printf( "Adding pixel attribute: %d (%s)\n", x, #x); \
} \
} while(0)
GLenum GLint x
Definition: glext.h:2849
idCommon * common
Definition: Common.cpp:206
#define NULL
Definition: Lib.h:88
virtual void Printf(const char *fmt,...) id_attribute((format(printf
if(!ValidDisplayID(prefInfo.prefDisplayID)) prefInfo.prefDisplayID

Definition at line 146 of file macosx_glimp.mm.

#define FADE_DURATION   0.5

Definition at line 1666 of file macosx_glimp.mm.

#define MAX_DISPLAYS   128

Definition at line 1814 of file macosx_glimp.mm.

#define MAX_DISPLAYS   128

Definition at line 1814 of file macosx_glimp.mm.

#define MAX_RENDERER_INFO_COUNT   128

Definition at line 1258 of file macosx_glimp.mm.

Function Documentation

void CheckErrors ( void  )

Definition at line 75 of file macosx_glimp.mm.

void glAlphaFragmentOp1ATI ( GLenum  op,
GLuint  dst,
GLuint  dstMod,
GLuint  arg1,
GLuint  arg1Rep,
GLuint  arg1Mod 
)

Definition at line 1169 of file macosx_glimp.mm.

void glAlphaFragmentOp2ATI ( GLenum  op,
GLuint  dst,
GLuint  dstMod,
GLuint  arg1,
GLuint  arg1Rep,
GLuint  arg1Mod,
GLuint  arg2,
GLuint  arg2Rep,
GLuint  arg2Mod 
)

Definition at line 1173 of file macosx_glimp.mm.

void glAlphaFragmentOp3ATI ( GLenum  op,
GLuint  dst,
GLuint  dstMod,
GLuint  arg1,
GLuint  arg1Rep,
GLuint  arg1Mod,
GLuint  arg2,
GLuint  arg2Rep,
GLuint  arg2Mod,
GLuint  arg3,
GLuint  arg3Rep,
GLuint  arg3Mod 
)

Definition at line 1177 of file macosx_glimp.mm.

void glBeginFragmentShaderATI ( void  )

Definition at line 704 of file macosx_glimp.mm.

void glBindFragmentShaderATI ( GLuint  ID)

Definition at line 696 of file macosx_glimp.mm.

void glColorFragmentOp1ATI ( GLenum  op,
GLuint  dst,
GLuint  dstMask,
GLuint  dstMod,
GLuint  arg1,
GLuint  arg1Rep,
GLuint  arg1Mod 
)

Definition at line 986 of file macosx_glimp.mm.

void glColorFragmentOp2ATI ( GLenum  op,
GLuint  dst,
GLuint  dstMask,
GLuint  dstMod,
GLuint  arg1,
GLuint  arg1Rep,
GLuint  arg1Mod,
GLuint  arg2,
GLuint  arg2Rep,
GLuint  arg2Mod 
)

Definition at line 1024 of file macosx_glimp.mm.

void glColorFragmentOp3ATI ( GLenum  op,
GLuint  dst,
GLuint  dstMask,
GLuint  dstMod,
GLuint  arg1,
GLuint  arg1Rep,
GLuint  arg1Mod,
GLuint  arg2,
GLuint  arg2Rep,
GLuint  arg2Mod,
GLuint  arg3,
GLuint  arg3Rep,
GLuint  arg3Mod 
)

Definition at line 1087 of file macosx_glimp.mm.

void glDeleteFragmentShaderATI ( GLuint  ID)

Definition at line 700 of file macosx_glimp.mm.

void glEndFragmentShaderATI ( void  )

Definition at line 719 of file macosx_glimp.mm.

GLuint glGenFragmentShadersATI ( GLuint  ID)

Definition at line 691 of file macosx_glimp.mm.

void GLimp_ActivateContext ( void  )

Definition at line 1469 of file macosx_glimp.mm.

void* GLimp_BackEndSleep ( void  )

Definition at line 1457 of file macosx_glimp.mm.

void GLimp_DeactivateContext ( void  )

Definition at line 1465 of file macosx_glimp.mm.

void GLimp_EnableLogging ( bool  stat)

Definition at line 1473 of file macosx_glimp.mm.

GLExtension_t GLimp_ExtensionPointer ( const char *  name)

Definition at line 1182 of file macosx_glimp.mm.

void GLimp_FrontEndSleep ( void  )

Definition at line 1453 of file macosx_glimp.mm.

bool GLimp_Init ( glimpParms_t  parms)

Definition at line 467 of file macosx_glimp.mm.

void GLimp_LogComment ( char *  comment)

Definition at line 641 of file macosx_glimp.mm.

void* GLimp_RendererSleep ( void  )

Definition at line 1449 of file macosx_glimp.mm.

void GLimp_SetGamma ( unsigned short  red[256],
unsigned short  green[256],
unsigned short  blue[256] 
)

Definition at line 648 of file macosx_glimp.mm.

bool GLimp_SetMode ( glimpParms_t  parms)

Definition at line 114 of file macosx_glimp.mm.

bool GLimp_SetScreenParms ( glimpParms_t  parms)

Definition at line 1855 of file macosx_glimp.mm.

void GLimp_Shutdown ( void  )

Definition at line 573 of file macosx_glimp.mm.

bool GLimp_SpawnRenderThread ( void(*)(void function)

Definition at line 1445 of file macosx_glimp.mm.

void GLimp_SwapBuffers ( void  )

Definition at line 520 of file macosx_glimp.mm.

void GLimp_WakeBackEnd ( void data)

Definition at line 1461 of file macosx_glimp.mm.

void GLimp_WakeRenderer ( void data)

Definition at line 1455 of file macosx_glimp.mm.

void glPassTexCoordATI ( GLuint  dst,
GLuint  coord,
GLenum  swizzle 
)

Definition at line 823 of file macosx_glimp.mm.

void glSampleMapATI ( GLuint  dst,
GLuint  interp,
GLenum  swizzle 
)

Definition at line 847 of file macosx_glimp.mm.

void glSetFragmentShaderConstantATI ( GLuint  num,
const GLfloat *  val 
)

Definition at line 770 of file macosx_glimp.mm.

char* makeArgModStr ( GLuint  mod)

Definition at line 956 of file macosx_glimp.mm.

char* makeArgStr ( GLuint  arg)

Definition at line 792 of file macosx_glimp.mm.

char* makeDstModStr ( GLuint  mod)

Definition at line 914 of file macosx_glimp.mm.

char* makeMaskStr ( GLuint  mask)

Definition at line 871 of file macosx_glimp.mm.

CGDisplayErr Sys_CaptureActiveDisplays ( void  )

Definition at line 1382 of file macosx_glimp.mm.

CGDirectDisplayID Sys_DisplayToUse ( void  )

Definition at line 1816 of file macosx_glimp.mm.

void Sys_FadeScreen ( CGDirectDisplayID  display)

Definition at line 1694 of file macosx_glimp.mm.

void Sys_FadeScreens ( )

Definition at line 1667 of file macosx_glimp.mm.

void Sys_GetGammaTable ( glwgamma_t table)

Definition at line 1580 of file macosx_glimp.mm.

NSDictionary* Sys_GetMatchingDisplayMode ( glimpParms_t  parms)

Definition at line 1475 of file macosx_glimp.mm.

void Sys_GrabMouseCursor ( bool  grabIt)

Definition at line 1864 of file macosx_glimp.mm.

bool Sys_Hide ( )

Definition at line 1338 of file macosx_glimp.mm.

void Sys_PauseGL ( )

Definition at line 424 of file macosx_glimp.mm.

void Sys_ResumeGL ( )

Definition at line 436 of file macosx_glimp.mm.

void Sys_SetGammaTable ( glwgamma_t table)

Definition at line 1604 of file macosx_glimp.mm.

void Sys_SetScreenFade ( glwgamma_t table,
float  fraction 
)

Definition at line 1628 of file macosx_glimp.mm.

void Sys_StoreGammaTables ( )

Definition at line 1606 of file macosx_glimp.mm.

void Sys_UnfadeScreen ( CGDirectDisplayID  display,
glwgamma_t table 
)

Definition at line 1763 of file macosx_glimp.mm.

void Sys_UnfadeScreens ( )

Definition at line 1732 of file macosx_glimp.mm.

bool Sys_Unhide ( )

Definition at line 1395 of file macosx_glimp.mm.

void Sys_UpdateWindowMouseInputRect ( void  )

Definition at line 230 of file macosx_glimp.mm.

void* wglGetProcAddress ( const char *  name)

Definition at line 1248 of file macosx_glimp.mm.

Variable Documentation

glwstate_t glw_state

Definition at line 56 of file macosx_glimp.mm.