Bug Report
What's the issue you encountered?
|
for (int i = 0; i < 16; i++) { |
→
3 *
4 !=
16
|
mv[i%4][i/4] = source[i]; |
→ OpenGL is column-major, leading to unintended transposition of the matrix
|
void glGetFloatv(GLenum pname, GLfloat *params) |
|
{ |
|
switch (pname) { |
|
case GL_CURRENT_RASTER_POSITION: |
|
floatcpy(params, glparamstate.raster_pos, 4); |
|
break; |
|
case GL_DEPTH_BIAS: |
|
*params = glparamstate.transfer_depth_bias; |
|
break; |
|
case GL_DEPTH_RANGE: |
|
params[0] = glparamstate.depth_near; |
|
params[1] = glparamstate.depth_far; |
|
break; |
|
case GL_DEPTH_SCALE: |
|
*params = glparamstate.transfer_depth_scale; |
|
break; |
|
case GL_MODELVIEW_MATRIX: |
|
for (int i = 0; i < 3; i++) |
|
for (int j = 0; j < 4; j++) |
|
params[j * 4 + i] = glparamstate.modelview_matrix[i][j]; |
|
params[3] = params[7] = params[11] = 0.0f; |
|
params[15] = 1.0f; |
|
return; |
|
case GL_PROJECTION_MATRIX: |
|
for (int i = 0; i < 4; i++) |
|
for (int j = 0; j < 4; j++) |
|
params[j * 4 + i] = glparamstate.projection_matrix[i][j]; |
|
return; |
|
default: |
|
return; |
|
}; |
|
} |
→ GL state not synced; the getter is unaware of the changes made by
glFrustum
I tried fixing the aforementioned issues, but sadly, that did not fix all of the matrix-related issues, so there must be something I missed (or misunderstood)…
How can the issue be reproduced?
N/A
Environment?
N/A
Additional context?
Hi there, I'm "porting" the Blender Game Engine to Wii and trying to use OpenGX, but I've encountered multiple issues with the matrix logic.
Also thanks to everyone involved for y'all's work on the project! 😁👍
Bug Report
What's the issue you encountered?
opengx/src/utils.h
Line 277 in 60afb21
3*4!=16opengx/src/utils.h
Line 290 in 60afb21
opengx/src/getters.c
Lines 128 to 159 in 60afb21
glFrustumI tried fixing the aforementioned issues, but sadly, that did not fix all of the matrix-related issues, so there must be something I missed (or misunderstood)…
How can the issue be reproduced?
N/A
Environment?
N/A
Additional context?
Hi there, I'm "porting" the Blender Game Engine to Wii and trying to use OpenGX, but I've encountered multiple issues with the matrix logic.
Also thanks to everyone involved for y'all's work on the project! 😁👍