1 // SwiftShader Software Renderer
\r
3 // Copyright(c) 2005-2012 TransGaming Inc.
\r
5 // All rights reserved. No part of this software may be copied, distributed, transmitted,
\r
6 // transcribed, stored in a retrieval system, translated into any human or computer
\r
7 // language by any means, or disclosed to third parties without the explicit written
\r
8 // agreement of TransGaming Inc. Without such an agreement, no rights or licenses, express
\r
9 // or implied, including but not limited to any patent rights, are granted to you.
\r
12 // Display.h: Defines the egl::Display class, representing the abstract
\r
13 // display on which graphics are drawn. Implements EGLDisplay.
\r
14 // [EGL 1.4] section 2.1.2 page 3.
\r
16 #ifndef INCLUDE_DISPLAY_H_
\r
17 #define INCLUDE_DISPLAY_H_
\r
33 static egl::Display *getDisplay(EGLNativeDisplayType displayId);
\r
38 bool getConfigs(EGLConfig *configs, const EGLint *attribList, EGLint configSize, EGLint *numConfig);
\r
39 bool getConfigAttrib(EGLConfig config, EGLint attribute, EGLint *value);
\r
41 EGLSurface createWindowSurface(EGLNativeWindowType window, EGLConfig config, const EGLint *attribList);
\r
42 EGLSurface createOffscreenSurface(EGLConfig config, const EGLint *attribList);
\r
43 EGLContext createContext(EGLConfig configHandle, const Context *shareContext, EGLint clientVersion);
\r
45 void destroySurface(Surface *surface);
\r
46 void destroyContext(Context *context);
\r
48 bool isInitialized() const;
\r
49 bool isValidConfig(EGLConfig config);
\r
50 bool isValidContext(Context *context);
\r
51 bool isValidSurface(Surface *surface);
\r
52 bool isValidWindow(EGLNativeWindowType window);
\r
53 bool hasExistingWindowSurface(EGLNativeWindowType window);
\r
55 EGLint getMinSwapInterval();
\r
56 EGLint getMaxSwapInterval();
\r
58 EGLNativeDisplayType getNativeDisplay() const;
\r
59 const char *getExtensionString() const;
\r
62 Display(EGLNativeDisplayType displayId);
\r
64 DisplayMode getDisplayMode() const;
\r
66 const EGLNativeDisplayType displayId;
\r
68 EGLint mMaxSwapInterval;
\r
69 EGLint mMinSwapInterval;
\r
71 typedef std::set<Surface*> SurfaceSet;
\r
72 SurfaceSet mSurfaceSet;
\r
74 ConfigSet mConfigSet;
\r
76 typedef std::set<Context*> ContextSet;
\r
77 ContextSet mContextSet;
\r
81 #endif // INCLUDE_DISPLAY_H_
\r