Tidy and format
This commit is contained in:
parent
42970781db
commit
ee689a9645
|
@ -125,7 +125,6 @@ portability-simd-intrinsics,
|
||||||
readability-avoid-const-params-in-decls,
|
readability-avoid-const-params-in-decls,
|
||||||
readability-const-return-type,
|
readability-const-return-type,
|
||||||
readability-container-size-empty,
|
readability-container-size-empty,
|
||||||
readability-convert-member-functions-to-static,
|
|
||||||
readability-delete-null-pointer,
|
readability-delete-null-pointer,
|
||||||
readability-deleted-default,
|
readability-deleted-default,
|
||||||
readability-inconsistent-declaration-parameter-name,
|
readability-inconsistent-declaration-parameter-name,
|
||||||
|
|
|
@ -23,7 +23,7 @@ class QTK_WIDGET_EXPORT MainWindow
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MainWindow * ui {};
|
Ui::MainWindow * ui {};
|
||||||
std::unordered_map<std::string, Qtk::Scene *> mScenes;
|
std::unordered_map<std::string, Qtk::Scene *> mScenes {};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MAINWINDOW_H
|
#endif // MAINWINDOW_H
|
||||||
|
|
|
@ -48,8 +48,8 @@ namespace Qtk {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Skybox * mSkybox {};
|
Skybox * mSkybox {};
|
||||||
std::vector<MeshRenderer *> mMeshes;
|
std::vector<MeshRenderer *> mMeshes {};
|
||||||
std::vector<Model *> mModels;
|
std::vector<Model *> mModels {};
|
||||||
};
|
};
|
||||||
} // namespace Qtk
|
} // namespace Qtk
|
||||||
|
|
||||||
|
|
|
@ -55,10 +55,10 @@ class MainWidget : public QOpenGLWidget, protected QOpenGLFunctions {
|
||||||
|
|
||||||
// Protected Helpers
|
// Protected Helpers
|
||||||
protected:
|
protected:
|
||||||
void keyPressEvent(QKeyEvent * event);
|
void keyPressEvent(QKeyEvent * event) override;
|
||||||
void keyReleaseEvent(QKeyEvent * event);
|
void keyReleaseEvent(QKeyEvent * event) override;
|
||||||
void mousePressEvent(QMouseEvent * event);
|
void mousePressEvent(QMouseEvent * event) override;
|
||||||
void mouseReleaseEvent(QMouseEvent * event);
|
void mouseReleaseEvent(QMouseEvent * event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Private helpers
|
// Private helpers
|
||||||
|
|
10
src/mesh.h
10
src/mesh.h
|
@ -124,11 +124,11 @@ namespace Qtk {
|
||||||
protected:
|
protected:
|
||||||
DrawMode mDrawMode;
|
DrawMode mDrawMode;
|
||||||
|
|
||||||
Vertices mVertices;
|
Vertices mVertices {};
|
||||||
Colors mColors;
|
Colors mColors {};
|
||||||
Indices mIndices;
|
Indices mIndices {};
|
||||||
TexCoords mTexCoords;
|
TexCoords mTexCoords {};
|
||||||
Normals mNormals;
|
Normals mNormals {};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Shape : public ShapeBase {
|
struct Shape : public ShapeBase {
|
||||||
|
|
|
@ -122,8 +122,8 @@ namespace Qtk {
|
||||||
private:
|
private:
|
||||||
static MeshManager sInstances;
|
static MeshManager sInstances;
|
||||||
|
|
||||||
int mDrawType;
|
int mDrawType {};
|
||||||
std::string mVertexShader, mFragmentShader;
|
std::string mVertexShader {}, mFragmentShader {};
|
||||||
};
|
};
|
||||||
} // namespace Qtk
|
} // namespace Qtk
|
||||||
|
|
||||||
|
|
20
src/model.h
20
src/model.h
|
@ -37,10 +37,10 @@ namespace Qtk {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct QTKAPI ModelTexture {
|
struct QTKAPI ModelTexture {
|
||||||
GLuint mID;
|
GLuint mID {};
|
||||||
QOpenGLTexture * mTexture;
|
QOpenGLTexture * mTexture {};
|
||||||
std::string mType;
|
std::string mType {};
|
||||||
std::string mPath;
|
std::string mPath {};
|
||||||
};
|
};
|
||||||
|
|
||||||
class Model;
|
class Model;
|
||||||
|
@ -82,9 +82,9 @@ namespace Qtk {
|
||||||
void draw(QOpenGLShaderProgram & shader);
|
void draw(QOpenGLShaderProgram & shader);
|
||||||
|
|
||||||
// ModelMesh Public Members
|
// ModelMesh Public Members
|
||||||
Vertices mVertices;
|
Vertices mVertices {};
|
||||||
Indices mIndices;
|
Indices mIndices {};
|
||||||
Textures mTextures;
|
Textures mTextures {};
|
||||||
Transform3D mTransform;
|
Transform3D mTransform;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -136,9 +136,9 @@ namespace Qtk {
|
||||||
|
|
||||||
// Model Private Members
|
// Model Private Members
|
||||||
|
|
||||||
ModelMesh::Textures mTexturesLoaded;
|
ModelMesh::Textures mTexturesLoaded {};
|
||||||
std::vector<ModelMesh> mMeshes;
|
std::vector<ModelMesh> mMeshes {};
|
||||||
std::string mDirectory;
|
std::string mDirectory {};
|
||||||
const char *mVertexShader, *mFragmentShader, *mName;
|
const char *mVertexShader, *mFragmentShader, *mName;
|
||||||
};
|
};
|
||||||
} // namespace Qtk
|
} // namespace Qtk
|
||||||
|
|
|
@ -40,8 +40,8 @@ namespace Qtk {
|
||||||
private:
|
private:
|
||||||
void init();
|
void init();
|
||||||
|
|
||||||
Vertices mVertices;
|
Vertices mVertices {};
|
||||||
Indices mIndices;
|
Indices mIndices {};
|
||||||
|
|
||||||
QOpenGLShaderProgram mProgram;
|
QOpenGLShaderProgram mProgram;
|
||||||
QOpenGLVertexArrayObject mVAO;
|
QOpenGLVertexArrayObject mVAO;
|
||||||
|
|
|
@ -55,8 +55,8 @@ QOpenGLTexture * OpenGLTextureFactory::initCubeMap(
|
||||||
}
|
}
|
||||||
|
|
||||||
QOpenGLTexture * OpenGLTextureFactory::initCubeMap(
|
QOpenGLTexture * OpenGLTextureFactory::initCubeMap(
|
||||||
QImage right, QImage top, QImage front, QImage left, QImage bottom,
|
const QImage & right, const QImage & top, const QImage & front,
|
||||||
QImage back) {
|
const QImage & left, const QImage & bottom, const QImage & back) {
|
||||||
auto texture = new QOpenGLTexture(QOpenGLTexture::TargetCubeMap);
|
auto texture = new QOpenGLTexture(QOpenGLTexture::TargetCubeMap);
|
||||||
std::vector<QImage> faceTextures = {std::move(right), std::move(top),
|
std::vector<QImage> faceTextures = {std::move(right), std::move(top),
|
||||||
std::move(front), std::move(left),
|
std::move(front), std::move(left),
|
||||||
|
|
|
@ -29,8 +29,8 @@ namespace Qtk {
|
||||||
|
|
||||||
// Cube maps
|
// Cube maps
|
||||||
static QOpenGLTexture * initCubeMap(
|
static QOpenGLTexture * initCubeMap(
|
||||||
QImage right, QImage top, QImage front, QImage left, QImage bottom,
|
const QImage & right, const QImage & top, const QImage & front,
|
||||||
QImage back);
|
const QImage & left, const QImage & bottom, const QImage & back);
|
||||||
// Overloads for cube map initialization
|
// Overloads for cube map initialization
|
||||||
static QOpenGLTexture * initCubeMap(const char * tile);
|
static QOpenGLTexture * initCubeMap(const char * tile);
|
||||||
static QOpenGLTexture * initCubeMap(
|
static QOpenGLTexture * initCubeMap(
|
||||||
|
|
Loading…
Reference in New Issue