-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests: Added glsandbox, test app for all GL related stuff
This is the first GUI test app, the others are all text-based.
- Loading branch information
Showing
6 changed files
with
161 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
CONFIG += deng_qtopengl deng_qtgui | ||
|
||
include(../config_test.pri) | ||
include(../../dep_gui.pri) | ||
include(../../dep_opengl.pri) | ||
|
||
CONFIG -= console | ||
TEMPLATE = app | ||
TARGET = test_glsandbox | ||
|
||
SOURCES += main.cpp \ | ||
testwindow.cpp | ||
|
||
deployTest($$TARGET) | ||
|
||
macx { | ||
linkBinaryToBundledLibdengGui($${TARGET}.app/Contents/MacOS/$${TARGET}) | ||
} | ||
|
||
HEADERS += \ | ||
testwindow.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* The Doomsday Engine Project | ||
* | ||
* Copyright (c) 2013 Jaakko Keränen <jaakko.keranen@iki.fi> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#include <de/GuiApp> | ||
#include <de/LogBuffer> | ||
#include <QDebug> | ||
|
||
#include "testwindow.h" | ||
|
||
using namespace de; | ||
|
||
int main(int argc, char **argv) | ||
{ | ||
try | ||
{ | ||
GuiApp app(argc, argv); | ||
app.initSubsystems(App::DisablePlugins); | ||
|
||
TestWindow win; | ||
win.show(); | ||
|
||
return app.execLoop(); | ||
} | ||
catch(Error const &err) | ||
{ | ||
qWarning() << err.asText(); | ||
} | ||
|
||
qDebug("Exiting main()..."); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* The Doomsday Engine Project | ||
* | ||
* Copyright (c) 2013 Jaakko Keränen <jaakko.keranen@iki.fi> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#include "testwindow.h" | ||
|
||
using namespace de; | ||
|
||
DENG2_PIMPL(TestWindow), | ||
DENG2_OBSERVES(Canvas, GLInit), | ||
DENG2_OBSERVES(Canvas, GLResize), | ||
DENG2_OBSERVES(Canvas, GLDraw) | ||
{ | ||
Instance(Public *i) : Base(i) | ||
{} | ||
|
||
void canvasGLInit(Canvas &cv) | ||
{ | ||
|
||
} | ||
|
||
void canvasGLResized(Canvas &cv) | ||
{ | ||
|
||
} | ||
|
||
void canvasGLDraw(Canvas &cv) | ||
{ | ||
|
||
} | ||
}; | ||
|
||
TestWindow::TestWindow() : d(new Instance(this)) | ||
{ | ||
setWindowTitle("libgui GL Sandbox"); | ||
setMinimumSize(640, 480); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* The Doomsday Engine Project | ||
* | ||
* Copyright (c) 2013 Jaakko Keränen <jaakko.keranen@iki.fi> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#ifndef GLSANDBOX_TESTWINDOW_H | ||
#define GLSANDBOX_TESTWINDOW_H | ||
|
||
#include <de/CanvasWindow> | ||
|
||
class TestWindow : public de::CanvasWindow | ||
{ | ||
public: | ||
TestWindow(); | ||
|
||
private: | ||
DENG2_PRIVATE(d) | ||
}; | ||
|
||
#endif // GLSANDBOX_TESTWINDOW_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ TEMPLATE = subdirs | |
deng_tests: SUBDIRS += \ | ||
archive \ | ||
bitfield \ | ||
glsandbox \ | ||
log \ | ||
record \ | ||
script \ | ||
|