summaryrefslogtreecommitdiffstats
path: root/demos/qtdemo
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2009-04-15 09:49:30 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-04-24 06:43:54 (GMT)
commit3ab7dc5d764d41bf828dd76672ca2918b004bad3 (patch)
treecff56f4c9dd052c8623f69368b2cdc41526d1cb2 /demos/qtdemo
parent5423ba187c62ea861ccfcc013fb15fcc4a5ae28d (diff)
downloadQt-3ab7dc5d764d41bf828dd76672ca2918b004bad3.zip
Qt-3ab7dc5d764d41bf828dd76672ca2918b004bad3.tar.gz
Qt-3ab7dc5d764d41bf828dd76672ca2918b004bad3.tar.bz2
Remove the Direct3D engine.
Diffstat (limited to 'demos/qtdemo')
-rw-r--r--demos/qtdemo/colors.cpp24
-rw-r--r--demos/qtdemo/colors.h2
-rw-r--r--demos/qtdemo/mainwindow.cpp8
3 files changed, 2 insertions, 32 deletions
diff --git a/demos/qtdemo/colors.cpp b/demos/qtdemo/colors.cpp
index 41bbfb3..bc16296 100644
--- a/demos/qtdemo/colors.cpp
+++ b/demos/qtdemo/colors.cpp
@@ -72,10 +72,8 @@ int Colors::contentHeight = 510;
// Properties:
bool Colors::openGlRendering = false;
-bool Colors::direct3dRendering = false;
bool Colors::softwareRendering = false;
bool Colors::openGlAwailable = true;
-bool Colors::direct3dAwailable = true;
bool Colors::xRenderPresent = true;
bool Colors::noTicker = false;
@@ -206,8 +204,6 @@ void Colors::parseArgs(int argc, char *argv[])
QString s(argv[i]);
if (s == "-opengl")
Colors::openGlRendering = true;
- else if (s == "-direct3d")
- Colors::direct3dRendering = true;
else if (s == "-software")
Colors::softwareRendering = true;
else if (s == "-no-opengl") // support old style
@@ -270,7 +266,7 @@ void Colors::parseArgs(int argc, char *argv[])
Colors::fps = int(parseFloat(s, "-fps"));
else if (s.startsWith("-h") || s.startsWith("-help")){
QMessageBox::warning(0, "Arguments",
- QString("Usage: qtdemo [-verbose] [-no-adapt] [-opengl] [-direct3d] [-software] [-fullscreen] [-ticker[0|1]] ")
+ QString("Usage: qtdemo [-verbose] [-no-adapt] [-opengl] [-software] [-fullscreen] [-ticker[0|1]] ")
+ "[-animations[0|1]] [-no-blending] [-no-sync] [-use-timer-update[0|1]] [-pause[0|1]] "
+ "[-use-window-mask] [-no-rescale] "
+ "[-use-pixmaps] [-show-fps] [-show-br] [-8bit[0|1]] [-menu<int>] [-use-loop] [-use-balls] "
@@ -330,10 +326,6 @@ void Colors::detectSystemResources()
qDebug("- OpenGL not recommended on this system");
}
-#if defined(Q_WS_WIN)
- Colors::direct3dAwailable = false; // for now.
-#endif
-
#if defined(Q_WS_X11)
// check if X render is present:
QPixmap tmp(1, 1);
@@ -369,20 +361,8 @@ void Colors::postConfigure()
}
}
-#if !defined(Q_WS_WIN)
- if (Colors::direct3dRendering){
- Colors::direct3dRendering = false;
- qDebug() << "- WARNING: Direct3D specified, but not supported on this platform";
- }
-#endif
-
- if (!Colors::openGlRendering && !Colors::direct3dRendering && !Colors::softwareRendering){
+ if (!Colors::openGlRendering && !Colors::softwareRendering){
// The user has not decided rendering system. So we do it instead:
-#if defined(Q_WS_WIN)
- if (Colors::direct3dAwailable)
- Colors::direct3dRendering = true;
- else
-#endif
if (Colors::openGlAwailable)
Colors::openGlRendering = true;
else
diff --git a/demos/qtdemo/colors.h b/demos/qtdemo/colors.h
index 58865c6..b725885 100644
--- a/demos/qtdemo/colors.h
+++ b/demos/qtdemo/colors.h
@@ -82,9 +82,7 @@ public:
// properties:
static bool openGlRendering;
- static bool direct3dRendering;
static bool softwareRendering;
- static bool openGlAwailable;
static bool direct3dAwailable;
static bool xRenderPresent;
static bool noAdapt;
diff --git a/demos/qtdemo/mainwindow.cpp b/demos/qtdemo/mainwindow.cpp
index 8723823..151fa5c 100644
--- a/demos/qtdemo/mainwindow.cpp
+++ b/demos/qtdemo/mainwindow.cpp
@@ -100,12 +100,6 @@ void MainWindow::setRenderingSystem()
{
QWidget *viewport = 0;
- if (Colors::direct3dRendering){
- viewport->setAttribute(Qt::WA_MSWindowsUseDirect3D);
- setCacheMode(QGraphicsView::CacheNone);
- if (Colors::verbose)
- qDebug() << "- using Direct3D";
- }
#ifndef QT_NO_OPENGL
else if (Colors::openGlRendering){
QGLWidget *glw = new QGLWidget(QGLFormat(QGL::SampleBuffers));
@@ -389,8 +383,6 @@ void MainWindow::keyPressEvent(QKeyEvent *event)
s += "Rendering system: ";
if (Colors::openGlRendering)
s += "OpenGL";
- else if (Colors::direct3dRendering)
- s += "Direct3D";
else
s += "software";