diff options
Diffstat (limited to 'sci-mathematics/mathmod/files')
| -rw-r--r-- | sci-mathematics/mathmod/files/mathmod-12.1-fix_render.patch | 166 | ||||
| -rw-r--r-- | sci-mathematics/mathmod/files/mathmod-12.1-type_mismatch.patch | 29 |
2 files changed, 0 insertions, 195 deletions
diff --git a/sci-mathematics/mathmod/files/mathmod-12.1-fix_render.patch b/sci-mathematics/mathmod/files/mathmod-12.1-fix_render.patch deleted file mode 100644 index aa008177e1c4..000000000000 --- a/sci-mathematics/mathmod/files/mathmod-12.1-fix_render.patch +++ /dev/null @@ -1,166 +0,0 @@ -From upstream. Fix render with >qt-6.6 -https://github.com/parisolab/mathmod/issues/280 -From f5d35f45acc6aa042c486ca60eaa5461c1e56b13 Mon Sep 17 00:00:00 2001 -From: Abderrahman Taha <taha_ab@yahoo.fr> -Date: Mon, 23 Jun 2025 23:35:29 -0400 -Subject: [PATCH] #280 QT6: render - ---- - ui_modules/mathmod.cpp | 78 +++++++++++++++++++++++++++++++++++------- - 1 file changed, 65 insertions(+), 13 deletions(-) - -diff --git a/ui_modules/mathmod.cpp b/ui_modules/mathmod.cpp -index 9dac14f..f40cb56 100644 ---- a/ui_modules/mathmod.cpp -+++ b/ui_modules/mathmod.cpp -@@ -20,6 +20,44 @@ - #include "mathmod.h" - - -+#ifndef GLERROR_H -+#define GLERROR_H -+ -+void _check_gl_error(const char *file, int line); -+ -+/// -+/// Usage -+/// [... some opengl calls] -+/// glCheckError(); -+/// -+#define check_gl_error() _check_gl_error(__FILE__,__LINE__) -+ -+#endif // GLERROR_H -+ -+using namespace std; -+ -+void _check_gl_error(const char *file, int line) { -+ GLenum err (glGetError()); -+ -+ while(err!=GL_NO_ERROR) { -+ string error; -+ -+ switch(err) { -+ case GL_INVALID_OPERATION: error="INVALID_OPERATION"; break; -+ case GL_INVALID_ENUM: error="INVALID_ENUM"; break; -+ case GL_INVALID_VALUE: error="INVALID_VALUE"; break; -+ case GL_OUT_OF_MEMORY: error="OUT_OF_MEMORY"; break; -+ case GL_INVALID_FRAMEBUFFER_OPERATION: error="INVALID_FRAMEBUFFER_OPERATION"; break; -+ default: error="UNKNOWN_ERROR"; break; -+ } -+ -+ cerr << "GL_" << error.c_str() <<" - "<<file<<":"<<line<<endl; -+ err=glGetError(); -+ } -+} -+ -+ -+ - void MathMod::CalculateTexturePoints(int type) - { - double tmp, val[6]={0,0,0,0,0,0}; -@@ -1239,7 +1277,6 @@ void MathMod::CreateShaderProgram() - msgBox.adjustSize(); - msgBox.exec(); - } -- - glAttachShader(shaderprogramId, vertexshader); - glAttachShader(shaderprogramId, fragmentshader); - glBindAttribLocation(shaderprogramId, 0, "in_Position"); -@@ -1452,6 +1489,16 @@ void MathMod::Winitialize_GL() - PutObjectInsideCube(); - PutObjectInsideCubeOk=true; - } -+ // check OpenGL error -+ GLenum myGLEnum; -+ while ((myGLEnum = glGetError()) != GL_NO_ERROR) { -+ qDebug("Error_10 : "); -+ /*QMessageBox msgBox; -+ qDebug("Error_10: "); -+ msgBox.setText("Error_10 : " + QString::number(myGLEnum)); -+ msgBox.adjustSize(); -+ msgBox.exec();*/ -+ } - } - - void MathMod::UpdateGL() -@@ -1604,11 +1651,11 @@ void MathMod::CopyData(ObjectProperties *scene) - glGenBuffers(2, vbo); - /* Bind our first VBO as being the active buffer and storing vertex attributes (coordinates) */ - glBindBuffer(GL_ARRAY_BUFFER, vbo[0]); -- glBufferData(GL_ARRAY_BUFFER, sizeof(float)*10*(scene->VertxNumber+(12+60+36)),scene->ArrayNorVer_localPt, GL_STATIC_DRAW); -- glBindBuffer(GL_ARRAY_BUFFER, vbo[0]); -+ glBufferData(GL_ARRAY_BUFFER, sizeof(GL_FLOAT)*10*(scene->VertxNumber+(12+60+36)),scene->ArrayNorVer_localPt, GL_STATIC_DRAW); -+ //glBindBuffer(GL_ARRAY_BUFFER, vbo[0]); - /* Bind our first VBO as being the active buffer and storing vertex attributes (coordinates) */ - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, vbo[1]); -- glBufferData(GL_ELEMENT_ARRAY_BUFFER,sizeof(uint)*(scene->PolyNumber + scene->NbPolygnNbVertexPtMinSize), scene->PolyIndices_localPt, GL_STATIC_DRAW); -+ glBufferData(GL_ELEMENT_ARRAY_BUFFER,sizeof(GLuint)*(scene->PolyNumber + scene->NbPolygnNbVertexPtMinSize), scene->PolyIndices_localPt, GL_STATIC_DRAW); - size_t cOffset = 0; - size_t nOffset = cOffset + 4*sizeof( GL_FLOAT); - size_t vOffset = nOffset + 3*sizeof (GL_FLOAT); -@@ -1618,31 +1665,35 @@ void MathMod::CopyData(ObjectProperties *scene) - glEnableVertexAttribArray(attribVertexPosition); - // set attrib arrays using glVertexAttribPointer() - glVertexAttribPointer(attribVertexPosition, 3, GL_FLOAT, false, 10*sizeof( GL_FLOAT), (void*)vOffset); -- glVertexAttribPointer(attribVertexNormal, 3, GL_FLOAT, false, 10*sizeof( GL_FLOAT), (void*)nOffset); - glVertexAttribPointer(attribVertexColor,4, GL_FLOAT, false, 10*sizeof( GL_FLOAT), (void*)cOffset); -+ glVertexAttribPointer(attribVertexNormal, 3, GL_FLOAT, false, 10*sizeof( GL_FLOAT), (void*)nOffset); - previousVertxNumber = scene->VertxNumber; - previousPolyNumberNbPolygnNbVertexPtMin = (scene->PolyNumber + scene->NbPolygnNbVertexPtMinSize); - firstaction++; - } -- else{ -- if(scene->VertxNumber>previousVertxNumber) -+ else -+ { -+ glBindBuffer(GL_ARRAY_BUFFER, vbo[0]); -+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, vbo[1]); -+ if(scene->VertxNumber>previousVertxNumber>0) - { -- glBufferData(GL_ARRAY_BUFFER, sizeof(float)*10*(scene->VertxNumber+(12+60+36)), scene->ArrayNorVer_localPt, GL_STATIC_DRAW); -+ glBufferData(GL_ARRAY_BUFFER, sizeof(GL_FLOAT)*10*(scene->VertxNumber+(12+60+36)), scene->ArrayNorVer_localPt, GL_STATIC_DRAW); - previousVertxNumber = scene->VertxNumber; - } - else - { -- glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(float)*10*(scene->VertxNumber+(12+60+36)), scene->ArrayNorVer_localPt); -+ glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(GL_FLOAT)*10*(scene->VertxNumber+(12+60+36)), (void *)scene->ArrayNorVer_localPt); - previousVertxNumber = scene->VertxNumber; - } -+ - if((scene->PolyNumber + scene->NbPolygnNbVertexPtMinSize)>previousPolyNumberNbPolygnNbVertexPtMin) - { -- glBufferData(GL_ELEMENT_ARRAY_BUFFER,sizeof(uint)*(scene->PolyNumber + scene->NbPolygnNbVertexPtMinSize), scene->PolyIndices_localPt, GL_STATIC_DRAW); -- previousPolyNumberNbPolygnNbVertexPtMin = (scene->PolyNumber + scene->NbPolygnNbVertexPtMinSize); -+ glBufferData(GL_ELEMENT_ARRAY_BUFFER,sizeof(GLuint)*(scene->PolyNumber + scene->NbPolygnNbVertexPtMinSize), scene->PolyIndices_localPt, GL_STATIC_DRAW); -+ previousPolyNumberNbPolygnNbVertexPtMin = (scene->PolyNumber + scene->NbPolygnNbVertexPtMinSize); - } - else - { -- glBufferSubData(GL_ELEMENT_ARRAY_BUFFER,0, sizeof(uint)*(scene->PolyNumber + scene->NbPolygnNbVertexPtMinSize), scene->PolyIndices_localPt); -+ glBufferSubData(GL_ELEMENT_ARRAY_BUFFER,0, sizeof(GLuint)*(scene->PolyNumber + scene->NbPolygnNbVertexPtMinSize), scene->PolyIndices_localPt); - previousPolyNumberNbPolygnNbVertexPtMin = (scene->PolyNumber + scene->NbPolygnNbVertexPtMinSize); - } - } -@@ -1652,11 +1703,13 @@ void MathMod::draw(ObjectProperties *scene) - { - if(!PutObjectInsideCubeOk) - return; -+ - if (scene->componentsinfos.Interleave) - { - CopyData(scene); - scene->componentsinfos.Interleave = false; - } -+ glUseProgram(shaderprogramId); - // clear buffer - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - // set modelview matrix -@@ -1737,7 +1790,6 @@ void MathMod::draw(ObjectProperties *scene) - for (uint i = 0; i < scene->componentsinfos.NbComponentsType.size(); i++) - if (scene->componentsinfos.ThereisCND[i]) - DrawParisoCND(scene, i); -- - // Draw Normales: - if (scene->norm == 1 && scene->componentsinfos.updateviewer) - DrawNormals(scene); diff --git a/sci-mathematics/mathmod/files/mathmod-12.1-type_mismatch.patch b/sci-mathematics/mathmod/files/mathmod-12.1-type_mismatch.patch deleted file mode 100644 index d4b8944b7f68..000000000000 --- a/sci-mathematics/mathmod/files/mathmod-12.1-type_mismatch.patch +++ /dev/null @@ -1,29 +0,0 @@ -From upstream, fix lto-type-mismatch -https://github.com/parisolab/mathmod/issues/279 -From dac6f48effe334062f91f236906211e922178f50 Mon Sep 17 00:00:00 2001 -From: Abderrahman Taha <taha_ab@yahoo.fr> -Date: Thu, 19 Jun 2025 12:27:03 -0400 -Subject: [PATCH] =?UTF-8?q?#279=20ui=5Fmodules/comvar.h:21:12:=20warning:?= - =?UTF-8?q?=20type=20of=20=E2=80=98CalculFactor=E2=80=99=20does=20not=20ma?= - =?UTF-8?q?tch=20original=20declaration=20[-Wlto-type-mismatch]?= -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - ---- - ui_modules/parametersoptions.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ui_modules/parametersoptions.cpp b/ui_modules/parametersoptions.cpp -index a2d4b125..298109eb 100644 ---- a/ui_modules/parametersoptions.cpp -+++ b/ui_modules/parametersoptions.cpp -@@ -24,7 +24,7 @@ - #include <sstream> - #include <string> - int Threads[3]={8,1,64}; --int CalculFactor[6]={4,4,4,8,8}; -+int CalculFactor[5]={4,4,4,8,8}; - int InitParGrid=50; - int InitIsoGrid=40; - static bool MACOS = false; |
