Big reorganization

This commit is contained in:
Matt Keeter 2014-03-13 06:17:51 -07:00
parent b903eced97
commit 44fb4197ca
11 changed files with 45 additions and 40 deletions

View file

@ -1,30 +0,0 @@
QT += core gui opengl widgets
TARGET = fstl
TEMPLATE = app
SOURCES += \
main.cpp\
canvas.cpp \
mesh.cpp \
glmesh.cpp \
loader.cpp \
window.cpp \
backdrop.cpp
HEADERS += \
canvas.h \
mesh.h \
glmesh.h \
loader.h \
window.h \
backdrop.h
CONFIG += c++11
RESOURCES += \
resources.qrc
QMAKE_INFO_PLIST = ../misc/Info.plist
ICON = ../misc/fstl.icns

View file

@ -1,15 +0,0 @@
#version 120
varying vec3 ec_pos;
void main() {
vec3 base3 = vec3(0.99, 0.96, 0.89);
vec3 base2 = vec3(0.92, 0.91, 0.83);
vec3 base00 = vec3(0.40, 0.48, 0.51);
vec3 ec_normal = normalize(cross(dFdx(ec_pos), dFdy(ec_pos)));
float a = dot(ec_normal, vec3(0.0, 0.0, 1.0));
float b = dot(ec_normal, vec3(-0.57, -0.57, 0.57));
gl_FragColor = vec4((a*base2 + (1-a)*base00)*0.5 +
(b*base3 + (1-b)*base00)*0.5, 1.0);
}

View file

@ -1,13 +0,0 @@
#version 120
attribute vec3 vertex_position;
uniform mat4 transform_matrix;
uniform mat4 view_matrix;
varying vec3 ec_pos;
void main() {
gl_Position = view_matrix*transform_matrix*
vec4(vertex_position, 1.0);
ec_pos = gl_Position.xyz;
}

View file

@ -1,7 +0,0 @@
#version 120
varying vec3 frag_color;
void main() {
gl_FragColor = vec4(frag_color, 1.0);
}

View file

@ -1,10 +0,0 @@
#version 120
attribute vec2 vertex_position;
attribute vec3 vertex_color;
varying vec3 frag_color;
void main() {
gl_Position = vec4(vertex_position, 0.9, 1.0);
frag_color = vertex_color;
}

View file

@ -1,9 +0,0 @@
<RCC>
<qresource prefix="/">
<file>gl/mesh.frag</file>
<file>gl/mesh.vert</file>
<file>gl/quad.frag</file>
<file>gl/quad.vert</file>
<file>style.qss</file>
</qresource>
</RCC>

View file

@ -1,19 +0,0 @@
QWidget {
background-color: #fdf6e3;
color: #839496;
}
QPushButton {
background-color: #eee8d5;
border-top-width: 5px;
border-bottom-width: 5px;
border-left-width: 30px;
border-right-width: 30px;
border-style: flat;
margin: 0px;
color: #839496;
}
QPushButton:pressed {
background-color: #ddd7d4;
}

View file

@ -11,7 +11,7 @@ Window::Window(QWidget *parent) :
{
setWindowTitle("fstl");
QFile styleFile( ":/style.qss" );
QFile styleFile( ":/qt/style.qss" );
styleFile.open( QFile::ReadOnly );
setStyleSheet(styleFile.readAll());