summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Korpipää <tomi.korpipaa@digia.com>2013-03-15 13:28:51 +0200
committerTomi Korpipää <tomi.korpipaa@digia.com>2013-03-15 13:28:51 +0200
commit390973a1deac8e2b38dae265b19d5ee8fe7f6546 (patch)
tree1f19a0b6b901b80941078efcd0587da5aa1255ca
parent8c7c70658770a311612f0025511b099973f61ad1 (diff)
Desktop OpenGL crash(es) fixed
.gitignore added
-rw-r--r--.gitignore244
-rw-r--r--src/datavis3d/engine/q3dbars.cpp33
2 files changed, 260 insertions, 17 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..6eacc9e0
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,244 @@
+# This file is used to ignore files which are generated in the Qt build system
+# ----------------------------------------------------------------------------
+
+!examples/*/*/*[.]*
+!examples/*/*/README
+examples/*/*/*[.]app
+!examples/declarative/*
+!examples/tutorials/*
+!examples/tutorials/*/*
+!examples/ja_JP/*/*
+!demos/spectrum/*
+demos/spectrum/bin
+!demos/*/*[.]*
+demos/*/*[.]app
+!demos/declarative/*
+config.tests/*/*/*
+!config.tests/*/*/*[.]*
+config.tests/*/*/*[.]app
+
+callgrind.out.*
+pcviewer.cfg
+*~
+*.a
+*.la
+*.core
+*.moc
+*.o
+*.orig
+*.swp
+*.rej
+*.so
+*.pbxuser
+*.mode1
+*.mode1v3
+*_pch.h.cpp
+*_resource.rc
+.#*
+*.*#
+core
+.qmake.cache
+.qmake.vars
+*.prl
+tags
+.DS_Store
+*.debug
+Makefile*
+!qmake/Makefile.win32*
+!qmake/Makefile.unix
+*.prl
+*.app
+*.pro.user*
+*.qmlproject.user*
+*.gcov
+bin/Qt*.dll
+bin/assistant*
+bin/designer*
+bin/dumpcpp*
+bin/idc*
+bin/linguist*
+bin/lrelease*
+bin/lupdate*
+bin/lconvert*
+bin/moc*
+bin/makeqpf*
+bin/pixeltool*
+bin/qmake*
+bin/qdoc3*
+bin/qt3to4*
+bin/qtdemo*
+bin/qttracereplay*
+bin/rcc*
+bin/uic*
+bin/patternist*
+bin/phonon*
+bin/qcollectiongenerator*
+bin/qdbus*
+bin/qhelpconverter*
+bin/qhelpgenerator*
+bin/qtconfig*
+bin/xmlpatterns*
+bin/cetest*
+bin/collectiongenerator
+bin/helpconverter
+bin/helpgenerator
+bin/kmap2qmap*
+bin/qlalr*
+bin/qmlconv*
+bin/qmldebugger*
+bin/qml*
+bin/qttracereplay*
+configure.cache
+config.status
+mkspecs/default
+mkspecs/qconfig.pri
+moc_*.cpp
+qmake/qmake.exe
+qmake/Makefile.bak
+src/corelib/global/qconfig.cpp
+src/corelib/global/qconfig.h
+src/corelib/global/qconfig.h.qmake
+src/tools/uic/qclass_lib_map.h
+ui_*.h
+tests/auto/qprocess/test*/*.exe
+tests/auto/qtcpsocket/stressTest/*.exe
+tests/auto/qprocess/fileWriterProcess/*.exe
+tests/auto/qmake/testdata/quotedfilenames/*.exe
+tests/auto/compilerwarnings/*.exe
+tests/auto/qmake/testdata/quotedfilenames/test.cpp
+tests/auto/qprocess/fileWriterProcess.txt
+.com.apple.timemachine.supported
+tests/auto/qlibrary/libmylib.so*
+tests/auto/qresourceengine/runtime_resource.rcc
+tools/qtestlib/chart/chart*
+tools/qtestlib/updater/updater*
+tools/activeqt/testcon/testcon.tlb
+translations/*.qm
+translations/*_untranslated.ts
+qrc_*.cpp
+
+# Test generated files
+QObject.log
+tst_*
+!tst_*.*
+tst_*.log
+tst_*.debug
+tst_*~
+
+# xemacs temporary files
+*.flc
+
+# Vim temporary files
+.*.swp
+
+# Visual Studio generated files
+*.ib_pdb_index
+*.idb
+*.ilk
+*.pdb
+*.sln
+*.suo
+*.vcproj
+*vcproj.*.*.user
+*.ncb
+*.vcxproj
+*.vcxproj.filters
+*.vcxproj.user
+
+# MinGW generated files
+*.Debug
+*.Release
+
+# WebKit temp files
+src/3rdparty/webkit/WebCore/mocinclude.tmp
+src/3rdparty/webkit/includes.txt
+src/3rdparty/webkit/includes2.txt
+
+# Symlinks generated by configure
+tools/qvfb/qvfbhdr.h
+tools/qvfb/qlock_p.h
+tools/qvfb/qlock.cpp
+tools/qvfb/qwssignalhandler.cpp
+tools/qvfb/qwssignalhandler_p.h
+.DS_Store
+.pch
+.rcc
+*.app
+config.status
+config.tests/unix/cups/cups
+config.tests/unix/getaddrinfo/getaddrinfo
+config.tests/unix/getifaddrs/getifaddrs
+config.tests/unix/iconv/iconv
+config.tests/unix/ipv6/ipv6
+config.tests/unix/ipv6ifname/ipv6ifname
+config.tests/unix/largefile/largefile
+config.tests/unix/nis/nis
+config.tests/unix/odbc/odbc
+config.tests/unix/openssl/openssl
+config.tests/unix/stl/stl
+config.tests/unix/zlib/zlib
+config.tests/unix/3dnow/3dnow
+config.tests/unix/mmx/mmx
+config.tests/unix/sse/sse
+config.tests/unix/sse2/sse2
+
+
+
+# Directories to ignore
+# ---------------------
+
+debug
+examples/tools/plugandpaint/plugins
+include/*
+include/*/*
+lib/*
+!lib/fonts
+!lib/README
+release
+tmp
+doc-build
+doc/html/*
+tools/qdoc3/doc/html/*
+doc/qch
+doc-build
+.rcc
+.pch
+.metadata
+build/*
+bin/*
+coverage/*
+
+# runonphone crash dumps
+d_exc_*.txt
+d_exc_*.stk
+
+# Generated by abldfast.bat from devtools.
+.abldsteps.*
+
+# Carbide project files
+# ---------------------
+.project
+.cproject
+.make.cache
+*.d
+
+# OSX build files
+*.xcodeproj
+Info.plist
+
+qtc-debugging-helper
+qtc-qmldump
+qtc-qmldbg
+
+.pc/
+
+# INTEGRITY generated files
+*.gpj
+*.int
+*.ael
+*.dla
+*.dnm
+*.dep
+*.map
+work
+
diff --git a/src/datavis3d/engine/q3dbars.cpp b/src/datavis3d/engine/q3dbars.cpp
index 89f49dea..47321272 100644
--- a/src/datavis3d/engine/q3dbars.cpp
+++ b/src/datavis3d/engine/q3dbars.cpp
@@ -238,6 +238,7 @@ void Q3DBars::render()
#ifdef USE_HAX0R_SELECTION
// 1st attribute buffer : vertices
+ glEnableVertexAttribArray(d_ptr->m_positionAttrSelection);
glBindBuffer(GL_ARRAY_BUFFER, d_ptr->m_vertexbuffer);
glVertexAttribPointer(d_ptr->m_positionAttrSelection
, 3, GL_FLOAT, GL_FALSE, 0, (void*)0);
@@ -245,18 +246,16 @@ void Q3DBars::render()
// Index buffer
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, d_ptr->m_elementbuffer);
- glEnableVertexAttribArray(0);
-
// Draw the triangles
glDrawElements(GL_TRIANGLES, d_ptr->m_indexCount, GL_UNSIGNED_SHORT, (void*)0);
- glDisableVertexAttribArray(0);
+ glDisableVertexAttribArray(d_ptr->m_positionAttrSelection);
#else // TODO: fix this - doesn't work yet
glBindFramebuffer(GL_FRAMEBUFFER, d_ptr->m_framebufferSelection);
//glReadBuffer(GL_COLOR_ATTACHMENT0);
// 1st attribute buffer : vertices
- glEnableVertexAttribArray(0);
+ glEnableVertexAttribArray(d_ptr->m_positionAttrSelection);
glBindBuffer(GL_ARRAY_BUFFER, d_ptr->m_vertexbuffer);
glVertexAttribPointer(d_ptr->m_positionAttrSelection
, 3, GL_FLOAT, GL_FALSE, 0, (void*)0);
@@ -268,7 +267,7 @@ void Q3DBars::render()
GLenum DrawBuffers[1] = {GL_COLOR_ATTACHMENT0};
glDrawElements(GL_TRIANGLES, d_ptr->m_indexCount, GL_UNSIGNED_SHORT, DrawBuffers);
- glDisableVertexAttribArray(0);
+ glDisableVertexAttribArray(d_ptr->m_positionAttrSelection);
//glReadBuffer(GL_NONE);
glBindFramebuffer(GL_FRAMEBUFFER, 0);
@@ -350,17 +349,17 @@ void Q3DBars::render()
, 4.0f);
// 1st attribute buffer : vertices
- glEnableVertexAttribArray(0);
+ glEnableVertexAttribArray(d_ptr->m_positionAttrBackground);
glBindBuffer(GL_ARRAY_BUFFER, d_ptr->m_vertexbufferBackground);
glVertexAttribPointer(d_ptr->m_positionAttrBackground, 3, GL_FLOAT, GL_FALSE, 0, (void*)0);
// 2nd attribute buffer : normals
- glEnableVertexAttribArray(1); // this causes trouble with desktop opengl, but ANGLE requires it
+ glEnableVertexAttribArray(d_ptr->m_normalAttrBackground);
glBindBuffer(GL_ARRAY_BUFFER, d_ptr->m_normalbufferBackground);
glVertexAttribPointer(d_ptr->m_normalAttrBackground, 3, GL_FLOAT, GL_FALSE, 0, (void*)0);
// 3rd attribute buffer : UVs
- //glEnableVertexAttribArray(2);
+ //glEnableVertexAttribArray(d_ptr->m_uvAttrBackground);
//glBindBuffer(GL_ARRAY_BUFFER, d_ptr->m_uvbufferBackground);
//glVertexAttribPointer(d_ptr->m_uvAttrBackground, 2, GL_FLOAT, GL_FALSE, 0, (void*)0);
@@ -370,9 +369,9 @@ void Q3DBars::render()
// Draw the triangles
glDrawElements(GL_TRIANGLES, d_ptr->m_indexCountBackground, GL_UNSIGNED_SHORT, (void*)0);
- //glDisableVertexAttribArray(2);
- glDisableVertexAttribArray(1); // this causes trouble with desktop opengl, but ANGLE requires it
- glDisableVertexAttribArray(0);
+ //glDisableVertexAttribArray(d_ptr->m_uvAttrBackground);
+ glDisableVertexAttribArray(d_ptr->m_normalAttrBackground);
+ glDisableVertexAttribArray(d_ptr->m_positionAttrBackground);
}
// Release background shader
@@ -469,17 +468,17 @@ void Q3DBars::render()
//qDebug() << "height:" << barHeight;
// 1st attribute buffer : vertices
- glEnableVertexAttribArray(0);
+ glEnableVertexAttribArray(d_ptr->m_positionAttr);
glBindBuffer(GL_ARRAY_BUFFER, d_ptr->m_vertexbuffer);
glVertexAttribPointer(d_ptr->m_positionAttr, 3, GL_FLOAT, GL_FALSE, 0, (void*)0);
// 2nd attribute buffer : normals
- glEnableVertexAttribArray(1); // this causes trouble with desktop opengl, but ANGLE requires it
+ glEnableVertexAttribArray(d_ptr->m_normalAttr);
glBindBuffer(GL_ARRAY_BUFFER, d_ptr->m_normalbuffer);
glVertexAttribPointer(d_ptr->m_normalAttr, 3, GL_FLOAT, GL_FALSE, 0, (void*)0);
// 3rd attribute buffer : UVs
- //glEnableVertexAttribArray(2);
+ //glEnableVertexAttribArray(d_ptr->m_uvAttr);
//glBindBuffer(GL_ARRAY_BUFFER, d_ptr->m_uvbuffer);
//glVertexAttribPointer(d_ptr->m_uvAttr, 2, GL_FLOAT, GL_FALSE, 0, (void*)0);
@@ -489,9 +488,9 @@ void Q3DBars::render()
// Draw the triangles
glDrawElements(GL_TRIANGLES, d_ptr->m_indexCount, GL_UNSIGNED_SHORT, (void*)0);
- //glDisableVertexAttribArray(2);
- glDisableVertexAttribArray(1); // this causes trouble with desktop opengl, but ANGLE requires it
- glDisableVertexAttribArray(0);
+ //glDisableVertexAttribArray(d_ptr->m_uvAttr);
+ glDisableVertexAttribArray(d_ptr->m_normalAttr);
+ glDisableVertexAttribArray(d_ptr->m_positionAttr);
}
}