1 /****************************************************************************
2 * MeshLab                                                           o o     *
3 * A versatile mesh processing toolbox                             o     o   *
4 *                                                                _   O  _   *
5 * Copyright(C) 2005-2008                                           \/)\/    *
6 * Visual Computing Lab                                            /\/|      *
7 * ISTI - Italian National Research Council                           |      *
8 *                                                                    \      *
9 * All rights reserved.                                                      *
10 *                                                                           *
11 * This program is free software; you can redistribute it and/or modify      *
12 * it under the terms of the GNU General Public License as published by      *
13 * the Free Software Foundation; either version 2 of the License, or         *
14 * (at your option) any later version.                                       *
15 *                                                                           *
16 * This program is distributed in the hope that it will be useful,           *
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of            *
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             *
19 * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)          *
20 * for more details.                                                         *
21 *                                                                           *
22 ****************************************************************************/
23 /****************************************************************************
24 History
25 $Log$
26 Revision 1.3  2007/12/10 14:21:02  corsini
27 new version with correct layout
28 
29 Revision 1.2  2007/12/03 11:35:24  corsini
30 code restyling
31 
32 
33 ****************************************************************************/
34 #ifndef RMSHADERDIALOG_H
35 #define RMSHADERDIALOG_H
36 
37 // Qt headers
38 #include <QDialog>
39 #include <QVBoxLayout>
40 #include <QLabel>
41 #include <QMessageBox>
42 #include <QList>
43 #include <QFile>
44 #include <QDir>
45 #include <QFileInfo>
46 #include <QSignalMapper>
47 #include <QCheckBox>
48 #include <QPushButton>
49 #include <QLineEdit>
50 #include <QSpinBox>
51 #include <QDoubleSpinBox>
52 #include <GL/glew.h>
53 #include <QGLWidget>
54 #include "parser/RmXmlParser.h"
55 #include "parser/RmEffect.h"
56 #include "parser/RmPass.h"
57 #include "ui_rmShadowDialog.h"
58 #include "glstateholder.h"
59 #include <meshlab/meshmodel.h>
60 
61 class RmShaderDialog : public QDialog
62 {
63 	Q_OBJECT
64 
65 public:
66 	RmShaderDialog(GLStateHolder *holder, RmXmlParser *parser, QGLWidget *gla,
67 	               RenderMode &rm, QWidget *parent = NULL);
68 	~RmShaderDialog();
69 
70 public slots:
71 	void fillDialogWithEffect( int index );
72 	void fillTabsWithPass( int index );
73 	void clearTabs();
74 	void valuesChanged(const QString & varNameAndIndex );
75 
76 private:
77 	Ui_RmShaderDialogClass ui;
78 
79 	QGridLayout *layoutUniform;
80 	QGridLayout *layoutTextures;
81 	QGridLayout *layoutOpengl;
82 
83 	QGLWidget *glarea;
84 	RenderMode *rendMode;
85 	RmXmlParser *parser;
86 
87 	RmEffect *eff_selected;
88 	RmPass *pass_selected;
89 
90 	QList<QWidget*> shown;
91 	GLStateHolder *holder;
92 
93 	QSignalMapper *signaler;
94 };
95 #endif /* RMSHADERDIALOG_H */
96