Pygame+OpenGL=COOL THING
GLpygame is a graphics library. It uses OpenGL and provides an interface similar to pygame
's(but in C++), and also supports 3D.
It aims to provide a library to easily make graphic applications(such as computer games, CAD, etc.) without worrying about the template code, bytes and the OpenGL API.
I initially made this to provide a library for making computer games with greater flexibility than Unity(because I have access to more low-level APIs, I can do fancy stuff with ease).
- Download the zip and put all files in a folder and name it whatever you like.
- Include
pygame.hpp
. That's all you need. - The
2ddemo.cpp
3ddemo.cpp
, corresponding EXE files, and thedemorsrc
folders can be omitted.
-
you need to install GLAD (with OpenGL 4.6+ Core Profile) and add glad.h to the include path, in the u8"glad"sv folder.(i.e.
#include<glad/glad.h>
must succeed). You need to compile your application withglad.c
(also generated by the website). You also need to have GLFW ready. install GLFW and make sure#include<GLFW/glfw3.h>
succeeds.Remember to link-lglfw3 -lgdi32
! -
Get GLM and put it under folder u8"glm"sv.(
#include<glm/glm.hpp>
) -
Download FreeType. link with
-lfreetype
. Make sure#include<ft2build.h>
then#include FT_FREETYPE_H
works. -
Look at the demo to see how to use the libraries.
-
While uncommented(because I am too lazy to leave comments), the source code is relatively clear and can be inspected if unsure about an API.
- Just contribute. See above for how to install/compile your own code.
- I know that hurts, but you cannot write tests.(Because we(read: I) test it ourselves(read: myself))
- That's it!