Tue, 08 Apr 2014 10:54:32 +0300
- more debugging...
src/glCompiler.cc | file | annotate | diff | comparison | revisions | |
src/glRenderer.cc | file | annotate | diff | comparison | revisions | |
src/glShared.h | file | annotate | diff | comparison | revisions |
--- a/src/glCompiler.cc Sun Apr 06 01:40:04 2014 +0300 +++ b/src/glCompiler.cc Tue Apr 08 10:54:32 2014 +0300 @@ -68,6 +68,7 @@ static QList<short> g_warnedColors; static const QColor g_BFCFrontColor (40, 192, 40); static const QColor g_BFCBackColor (224, 40, 40); +static QMap<LDObject*, QString> g_objectOrigins; // ============================================================================= // @@ -248,11 +249,14 @@ for (auto it = m_objectInfo.begin(); it != m_objectInfo.end(); ++it) { if (it.key()->document() == getCurrentDocument()) + { + print ("merge %1\n", it.key()->id()); vbodata += it->data[vbonum]; + } } glBindBuffer (GL_ARRAY_BUFFER, m_vbo[vbonum]); - glBufferData (GL_ARRAY_BUFFER, vbodata.size() * sizeof(GLfloat), vbodata.constData(), GL_DYNAMIC_DRAW); + glBufferData (GL_ARRAY_BUFFER, vbodata.size() * sizeof(GLfloat), vbodata.constData(), GL_STATIC_DRAW); glBindBuffer (GL_ARRAY_BUFFER, 0); checkGLError(); m_vboChanged[vbonum] = false; @@ -276,13 +280,19 @@ // void GLCompiler::compileObject (LDObject* obj) { - print ("compiling #%1 (%2, %3)\n", obj->id(), obj->typeName(), obj->origin()); + if (obj->document()->isImplicit()) + return; + + g_objectOrigins[obj] = obj->document()->getDisplayName() + ":" + QString::number (obj->lineNumber()); + + if (obj->id() == 563) + print ("compile %1\n", g_objectOrigins[obj]); + ObjectVBOInfo info; dropObject (obj); compileSubObject (obj, obj, &info); m_objectInfo[obj] = info; needMerge(); - print ("#%1 compiled.\n", obj->id()); } // =============================================================================
--- a/src/glRenderer.cc Sun Apr 06 01:40:04 2014 +0300 +++ b/src/glRenderer.cc Tue Apr 08 10:54:32 2014 +0300 @@ -1249,6 +1249,7 @@ if (idx == 0xFFFFFF) continue; // White is background; skip + dprint ("id: %1\n", idx); LDObject* obj = LDObject::fromID (idx); assert (obj != null);
--- a/src/glShared.h Sun Apr 06 01:40:04 2014 +0300 +++ b/src/glShared.h Tue Apr 08 10:54:32 2014 +0300 @@ -57,12 +57,15 @@ // KDevelop doesn't seem to understand some VBO stuff #ifdef IN_IDE_PARSER +using GLint = int; +using GLsizei = int; using GLenum = unsigned int; using GLuint = unsigned int; void glBindBuffer (GLenum, GLuint); void glGenBuffers (GLuint, GLuint*); void glDeleteBuffers (GLuint, GLuint*); void glBufferData (GLuint, GLuint, void*, GLuint); +void glBufferSubData (GLenum, GLint, GLsizei, void*); #endif static const int g_numVBOs = VBOSF_NumSurfaces * VBOCM_NumComplements;