mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-04 08:15:30 +08:00
qt 6.5.1 original
This commit is contained in:
17
tests/manual/xcb_gl_integration/CMakeLists.txt
Normal file
17
tests/manual/xcb_gl_integration/CMakeLists.txt
Normal file
@ -0,0 +1,17 @@
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
#####################################################################
|
||||
## xcb_gl_integration Binary:
|
||||
#####################################################################
|
||||
|
||||
qt_internal_add_manual_test(xcb_gl_integration
|
||||
GUI
|
||||
SOURCES
|
||||
main.cpp
|
||||
INCLUDE_DIRECTORIES
|
||||
.
|
||||
LIBRARIES
|
||||
Qt::Gui
|
||||
Qt::GuiPrivate
|
||||
)
|
32
tests/manual/xcb_gl_integration/main.cpp
Normal file
32
tests/manual/xcb_gl_integration/main.cpp
Normal file
@ -0,0 +1,32 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include <QtGui/QGuiApplication>
|
||||
#include <QtGui/QWindow>
|
||||
#include <QtGui/QOpenGLContext>
|
||||
|
||||
#include <QtGui/qpa/qplatformnativeinterface.h>
|
||||
|
||||
#include <QtCore/QDebug>
|
||||
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
QGuiApplication app(argc, argv);
|
||||
|
||||
QWindow window;
|
||||
window.setSurfaceType(QSurface::OpenGLSurface);
|
||||
window.create();
|
||||
|
||||
QOpenGLContext context;
|
||||
context.create();
|
||||
|
||||
QPlatformNativeInterface *ni = QGuiApplication::platformNativeInterface();
|
||||
|
||||
qDebug() << "EGLDisplay" << ni->nativeResourceForWindow(QByteArrayLiteral("egldisplay"), &window);
|
||||
qDebug() << "EGLContext" << ni->nativeResourceForContext(QByteArrayLiteral("eglcontext"), &context);
|
||||
qDebug() << "EGLConfig" << ni->nativeResourceForContext(QByteArrayLiteral("eglconfig"), &context);
|
||||
qDebug() << "GLXContext" << ni->nativeResourceForContext(QByteArrayLiteral("glxcontext"), &context);
|
||||
qDebug() << "GLXConfig" << ni->nativeResourceForContext(QByteArrayLiteral("glxconfig"), &context);
|
||||
|
||||
return 0;
|
||||
}
|
8
tests/manual/xcb_gl_integration/xcb_gl_integration.pro
Normal file
8
tests/manual/xcb_gl_integration/xcb_gl_integration.pro
Normal file
@ -0,0 +1,8 @@
|
||||
TEMPLATE = app
|
||||
TARGET = xcb_gl_integration
|
||||
INCLUDEPATH += .
|
||||
|
||||
QT += gui-private
|
||||
|
||||
# Input
|
||||
SOURCES += main.cpp
|
Reference in New Issue
Block a user