Skip to main content

glpy

glpy is pyOpenGl wrapper which lets you work with pyOpenGl easily.It is not meant to be a replacement for pyOpenGl but runs on top of pyOpenGl to avoid most of the boiler plate setup

Features

  • Robust abstraction over pyOpenGl event loop
  • decorators to simplify callback functions

Code Example

from  glpy  import *
app = glpy()

@point(10)
def plotpoints():
    glColor3f(100, 150, 200)
    glVertex2f(0,0)

app.run(lambda:plotpoints())

find more examples here

Installation

pip install glpy

API Reference

glpy()

allowed keyword arguments
Parameter Type Description Default
mode constant Display mode GLUT_RGBA
size tuple Window size (500,500)
position tuple Window position (0,0)
bgcolor tuple background color (0, 0, 0, 1.0)
title string window title new title
axis_range tuple The range of 2D plane (-100, 100,-100, 100)

How to use?

  • Make sure you have opengl installed on your system

  • Install the package using pip.

  • import the package and initialilze glpy

    app = glpy()

  • you can pass in additional parameters as seen in the API Reference as keyword arguments

    app = glpy(title = "line drawing")

  • define your callback function with the help of point decorator which takes the size of the point to be plotted as an argument . NOTE: using a decorator is not neccesory for the library to work but it can significatly reduce the code size

    @point(10)
    def plotpoints():
        glColor3f(100, 468, 200)
        glVertex2f(0,0)
    
  • call the run the method using the callback function as an argument to run the function NOTE: use a lambda function to pass callback functions with arguments

    app.run(lambda:plotpoints())

Contribute

Contributions are what makes the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

APACHE © Abhinav TB

Metadata

Release files for glpy 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for glpy 0.1.1
File Size Uploaded Provenance Actions
glpy-0.1.1.tar.gz 3.6 kB Without provenance Details for glpy-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for glpy 0.1.1
File Interpreter ABI Platform Actions
glpy-0.1.1-py3-none-any.whl Python 3 none any Details for glpy-0.1.1-py3-none-any.whl

Total release size: 11.6 kB

Release files / glpy-0.1.1.tar.gz

Download URL glpy-0.1.1.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9ff0e86f54c5ee86583dcce40de14c29f672eb527d435e7009d7094ea0b05740
BLAKE2b-256 checksum
How to use checksums
1a0c4451f5ede385bf5053cc99118befd6671838733b7fd5bfc8b799d8f5c63c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

Release files / glpy-0.1.1-py3-none-any.whl

Download URL glpy-0.1.1-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ad05a275d91f47b2d08d1a1845e2f8853c8f8f3786f6a03da3b4e10760a08684
BLAKE2b-256 checksum
How to use checksums
cb5be58bcb237ea7a696e2f203993f2044bf13d90930a533458ad7c7bb1104e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

Security for glpy 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page