VBGL is a Visual Basic-based graphics library designed to interface with OpenGL for rendering 3D models and graphics. It provides an approach to handling OpenGL contexts, shaders, models, textures, and rendering pipelines in Visual Basic.
- TestGL.xlsm: Use this file to Test this Library
- Graph.png : Visual representation of the system architecture or data flow.
- Contribution: If you wish to contribute please look into the
Contribution.mdFile
- freeglut.dll / freeglut64.dll: Required runtime libraries for OpenGL rendering.
- Capsule, Cube, Teapot : Resource folders containing
.obj,.mtl, and Image files for 3D models used in demonstrations.
- Open TestGL.xlsm
- Open VBE
- GoTo Tools->References and Add "Microsoft Visual Basic for Applications Extensibility 5.3" (This is used to dinamically load the entire Code)
- Run Macro
Test
- Add Declarations to your Project
- Create Context via VBGLContext (Needs FilePath to FreeGlut/FreeGlut64)
- Create Window via VBGLWindow
- Define Callback Functions
- Create usable Data via VBGLModel
- Call Mainloop
To run or use VBGL, you will need: Microsoft Excel (or another Office application that supports VBA). Windows OS (because of FreeGLUT native binaries) The FreeGLUT DLLs (both 32-bit and/or 64-bit as needed) If using VBA’s extensibility features (std_VBProject.cls), ensure Microsoft Visual Basic for Applications Extensibility 5.3 reference is enabled.
- Open TestGL.xlsm in Excel.
- Open the VBA Editor (press ALT + F11).
- Go to Tools → References, and check Microsoft Visual Basic for Applications Extensibility 5.3.
- Run the macro named Test.
- You should see a window pop up, that asks you to select a Test.
- Select the test and press "t" to test it, press "ESC" to go back.
- Include the entire "Declarations" Folder into your Project
- Include the entire "Core" Folder into your Project
The start will always be the same: 0. Do whatever you need before using OpenGL
- Create an OpenGL Context
- Create a Window
- Create OpenGL objects you need
- Create the rest of things you need to do
- Set Callbacks for Freeglut
- Call mainloop
- Cleanup
In the Graphics Folder, there is the folder Examples There you can find importable examples with dependencies written on top of file as a comment
Contributions are welcome! If you would like to help, read the Contribution Document