Skip to content
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

Runtime GL bugs and compiler issues #47

Open
KoboldSoftware opened this issue Apr 28, 2024 · 2 comments
Open

Runtime GL bugs and compiler issues #47

KoboldSoftware opened this issue Apr 28, 2024 · 2 comments

Comments

@KoboldSoftware
Copy link

KoboldSoftware commented Apr 28, 2024

  • When closing the program, OpenGLHelper.cpp calls GL functions after GL context has already been deleted. The class oglh needs to terminate earlier.

  • imGui calls glGetIntegerv(GL_CLIP_ORIGIN) which is not supported in OpenGL <= 3.3 and generates an error log each frame. Unfortunately GLEW just defines all GL versions and it is impossible to check OpenGL version at compile time.

  • m1Events::PreUpdate() Event::Type::DELETE_OBJ calls delete on an Object. This requires the destructor of the Object class to be public, otherwise the compiler will just ignore the line. On a 64bit system the code will crash because the Object pointer is retrieved from an integer variable. iTypeVar and its entire interface needs to be changed from int to intptr_t instead.

  • In many locations size_t is treated as an unsigned int. This leads to lots of warnings when compiling for x64. It also changes some bitshifting operations to 64 bits which may not be intended. See lodepng.cpp/ilog2i() for an example.

  • Compiled with Visual Studio Community 2022 v17.9.6

I decided to fork your project and started fixing the issues. Also updated some 3rd party components.
https://github.com/KoboldSoftware/Elit3D

@christt105
Copy link
Owner

Hi, thank you for the extensive explanation of several errors. I really appreciate you taking the time to create a fork and fix the problems. I haven't programmed in C++ for a while so it's a bit difficult for me to continue with the project with the quality I would like to. On the other hand I have started to recreate, in the little free time I have, Elit3D in another framework in which I feel more comfortable.

Thanks for the comment and the fork, I've learned!

@KoboldSoftware
Copy link
Author

Thank YOU for Elit3D.

I have fixed all of the issues so far. If I find any additional problems while working with Elit3D, I'll try to find a solution for those, too.

Wish you all the best!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants