OpenGL 4.6 declares for Windows

Not sure if this will be of any use to anyone, but I went through the painstaking process of defining most of the OpenGL 4.6 declares for Windows.

I’m providing this to the public domain, for anyone to use freely, privately or commercially… don’t even need to give any attributions.

This library is provided as-is, and unfortunately I will not be available to assist with any OpenGL troubleshooting related questions.

That being said, the library is complete enough to write your own advanced shaders. Here is an example of a shader I wrote and ran via the above library, to render a realistic looking water bottle…

I hope this library might be useful to those of you brave enough to dabble in OpenGL programming.

5 Likes

Hi @Alwyn_Bester,

Its great to hear from you and thanks for your hard work. This is great.

Unfortunately, when I went to download the Github project I have a virus warning:

Virus

Could I ask you to check the files on another computer?

Warm regards.

Hello Eugene,

It is great to hear from you too :slight_smile:

I’ve just downloaded with Firefox, Edge and Chrome… and scanned with McAfee and aren’t getting any virus warnings.

Which anti-virus are you using Eugene? I’m pretty sure it must be a false positive since the downloaded file does not hold any executable binaries, and only contains the source code with the declares to the OpenGL functions.

Also did a scan with Windows Defender… giving it the all clear?

image

I am not sure what to say. I attempted to download the zipped file on two different computers, both with edge and chrome browsers, and both automatically deleted the file because of a virus. Both computers used Windows Defender. Weird.

You are correct, as they are just text files. It must be the zipped file is triggering an issue.

Thanks for checking.

I had a quick look on Microsoft’s site about this Wacatac.H!ml virus… reading through their description I suspect your computer/network might have been previously infected from a different source, now causing the download issue.

https://answers.microsoft.com/en-us/windows/forum/all/windows-defender-trojanscriptwacatachml-keeps/93ef0ec1-3170-48d6-86af-5373ff6c3cd1

Might be worthwhile to get a malware remover to remove the virus as per their suggestion?

1 Like

I didn’t want to be that guy but the debug executable got uploaded to github, and git holds on to everything forever. So even if a commit removes the DebugOpenGL folder, the string of bytes that’s triggering the false positive could be still stored inside the .git folder that makes things operate.

The repo zip did pass Virustotal, but it’s not unheard of for Xojo builds to trigger false positives.

It may be of benefit to delete this repository, create a new one, and use the Xojo template that has some basic ignore settings:

(sorry this was meant to be a reply to the thread, not you directly)

My bad… I see now the debug folder got added by mistake :sweat_smile:

Let me quickly delete and re-create the repository. Sorry about that.

Thank you for pointing this out Tim… much appreciated.

Ok, repository was deleted, re-created without the debug folder, and future proofed with a .gitignore file :+1:

@Eugene_Dakin, the download should now pass the anti-virus check.

@Tim_Parnell FYI ^

That downloads and unzips perfectly now! Thank you, there are no issues and is safe to download. :slight_smile:

1 Like

You’re welcome Eugene… good to know that it now downloads successfully :slight_smile:

Thanks for sharing the project, Alwyn! Hopefully the gitignore template helps you with your future projects too :slight_smile:

1 Like

I wish I had time to evaluate it as an option… :thinking:

Here is a more exciting project that uses the OpenGL 4.6 declares, where I took my first jab at loading glTF objects, and rendering them using physical based rendering (PBR) shaders.

The project is far from complete, but should provide a good example on how to get started with OpenGL Shader programming.

Viewport.zip

After loading and running the project in Xojo… open the WaterBottle.glb model in the root folder of the zip file.

1 Like

Just something to keep in mind when trying to run the project. There is a FreeImage.dll file in the project’s /bin folder. You need to copy the FreeImage.dll either next to the compiled application’s .exe file, or to the Windows/System32 folder. I usually copy it to the Windows/System32 folder then the file can be used by any application from any folder.

On Windows you can tell the OS to look for DLLs in a specific folder. This folder will be searched first:

Declare Function SetDllDirectoryW Lib "Kernel32" (PathName As WString) As Boolean
Call SetDllDirectoryW("C:\Example\")
4 Likes