GithubHelp home page GithubHelp logo

not-na / peng3d Goto Github PK

View Code? Open in Web Editor NEW
11.0 3.0 0.0 1.04 MB

Python and pyglet based 3D Engine and toolkit

License: GNU General Public License v2.0

Python 100.00%
pyglet 3d-engine python python3 gui-toolkit opengl multi-platform game-engine layout-engine

peng3d's Introduction

peng3d

Documentation Status

PyPI - Downloads

Code style: black

CircleCI

peng3d is an opensource 3d graphics engine written in python and with pyglet.

peng3d aims to make creating quick-and-easy visualizations and proof-of-concept projects easier.

peng3d is a set of tools and classes extending built-in pyglet and python functionality with easier to use variants that are still compatible with low-level programming and old code.

You can install peng3d by cloning this project and executing python setup.py install.

See here for Linux:

$ git clone https://github.com/not-na/peng3d.git

$ cd peng3d

$ python setup.py install

This package can also be installed via pip::

$ pip install peng3d

See the docs linked under the badge above for more information, including API documentation and some guides!

peng3d's People

Contributors

not-na avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

peng3d's Issues

Add Guides to peng3d

This issue is meant to track the progress of adding guides to peng3d to make it easier for new users to get started.

Inspired by #1 and #5, both of which requested examples and/or tutorials/guides.

I'm open to suggestions for topics to cover. Just submit them as a comment under this issue.

Currently, the following topics have been proposed:

  • Quickstart (by me), in progress
  • Simple 3D App (by me)
    - Just to show basics, similar to basic.py or model.py examples
  • 3D Game, perhaps a voxel game like Minecraft (by @Coder-X15)
    - See #5 (comment)
    - I also have an abandoned private project from 2017 that is basically a Minecraft clone, though it isn't suitable for a guide due to low code quality
  • Layered widgets (by me)

If anybody is willing to write a guide, leave a comment here beforehand, so we don't duplicate work.

Add support for all standard Widget Types

Add support for all standard widgets, as found on Wikipedia.
Note that this only concerns Widgets commonly used in Desktop Applications.

Proposed List of useful WIdgets:

  • Button
  • Radio Button/Group
  • Check Box
  • Split Button
  • Slider
  • List box/Table box
  • Spinner (both int and float)
  • Drop-down List
  • Combo Box (combination of Text Input and Drop-Down)
  • Icon
  • Tree View
  • Link (maybe as Label property)
  • Tab/Tab Container/Submenu
  • Scrollable Container
  • Text Box
  • Label
  • Ballon Help/Label
  • Status Bar
  • Progress Bar
  • Container
  • Accordion Container
  • Modal Window/Dialogue
  • Non-Modal Dialog/Multi-Window support
  • Palette Window
  • Frame with Label
  • Canvas

Add tutorials

It would be great if you guys could put up a tutorial website which provides various tutorials using Peng3D :) ... I wish to know more on this.

Memory Leak when deleting Widgets

Note that this issue is more of a write-down for myself for when I start to work on this again, as I currently do not have the time to do so.

Deleting a widget via SubMenu.delWidget() causes the widget object itself to stay around, causing a memory leak.
Preliminary testing with the testbtn widget (an ImageButton) has revealed that this is probably caused by a cyclic dependency, as sys.getrefcount() of the widget just before deleting the last known reference returns 10. However, gc.get_referrers() shows 7 results, three frame objects, one cell object, one bound method BasicWidget.on_mouse_release of the button in question, a weird 5-tuple of form (obj,285,407,1,16) and a large dictionary containing lots of OpenGL constants and function pointers.

The 5-tuple's second and third item have been seen to change slightly over several tests, but the last two remained constant. Perhaps they are constants and the other ones are OpenGL handles? Further testing required...

The dict seems to have lots of keys, and was to large to print out entirely on the console. All visible keys seem to originate from pyglet OpenGL constants and functions, though there were some odd keys like PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC which I have never heard of and that lack the typical gl* schema.
This dict could be the locals/globals of some module, should check what module specifically, maybe by writing the list of keys to a file and searching manually...
Should also check under what key the widget is available in this dict.

The best way to solve this problem seems to be to find all referrers to the widget and eliminate them as cleanly as possible.

Checklist:

  • Check the origin of the frame and cell objects, just in case
  • Reverse search the numbers of the 5-tuple for OpenGL or other constants
  • Manually check all keys of the large dictionary to try and find any out-of-the-ordinary keys
  • Find out why the bound method on_mouse_release still exists, and not the others

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.