git-svn-id: svn://db.shs.com.ru/libs@358 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
QApplication a(argc, argv);
|
||||
#if QT_VERSION >= 0x050000
|
||||
a.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
|
||||
#endif
|
||||
ConnectionEdit w;
|
||||
if (a.arguments().size() > 1) {
|
||||
QPIConfig cfg(a.arguments()[1]);
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
QApplication a(argc, argv);
|
||||
#if QT_VERSION >= 0x050000
|
||||
a.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
|
||||
#endif
|
||||
PIDumper w;
|
||||
w.show();
|
||||
return a.exec();
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
QApplication a(argc, argv);
|
||||
#if QT_VERSION >= 0x050000
|
||||
a.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
|
||||
#endif
|
||||
QPIIntrospector w;
|
||||
w.show();
|
||||
return a.exec();
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
QApplication a(argc, argv);
|
||||
#if QT_VERSION >= 0x050000
|
||||
a.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
|
||||
#endif
|
||||
a.setWindowIcon(QIcon(":/icons/blockview.png"));
|
||||
BlockEditor w;
|
||||
if (a.arguments().size() > 1)
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
QApplication a(argc, argv);
|
||||
#if QT_VERSION >= 0x050000
|
||||
a.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
|
||||
#endif
|
||||
MainWindow w;
|
||||
w.show();
|
||||
return a.exec();
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
QApplication a(argc, argv);
|
||||
#if QT_VERSION >= 0x050000
|
||||
a.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
|
||||
#endif
|
||||
CDPultWindow w;
|
||||
w.show();
|
||||
if (a.arguments().size() > 1)
|
||||
|
||||
@@ -143,7 +143,7 @@ void createGLTexture(GLuint & tex, const QImage & image, const GLenum & format,
|
||||
glGenTextures(1, &tex);
|
||||
glBindTexture(target, tex);
|
||||
}
|
||||
QImage im = image;///__GLWidget__::convertToGLFormat(image);
|
||||
QImage im = image.mirrored(false, true);///__GLWidget__::convertToGLFormat(image);
|
||||
//const QImage & cim(im);
|
||||
//glClearError();
|
||||
//glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
|
||||
@@ -499,7 +499,10 @@ void QGLView::collectGraphicItems(QList<QGraphicsItem * > & list, QGraphicsItem
|
||||
|
||||
|
||||
void QGLView::collectObjectLights(GLObjectBase * o) {
|
||||
if (o->type_ == GLObjectBase::glLight) lights_ << globject_cast<Light * >(o);
|
||||
if (o->type_ == GLObjectBase::glLight) {
|
||||
lights_ << globject_cast<Light * >(o);
|
||||
o->view_ = this;
|
||||
}
|
||||
foreach (GLObjectBase * i, o->children())
|
||||
collectObjectLights(i);
|
||||
}
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
|
||||
int main(int argc, char ** argv) {
|
||||
QApplication a(argc, argv);
|
||||
#if QT_VERSION >= 0x050000
|
||||
a.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
|
||||
#endif
|
||||
QGLViewWindow w;
|
||||
w.show();
|
||||
QStringList al(a.arguments());
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
QGLViewWindow::QGLViewWindow(QWidget * parent): QMainWindow(parent), Ui::QGLViewWindow() {
|
||||
setupUi(this);
|
||||
session.setFile("session_qglview_test.conf");
|
||||
session.addEntry(this);
|
||||
icon_geo = QIcon(":/icons/type-geo.png");
|
||||
icon_camera = QIcon(":/icons/type-camera.png");
|
||||
icon_light = QIcon(":/icons/type-light.png");
|
||||
@@ -113,10 +115,12 @@ QGLViewWindow::QGLViewWindow(QWidget * parent): QMainWindow(parent), Ui::QGLView
|
||||
//view->addObject(&partsys);
|
||||
partsys.material().color_diffuse = Qt::red;
|
||||
treeProps->assignObject(&partsys);
|
||||
session.load();
|
||||
}
|
||||
|
||||
|
||||
QGLViewWindow::~QGLViewWindow() {
|
||||
session.save();
|
||||
//delete ps;
|
||||
}
|
||||
|
||||
@@ -132,7 +136,8 @@ void QGLViewWindow::changeEvent(QEvent * e) {
|
||||
|
||||
void QGLViewWindow::timerEvent(QTimerEvent * ) {
|
||||
//static double t = 0.;
|
||||
cam_light->intensity = checkCameraLight->isChecked() ? 0.5 : 0.;
|
||||
//cam_light->intensity = checkCameraLight->isChecked() ? 0.5 : 0.;
|
||||
cam_light->setVisible(checkCameraLight->isChecked());
|
||||
//((RendererSimple*)(view->renderer()))->mpos = view->mapFromGlobal(QCursor::pos());
|
||||
statusBar()->showMessage(QString("FPS: %1").arg(QString::number(view->currentFPS(), 'f', 2)));
|
||||
}
|
||||
@@ -215,7 +220,7 @@ void QGLViewWindow::selectionChanged(GLObjectBase * cur, GLObjectBase * prev) {
|
||||
objectEditor->setObject(sel_obj);
|
||||
if (sel_obj == 0) return;
|
||||
matEditor->setMaterial(sel_obj->material());
|
||||
qDebug() << sel_obj->boundingBox();
|
||||
//qDebug() << sel_obj->boundingBox();
|
||||
}
|
||||
|
||||
|
||||
@@ -315,6 +320,7 @@ void QGLViewWindow::on_view_keyEvent(Qt::Key k, Qt::KeyboardModifiers m) {
|
||||
|
||||
void QGLViewWindow::on_treeObjects_itemClicked(QTreeWidgetItem * ti, int col) {
|
||||
((GLObjectBase*)(ti->data(0, Qt::UserRole).toULongLong()))->select();
|
||||
//qDebug() << ((GLObjectBase*)(ti->data(0, Qt::UserRole).toULongLong()))->type();
|
||||
if (sel_obj->type() == GLObjectBase::glCamera)
|
||||
view->setCamera(*(Camera*)sel_obj);
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "loader_ase.h"
|
||||
#include "renderer_simple.h"
|
||||
#include "renderer_deferred_shading.h"
|
||||
#include "session_manager.h"
|
||||
//#include "renderer_rt.h"
|
||||
#include "glparticles_system.h"
|
||||
|
||||
@@ -63,6 +64,7 @@ private:
|
||||
Light * cam_light;
|
||||
GLPrimitiveCube * box;
|
||||
Material m;
|
||||
SessionManager session;
|
||||
bool isChanged;
|
||||
|
||||
GLParticlesSystem partsys;
|
||||
|
||||
Reference in New Issue
Block a user