Skip to content

00001H/GLpygame

Repository files navigation

GLpygame

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).

Installing this library

  • 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 the demorsrc folders can be omitted.

Compiling your program

NOTE! YOU NEED TO CREATE A WINDOW AND SET IT AS OPENGL CONTEXT BEFORE INITIALIZING GSDL!

  • 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 with glad.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.

Contributing

  • 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!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published