Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1023 B

  1. //========= Copyright 1996-2009, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: provide some call-out glue to ObjC from the C++ GLMgr code
  4. //
  5. // $Revision: $
  6. // $NoKeywords: $
  7. //=============================================================================//
  8. #include <Cocoa/Cocoa.h>
  9. #include <OpenGL/OpenGL.h>
  10. #include <OpenGL/gl.h>
  11. #include <OpenGL/glext.h>
  12. #undef MIN
  13. #undef MAX
  14. #define DONT_DEFINE_BOOL // Don't define BOOL!
  15. #include "tier0/threadtools.h"
  16. #include "tier1/interface.h"
  17. #include "tier1/strtools.h"
  18. #include "tier1/utllinkedlist.h"
  19. #include "togl/rendermechanism.h"
  20. // ------------------------------------------------------------------------------------ //
  21. // some glue to let GLMgr call into NS/ObjC classes.
  22. // ------------------------------------------------------------------------------------ //
  23. CGLContextObj GetCGLContextFromNSGL( PseudoNSGLContextPtr nsglCtx )
  24. {
  25. return (CGLContextObj)[ (NSOpenGLContext*)nsglCtx CGLContextObj];
  26. }