Go to the documentation of this file.
29 #ifndef __OSXWindow_H__
30 #define __OSXWindow_H__
32 #include <Carbon/Carbon.h>
35 #include <OpenGL/OpenGL.h>
36 #include <OpenGL/CGLTypes.h>
47 void create(
const String& name,
unsigned int width,
unsigned int height,
50 virtual void destroy(
void ) = 0;
52 virtual bool isActive(
void )
const = 0;
54 virtual bool isClosed(
void )
const = 0;
58 virtual void reposition(
int left,
int top ) = 0;
60 virtual void resize(
unsigned int width,
unsigned int height ) = 0;
71 #if defined(MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
78 void createCGLFullscreen(
unsigned int width,
unsigned int height,
unsigned int depth,
unsigned int fsaa, CGLContextObj sharedContext);
83 #if defined(MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
84 uint32 bitDepthFromDisplayMode(CGDisplayModeRef mode);
88 #define ENABLE_CG_CHECK 0
90 #define CG_CHECK_ERROR(e) \
92 if((CGError)e != kCGErrorSuccess) \
94 CGReleaseAllDisplays(); \
95 OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, String("CG Error: " + StringConverter::toString(e) + + \
96 " Line # " + StringConverter::toString(__LINE__)), __PRETTY_FUNCTION__); \
100 #define CG_CHECK_ERROR(e) {}
104 #define CGL_CHECK_ERROR(e) \
106 if((CGLError)e != kCGLNoError) \
108 CGReleaseAllDisplays(); \
109 OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, String("CGL Error: " + String(CGLErrorString(e)) + \
110 " Line # " + StringConverter::toString(__LINE__)), __PRETTY_FUNCTION__); \
114 #define CGL_CHECK_ERROR(e) {}
void createCGLFullscreen(unsigned int width, unsigned int height, unsigned int depth, unsigned int fsaa, CGLContextObj sharedContext)
Switch to full screen mode using CGL.
CFDictionaryRef mOriginalDisplayMode
virtual void windowMovedOrResized()
Overridden - see RenderTarget.
void swapCGLBuffers(void)
Update the full screen context.
virtual void copyContentsToMemory(const PixelBox &dst, FrameBuffer buffer)
Overridden - see RenderTarget.
Manages the target rendering window.
Class that encapsulates an GL context.
virtual void resize(unsigned int width, unsigned int height)=0
Overridden - see RenderWindow.
virtual bool isHidden() const =0
Indicates whether the window was set to hidden (not displayed)
virtual void destroy(void)=0
Overridden - see RenderWindow.
CGLContextObj mCGLContextObj
virtual bool isActive(void) const =0
Overridden - see RenderWindow.
virtual void reposition(int left, int top)=0
Overridden - see RenderWindow.
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
void destroyCGLFullscreen(void)
Kill full screen mode, and return to default windowed mode.
void create(const String &name, unsigned int width, unsigned int height, bool fullScreen, const NameValuePairList *miscParams)=0
Overridden - see RenderWindow.
virtual void swapBuffers()=0
Overridden - see RenderWindow.
A primitive describing a volume (3D), image (2D) or line (1D) of pixels in memory.
virtual void setHidden(bool hidden)=0
Hide (or show) the window.
virtual bool isClosed(void) const =0
Overridden - see RenderWindow.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Tue Apr 13 2021 08:53:15