-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple issues in GL↔GU matrix handling #87
Comments
Hi Julia, thanks for your report, and it's great to see that you are working on such an interesting project like Blender Game Engine. But does it work with OpenGL 1.x? Answering to your points:
Ouch, this is 100% wrong! I guess the only reason why this doesn't cause any visible defect is that the matrix after the current one is anyway always unset, so we get a real memory corruption only if the matrix stack is full. I'll fix this.
Yes, but are you sure that this is wrong? GX is row-major, so the conversion seems correct to me.
Mmm... I don't really see a synchronisation issue here: glFrustum is implemented by means of glMultMatrixf, which write to Do you happen to have a snippet of code that can be used to reproduce the problems you see? That would be useful. |
GX matrices are 3x4, and the old code was overflowing: wee need to skip the fourth row of the matrix. Fixes one issue from devkitPro#87
Oh, I verified now, rebuilding the crack-attack game against the latest opengx, that glFrustum is broken indeed. |
I have a slightly different fix in my set of fixes that I wanted to PR: https://github.com/I-asked/opengx/tree/fixing |
Oh, nice, there's some good stuff in there! The matrix changes seem equivalent to mine, for the rest, if/when you prepare a PR, please split the changes into smaller commits, according to the issues they fix. But those additions of calls to sync the state seem odd, they shouldn't be needed. If they are fixing some issue, it probably means that we have a bug in how we compute the "dirty" flags, and I'd prefer to fix that, instead of adding all those calls :-)
That's amazing! Looking forward to it! |
I will try, definitely! My last commit actually fixes all the bugs I encountered working on downBGE until now.
I'll investigate at some point, but for now, they work for me… 🤪
Thank you so much for the kind words! 😊 BTW, I'm actually planning to use opengx in two engines, the other being a fork of Godot 1 that I'm working on with my friend: https://github.com/TheFusionEngine/FusionEngine |
Please base your work on top of #90, since it touches some areas that you might be touching too (the dirty flags, especially!).
I see dreamcast, vita, so I'm sure it will work nicely for the Wii too :-) |
GX matrices are 3x4, and the old code was overflowing: wee need to skip the fourth row of the matrix. Fixes one issue from #87
Bug Report
What's the issue you encountered?
opengx/src/utils.h
Line 277 in 60afb21
3
*4
!=16
opengx/src/utils.h
Line 290 in 60afb21
opengx/src/getters.c
Lines 128 to 159 in 60afb21
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! 😁👍
The text was updated successfully, but these errors were encountered: