{"action":"opened","issue":{"url":"https://api.github.com/repos/pvcraven/arcade/issues/277","repository_url":"https://api.github.com/repos/pvcraven/arcade","labels_url":"https://api.github.com/repos/pvcraven/arcade/issues/277/labels{/name}","comments_url":"https://api.github.com/repos/pvcraven/arcade/issues/277/comments","events_url":"https://api.github.com/repos/pvcraven/arcade/issues/277/events","html_url":"https://github.com/pvcraven/arcade/issues/277","id":379461847,"node_id":"MDU6SXNzdWUzNzk0NjE4NDc=","number":277,"title":"Drawing triangle throws pyglet.gl.lib.GLException","user":{"login":"LvanderGoten","id":6940934,"node_id":"MDQ6VXNlcjY5NDA5MzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6940934?v=4","gravatar_id":"","url":"https://api.github.com/users/LvanderGoten","html_url":"https://github.com/LvanderGoten","followers_url":"https://api.github.com/users/LvanderGoten/followers","following_url":"https://api.github.com/users/LvanderGoten/following{/other_user}","gists_url":"https://api.github.com/users/LvanderGoten/gists{/gist_id}","starred_url":"https://api.github.com/users/LvanderGoten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LvanderGoten/subscriptions","organizations_url":"https://api.github.com/users/LvanderGoten/orgs","repos_url":"https://api.github.com/users/LvanderGoten/repos","events_url":"https://api.github.com/users/LvanderGoten/events{/privacy}","received_events_url":"https://api.github.com/users/LvanderGoten/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-10T21:09:46Z","updated_at":"2018-11-10T21:09:46Z","closed_at":null,"author_association":"NONE","body":"## Bug Report\r\n\r\nDrawing a triangle throws a **pyglet.gl.lib.GLException** while drawing other primitives works flawlessly.\r\n### Actual behavior:\r\n\r\n> Traceback (most recent call last):\r\n>   File \"/home/lennartv/PycharmProjects/BilliardAI/test.py\", line 20, in <module>\r\n>     arcade.run()\r\n>   File \"/usr/lib/python3.7/site-packages/arcade/window_commands.py\", line 223, in run\r\n>     pyglet.app.run()\r\n>   File \"/usr/lib/python3.7/site-packages/pyglet/app/__init__.py\", line 138, in run\r\n>     event_loop.run()\r\n>   File \"/usr/lib/python3.7/site-packages/pyglet/app/base.py\", line 142, in run\r\n>     self._run()\r\n>   File \"/usr/lib/python3.7/site-packages/pyglet/app/base.py\", line 154, in _run\r\n>     timeout = self.idle()\r\n>   File \"/usr/lib/python3.7/site-packages/pyglet/app/base.py\", line 281, in idle\r\n>     window.dispatch_event('on_draw')\r\n>   File \"/usr/lib/python3.7/site-packages/pyglet/window/__init__.py\", line 1232, in dispatch_event\r\n>     if EventDispatcher.dispatch_event(self, *args) != False:\r\n>   File \"/usr/lib/python3.7/site-packages/pyglet/event.py\", line 367, in dispatch_event\r\n>     if getattr(self, event_type)(*args):\r\n>   File \"/home/lennartv/PycharmProjects/BilliardAI/test.py\", line 11, in on_draw\r\n>     x3=200, y3=200, color=arcade.color.WHITE)\r\n>   File \"/usr/lib/python3.7/site-packages/arcade/draw_commands.py\", line 912, in draw_triangle_filled\r\n>     draw_polygon_filled(point_list, color)\r\n>   File \"/usr/lib/python3.7/site-packages/arcade/draw_commands.py\", line 859, in draw_polygon_filled\r\n>     _generic_draw_line_strip(point_list, color, 1, gl.GL_POLYGON)\r\n>   File \"/usr/lib/python3.7/site-packages/arcade/draw_commands.py\", line 734, in _generic_draw_line_strip\r\n>     vao.render(mode=mode)\r\n>   File \"/usr/lib/python3.7/site-packages/arcade/shader.py\", line 498, in render\r\n>     glDrawArraysInstanced(mode, 0, self.num_vertices, instances)\r\n>   File \"/usr/lib/python3.7/site-packages/pyglet/gl/lib.py\", line 105, in errcheck\r\n>     raise GLException(msg)\r\n> pyglet.gl.lib.GLException: b'invalid enumerant'\r\n\r\n### Steps to reproduce/example code:\r\n\r\n```python\r\nimport arcade\r\n\r\n\r\nclass Game(arcade.Window):\r\n    def __init__(self, screen_width, screen_height):\r\n        super().__init__(width=screen_width, height=screen_height, title=\"Test\")\r\n\r\n    def on_draw(self):\r\n        \"\"\" Throws pyglet.gl.lib.GLException \"\"\"\r\n        arcade.draw_triangle_filled(x1=50, y1=50,\r\n                                    x2=100, y2=100,\r\n                                    x3=200, y3=200, color=arcade.color.WHITE)\r\n        \"\"\" This works however \"\"\"\r\n        # arcade.draw_rectangle_filled(center_x=50, center_y=50,\r\n        #                              width=20, height=20, color=arcade.color.WHITE)\r\n\r\n    def on_update(self, delta_time):\r\n        pass\r\n\r\n\r\ngame = Game(screen_width=500, screen_height=500)\r\narcade.run()\r\n```\r\n## Specifics\r\n\r\n- Arcade: 2.0.0a1\r\n- Python 3.7.1\r\n- OS: Arch Linux 4.18.16-arch1-1-ARCH\r\n- OpenGL: 3.0 Mesa 18.2.4"}}
{"actor":{"display_login":"LvanderGoten"}}