equal
deleted
inserted
replaced
85 qWarning("QEglContext::createSurface(): Unable to create EGL surface, error = 0x%x", eglGetError()); |
85 qWarning("QEglContext::createSurface(): Unable to create EGL surface, error = 0x%x", eglGetError()); |
86 } |
86 } |
87 return surf; |
87 return surf; |
88 } |
88 } |
89 |
89 |
90 EGLDisplay QEglContext::getDisplay(QPaintDevice *device) |
90 EGLNativeDisplayType QEglContext::nativeDisplay() |
91 { |
91 { |
92 EGLDisplay dpy = 0; |
92 HDC myDc = GetDC(0); |
93 HWND win = (static_cast<QWidget*>(device))->winId(); |
93 |
94 HDC myDc = GetDC(win); |
|
95 if (!myDc) { |
94 if (!myDc) { |
96 qWarning("QEglContext::defaultDisplay(): WinCE display is not open"); |
95 qWarning("QEglContext::nativeDisplay(): WinCE display is not open"); |
|
96 return EGL_DEFAULT_DISPLAY; |
97 } |
97 } |
98 dpy = eglGetDisplay(EGLNativeDisplayType(myDc)); |
98 return EGLNativeDisplayType(myDc); |
99 if (dpy == EGL_NO_DISPLAY) { |
|
100 qWarning("QEglContext::defaultDisplay(): Falling back to EGL_DEFAULT_DISPLAY"); |
|
101 dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY); |
|
102 } |
|
103 return dpy; |
|
104 } |
99 } |
105 |
100 |
106 // Set pixel format and other properties based on a paint device. |
101 // Set pixel format and other properties based on a paint device. |
107 void QEglProperties::setPaintDeviceFormat(QPaintDevice *dev) |
102 void QEglProperties::setPaintDeviceFormat(QPaintDevice *dev) |
108 { |
103 { |