Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A awesome-python
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 13
    • Issues 13
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 317
    • Merge requests 317
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Vinta Chen
  • awesome-python
  • Merge requests
  • !2111

Add moderngl

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Administrator requested to merge github/fork/JamesC01/patch-1 into master Jul 14, 2022
  • Overview 0
  • Commits 1
  • Pipelines 1
  • Changes 1

Created by: JamesC01

What is this Python project?

This project provides modern pythonic bindings to OpenGL.

What's the difference between this Python project and similar ones?

ModernGL vs PyOpenGL

--Compared to PyOpenGL it is more pythonic, and easier to use and learn. --Faster than PyOpenGL in certain cases. --Less amount of code for the same behaviour.

# PyOpenGL
vbo1 = glGenBuffers(1)
GL.glBindBuffer(GL_ARRAY_BUFFER, vbo1)
GL.glBufferData(GL_ARRAY_BUFFER, b'Hello World!', GL_STATIC_DRAW)

vbo2 = glGenBuffers(1)
GL.glBindBuffer(GL_ARRAY_BUFFER, vbo2)
GL.glBufferData(GL_ARRAY_BUFFER, b'\x00' * 1024, GL_DYNAMIC_DRAW)
# ModernGL
vbo1 = ctx.buffer(b'Hello World!')
vbo2 = ctx.buffer(reserve=1024, dynamic=True)

Another pull request was made years ago here: #893 But it went stale. I'm actually surprised it isn't already on the list, it seems fairly popular, and quite nice.

Anyone who agrees with this pull request could submit an Approve review to it.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/JamesC01/patch-1