Coder Social home page Coder Social logo

adamlwgriffiths / pyglet Goto Github PK

View Code? Open in Web Editor NEW
25.0 5.0 12.0 37.21 MB

Fork of Pyglet to provide OpenGL Core functionality on Mac OS-X. Please use the official repository unless you require these changes.

License: BSD 3-Clause "New" or "Revised" License

PHP 0.03% Shell 0.01% JavaScript 0.11% Python 99.86%

pyglet's Introduction

pyglet
======

http://www.pyglet.org/

pyglet provides an object-oriented programming interface for developing games
and other visually-rich applications for Windows, Mac OS X and Linux.

Requirements
------------

pyglet runs with Python 2.5+ and also with Python 3 through 2to3 tool (which
is executed automatically when installing). pyglet works on the following
operating systems:

* Windows XP or later
* Mac OS X 10.3 or later
* Linux, with the following libraries (most recent distributions will have
  these in a default installation):
    * OpenGL and GLX
    * GDK 2.0 or later (required for loading images)
    * OpenAL or ALSA (required for playing audio)
    
Installation
------------

If you're reading this README from a source distribution, install pyglet
with::

    python setup.py install

There are no compilation steps during the installation; if you prefer, you can
simply add this directory to your PYTHONPATH and use pyglet without
installing it.

Support
-------

pyglet has an active developer and user community.  If you find a bug, please
open an issue at http://code.google.com/p/pyglet/issues (requires a Google
account).

Please join us on the mailing list at 
http://groups.google.com/group/pyglet-users

For more information and an RSS news feed, visit http://www.pyglet.org

Testing
-------

Because of its interactive nature pyglet uses a custom test runner which is
invoked with:

    % python tests/test.py

The test runner is described in more detail in the tests/test.py docstring.

pyglet's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pyglet's Issues

Menu bar

On tkinter it is very straightforward to create a menu bar for the window, for example like the one at the top of IDLE.
image
Is this at all supported by pyglet or even OpenGL?

pyglet.image.load_animation() fails when decoder is specified

Symptom:
If I load an animation image by using a custom decoder I get NotImplementedError.
e.g.

import io
from pyglet.image import *
from pyglet.image.codecs import *

class MyFileDecoder(ImageDecoder):
    def __init__(self, width, height, palette):
        pass
    def decode_animation(self, file, filename):
        return Animation([ImageData(0, 0, 'RGBA', [], 0)])

palette = []
myFileData = io.BytesIO(bytes([1, 2]))

myFileAnimation = pyglet.image.load_animation('myFile', 
    file=myFileData, decoder=MyFileDecoder(640, 480, palette))

Expected Result:
The animation should be loaded correctly without throwing any errors.

Workaround:
In the case when a decoder is specified to load_animation(), a call to decoder.decode() is made, however it should be decoder.decode_animation().
See... https://github.com/adamlwgriffiths/Pyglet/blob/7ced33347a70bbaa02bab7ad28ad3c976bd9b216/pyglet/image/init.py#L2496
In the snippet, when a decoder isn't specified it goes through registered decoders looking for one that handles the file type. Once one is found decoder.decode_animation() is called.
By changing line 2496 above as follows, the code works as expected.

        return decoder.decode_animation(file, filename)

GET INPUT

How to get the text that i have written inside the widget ?

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.