CZDanol / AnotherCraft

A Minecraft clone demo (master thesis)
Apache License 2.0
244 stars 15 forks source link

Wrong extension checking #5

Open BoyBaykiller opened 2 years ago

BoyBaykiller commented 2 years ago

I was trying to run the precompiled binary contained in bin_x86_64_windows. Output: image

I don't exactly know how hasARBTextureFilterAnisotropic is set here: https://github.com/CZDanol/AnotherCraft/blob/daa527a63a3bebae226b3063e418b85d634311ee/ac/client/application.d#L107 I do know though that my GPU not only supports OpenGL 4.6 (where anisotropic filtering is core) it also has GL_ARB_texture_filter_anisotropic and GL_EXT_texture_filter_anisotropic.

This project is quite old so if you're not willing to work on it anymore I understand that. If you do, here is what I would suggest:

According to the OpenGL Wiki the correct way to check for a core extensions is to both check for the version which is 4.6 and the presence of the extension which would be GL_ARB_texture_filter_anisotropic. Since GL_EXT_texture_filter_anisotropic is considered to be a ubiquitous extension it would make sense to also check for that - and then use the corresponding functionality provided by that extension.

CZDanol commented 2 years ago

Hello, yes, sorry, this project is no longer maintained. However you can check this out if you're interested: https://github.com/AnotherCraft/ac-releases/releases

BoyBaykiller commented 2 years ago

Alright cool. The release you provided works!

CZDanol commented 2 years ago

I'm keeping this open in case someone fixes it in the code or something :)