pyglet

Creating a new input event dispatcher in Pyglet (infra red input)

隐身守侯 提交于 2021-02-08 07:33:28
问题 I recently asked this question in the pyglet-users group, but got response, so I'm trying here instead. I would like to extend Pyglet to be able to use an infra red input device supported by lirc. I've used pyLirc before ( http://pylirc.mccabe.nu/ ) with PyGame and I want to rewrite my application to use Pyglet instead. To see if a button was pressed you would typically poll pyLirc to see if there is any button presses in its queue. My question is, what is the correct way in Pyglet to

Pyglet shaders not working, keep erroring

五迷三道 提交于 2021-01-29 09:03:01
问题 so i am following a tutorial series on pyglet but i cant make shaders because it causes errors v Traceback (most recent call last): File "/home/awesomenoob/Coding/Python/window_with_shade.py", line 20, in <module> window=window1(1280, 720,"tutorial", resizable=True) File "/home/awesomenoob/Coding/Python/window_with_shade.py", line 9, in __init__ self.triangle=Triangle() File "/home/awesomenoob/Coding/Python/Triangle.py", line 52, in __init__ glUseProgram(shader) File "/home/awesomenoob/.local

tkinter and pygame do not want to work in one window [duplicate]

只愿长相守 提交于 2021-01-28 21:12:03
问题 This question already has answers here : Unable to install pygame on Python via pip (Windows 10) (6 answers) Closed 8 days ago . I want to create an application and want to use tkinter as GUI and one of game libraries as Pyglet and Pygame. I didn't find any info about embedding pyglet into tkinter but found some code with tkinter and pygame: Embedding a Pygame window into a Tkinter or WxPython frame. I'm using python 3.7 and here is the code that I use: import pygame import tkinter as tk from

Why can't Pyglet draw a polygon correctly?

六眼飞鱼酱① 提交于 2021-01-28 07:30:44
问题 I'm randomly creating points to use to draw a polygon with Pyglet. But Pyglet doesn't do the job right most of the time. Well I tried drawing a polygon with another graphic module and actually it worked but if Pyglet was working alright it would make my job easier. I use this to draw polygon and points (to make it easy for you see). point_list = [18, 61, 59, 149, 328, 204, 305, 284, 3, 197, 25, 107] ec = int(len(point_list)/2) batch.add(ec, pyglet.gl.GL_POLYGON, None, ("v2i", point_list), (

Python Error - TypeError: item 1 in _argtypes_ passes a union by value, which is unsupported

百般思念 提交于 2021-01-27 15:07:58
问题 I think this is a not a programming specific bug, but is caused by some libraries. I am transferring my project to a new PC, which I have freshly setup with anaconda etc. using python 3.7.6. Executing the task on the old machine works fine, here I have also used anaconda with python 3.7 (not sure if it was 3.7.6 but I could check this, i just used while creating the environment python=3.7). When I now try to run my program, I receive: Exception in Tkinter callback Traceback (most recent call

Pyglet shaders not working, keep erroring

空扰寡人 提交于 2021-01-05 07:07:48
问题 so i am following a tutorial series on pyglet but i cant make shaders because it causes errors v Traceback (most recent call last): File "/home/awesomenoob/Coding/Python/window_with_shade.py", line 20, in <module> window=window1(1280, 720,"tutorial", resizable=True) File "/home/awesomenoob/Coding/Python/window_with_shade.py", line 9, in __init__ self.triangle=Triangle() File "/home/awesomenoob/Coding/Python/Triangle.py", line 52, in __init__ glUseProgram(shader) File "/home/awesomenoob/.local

PyArcade (Pyglet) python3 Help needed

本小妞迷上赌 提交于 2020-12-15 07:13:26
问题 Python 3.8.1 using python-arcade and linux manjaro os This project is a multiplayer game built with python arcade I get these errors while running : class Client(arcade.Window): def __init__( self, width: int, height: int, title: str = 'Immortals' ) -> None: super().__init__(width, height, title=title) Traceback (most recent call last): File "/home/iddos/Documents/Github/Python/immortals/immortals/main.py", line 42, in <module> main(**config['resolution']) File "/home/iddos/Documents/Github

How do I get autopygui and pyglet to work together?

跟風遠走 提交于 2020-12-13 10:37:21
问题 Getting a conflict between pyglet and autopygui, when one is running I can't use the other. I found a few things online but no one has posted a resolution to the problem. ctypes.ArgumentError: argument 1: <class 'TypeError'>: expected LP_POINT instance instead of pointer to POINT https://github.com/asweigart/pyautogui/issues/26 https://code.google.com/archive/p/pyglet/issues/559 This has been fixed together with issue 510 in rev. e46762382a3 Said to be resolved in that link but I'm still

How do I get autopygui and pyglet to work together?

蹲街弑〆低调 提交于 2020-12-13 10:36:16
问题 Getting a conflict between pyglet and autopygui, when one is running I can't use the other. I found a few things online but no one has posted a resolution to the problem. ctypes.ArgumentError: argument 1: <class 'TypeError'>: expected LP_POINT instance instead of pointer to POINT https://github.com/asweigart/pyautogui/issues/26 https://code.google.com/archive/p/pyglet/issues/559 This has been fixed together with issue 510 in rev. e46762382a3 Said to be resolved in that link but I'm still

How do I make 3D in pyglet?

混江龙づ霸主 提交于 2020-12-06 07:03:26
问题 I was trying to create using OpenGL, Python and pyglet, a flat triangle in 3D space, I saw some tutorials on the internet, some videos on YouTube, and in the end I wrote this code down there, the problem is that it did not work as I expected, I thought that if I tried to spin, I would see the triangle turning flat, and when I walked away, the triangle did not have to diminish? import pyglet from pyglet.gl import * config = Config(sample_buffers=1, samples=8) tela = pyglet.window.Window(height