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

HW Accel #23

Open
Salvora opened this issue Jan 27, 2024 · 4 comments
Open

HW Accel #23

Salvora opened this issue Jan 27, 2024 · 4 comments
Labels
Longterm This might take awhile low priority

Comments

@Salvora
Copy link

Salvora commented Jan 27, 2024

Opening an issue here for this subject.
Looking at the code for the opengl, CR uses an outdated version of the Tao Framework opengl library. What do you guys think about using OpenTK instead?

https://github.com/opentk/opentk

@apiweb
Copy link
Contributor

apiweb commented Jan 27, 2024

I think this is a good idea, especially since Tao is kind of holding us back from jumping on the .NET Core train.
However, the process of conversion is not as straightforward.

Currently, OpenTK is at version 4.8.2, and it's designed to be compatible with .NET Core. The current version of ComicRack CE runs on .NET Framework 4.8, so a preliminary step would be to implement compatibility with version 3 of OpenTK (that is keeps compatibility with .Net framework). This transition alone might involve some adjustments in the existing codebase.

During my conversion attempts, I noticed that some methods and properties lack full parity between Tao and OpenTK. As I'm not an advanced in OpenGL programming, Sounds doable, but it’s a bit of a dance to understand what is happening.

If I'm not mistaken, there are 6 files currently utilizing Tao. If we can convert them to a more modern approach, such as using OpenTK, it could unlock significant possibilities for migrating the ComicRack codebase to .NET Core, but for now, I'm thinking this is won't be an easy process for now

@maforget
Copy link
Owner

I completely agree that we needed to update, but I have no experience with OpenGL also. I checked their website and wanted to do their Tutorial before doing any changes. I am also trying to understand all the number that affect the textures. The Memory usage is capped to either 256MB (Autotune) or 1024MB (when forcing with a command line switch). There are also a couple of other numbers that would need tweaking in TextureManagerSettings. I really wanted to read the documentation.

@duckpuppy
Copy link

duckpuppy commented Jan 28, 2024 via email

@maforget
Copy link
Owner

maforget commented Jan 28, 2024

I've started changing to the new library. I've just changed all the GL command to the corresponding one with the correct Enum, instead of just an int. Don't understand what it does and some of the actual code will need to be updated, because some command are deprecated. Still need to replace the Gdi and Wgl, but that might be for another day. Unless someone else wants to take care of it. Check this branch, if you have some update do a PR on that branch.

https://github.com/maforget/ComicRackCE/tree/OpenTK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Longterm This might take awhile low priority
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

4 participants