Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Kelly Brown committed Mar 20, 2012
1 parent a6049f4 commit 7aa2da5
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 8 deletions.
13 changes: 13 additions & 0 deletions CanvasOpenGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,16 @@ void CanvasOpenGL::testFolders()
bool success = home.mkpath("Droideka/data/huh");
qDebug() << (success ? "WOOT" : "dawww");
}

GLuint CanvasOpenGL::loadCardTexture(const QImage& inImage)
{
GLuint outTexture = 0;

if (!inImage.isNull())
{
QImage adjustedImage = inImage.scaled(QSize(512, 512), Qt::KeepAspectRatio,
Qt::FastTransformation);
}

return outTexture;
}
7 changes: 4 additions & 3 deletions CanvasOpenGL.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef WIDGETTESTOPENGL_HPP
#define WIDGETTESTOPENGL_HPP
#ifndef CANVASOPENGL_HPP
#define CANVASOPENGL_HPP

#include "Matrix4x4.hpp"
#include "CardModel.hpp"
Expand All @@ -13,7 +13,7 @@ class CanvasOpenGL : public QGLWidget
CanvasOpenGL(QWidget* inParent = 0);
~CanvasOpenGL();

public slots:
protected slots:
void onPulse();

protected:
Expand All @@ -25,6 +25,7 @@ public slots:

private:
void testFolders();
GLuint loadCardTexture(const QImage& inImage);

mat4f mProjectionMatrix;
mat4f mModelViewMatrix;
Expand Down
5 changes: 3 additions & 2 deletions Droideka.pro
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ SOURCES += main.cpp\
MainWindow.cpp \
CanvasOpenGL.cpp

HEADERS += LoginWindow.h \
HEADERS += \
Matrix4x4.hpp \
SceneGraphNode.hpp \
Vectors.hpp \
Expand All @@ -31,7 +31,8 @@ HEADERS += LoginWindow.h \
VertexBufferObject.hpp \
IndexBufferObject.hpp \
MainWindow.hpp \
CanvasOpenGL.hpp
CanvasOpenGL.hpp \
LoginWindow.hpp

FORMS += LoginWindow.ui

Expand Down
2 changes: 1 addition & 1 deletion LoginWindow.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "LoginWindow.h"
#include "LoginWindow.hpp"
#include "ui_LoginWindow.h"

#include <QNetworkRequest>
Expand Down
4 changes: 2 additions & 2 deletions LoginWindow.h → LoginWindow.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef LOGINWINDOW_H
#define LOGINWINDOW_H
#ifndef LOGINWINDOW_HPP
#define LOGINWINDOW_HPP

#include <QMainWindow>
#include <QNetworkAccessManager>
Expand Down

0 comments on commit 7aa2da5

Please sign in to comment.