Skip to content

Commit 5dbf052

Browse files
committed
Fix bugs in Model, GLFrustum, and rendering; improve algorithmic performance
1 parent e4e70e7 commit 5dbf052

7 files changed

Lines changed: 236 additions & 169 deletions

File tree

src/Config.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
set(PROJECT_VERSION "1.1.2")
1+
set(PROJECT_VERSION "1.1.3")
22
set(PROJECT_YEAR "2026")
33
set(PROJECT_RELEASE_DATE "2026-02-08")
44
set(PROJECT_PACKAGE_NAME "range-fea")

src/fea/doc/RELEASE_NOTES.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
------------------------------------------------------------------
2+
Version 1.1.3
3+
4+
- Performance improvements in mesh repair functions
5+
6+
Bug fixes:
7+
8+
- Element entities are not painted in 3D area
9+
- Bug in edge element detection
10+
111
------------------------------------------------------------------
212
Version 1.1.2
313

src/fea/src/gl_entity_list.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
GLEntityList::GLEntityList()
44
: GLList(GL_ENTITY_LIST_ITEM_N_LISTS)
5-
, useVBO(true) // Enable VBO by default for better performance
5+
, useVBO(false) // VBO disabled: VAO + legacy client-state mixing is incompatible
66
{
77
this->_init();
88
}
99

1010
GLEntityList::GLEntityList(const GLEntityList &glEntityList)
1111
: GLList(glEntityList)
12-
, useVBO(true)
12+
, useVBO(false)
1313
{
1414
this->_init(&glEntityList);
1515
}

src/fea/src/gl_frustum.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,18 @@ void GLFrustum::extractFromGL()
3030
glGetDoublev(GL_MODELVIEW_MATRIX, modelview);
3131
glGetDoublev(GL_PROJECTION_MATRIX, projection);
3232

33-
// Multiply projection * modelview to get combined matrix
33+
// Multiply projection * modelview to get combined matrix.
34+
// OpenGL matrices are column-major: element at (row r, col c) is stored at index c*4+r.
35+
// For C = A * B: C[i*4+j] = sum_k A[k*4+j] * B[i*4+k]
36+
// where i=col, j=row. Here A=projection, B=modelview.
3437
for (int i = 0; i < 4; i++)
3538
{
3639
for (int j = 0; j < 4; j++)
3740
{
3841
mvp[i * 4 + j] = 0.0;
3942
for (int k = 0; k < 4; k++)
4043
{
41-
mvp[i * 4 + j] += projection[i * 4 + k] * modelview[k * 4 + j];
44+
mvp[i * 4 + j] += projection[k * 4 + j] * modelview[i * 4 + k];
4245
}
4346
}
4447
}

0 commit comments

Comments
 (0)