首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何用Arcade库修复MissingFunctionException

如何用Arcade库修复MissingFunctionException
EN

Stack Overflow用户
提问于 2019-10-08 06:07:00
回答 1查看 770关注 0票数 0

我正在为2D游戏开发练习拱门库。但是我的第一个程序最终出错了!

我想做我的第一个2D游戏与一个容易学习的拱廊图书馆在Python -一个快乐的微笑脸-

代码语言:javascript
复制
import arcade

# set constants for the screen size:
SCREEN_WIDTH = 600
SCREEN_HEIGHT = 600

# open the window, set screen size & dimension:
arcade.open_window(SCREEN_WIDTH, SCREEN_HEIGHT, "Hello, World! [Smiley]")

# set the bgcolor to white:
arcade.set_background_color(arcade.color.WHITE)

# start the render process, this must done before any drawing commands:
arcade.start_render()

# draw the face:
x, y, r = 300, 300, 200
arcade.draw_circle_filled(x, y, r, arcade.color.YELLOW)

# draw the right eye:
x = 370
y = 350
r = 20
arcade.draw_circle_filled(x, y, r, arcade.color.BLACK)

# draw the left eye:
x = 230
y = 350
r = 20
arcade.draw_circle_filled(x, y, r, arcade.color.BLACK)

# draw the smile:
x = 300
y = 280
width = 120
height = 100
start_angle = 190
end_angle = 350
arcade.draw_arc_outline(x, y, width, height, arcade.color.BLACK, start_angle, end_angle)

# finish drawing and display the result:
arcade.finish_render()

# keep the window open until the user hits the 'close' button:
arcade.run()

我期待着一个‘黄色的Emoji带着微笑’。但是我遇到了一个意外错误:

代码语言:javascript
复制
Start
Start
Traceback (most recent call last):
  File "E:/Python/#Programs/arcade_pract/Hello, arcade!.py", line 18, in <module>
    arcade.draw_circle_filled(x, y, r, arcade.color.YELLOW)
  File "C:\Users\AVD\AppData\Roaming\Python\Python37\site-packages\arcade\draw_commands.py", line 629, in draw_circle_filled
    draw_ellipse_filled(center_x, center_y, width, height, color, num_segments=num_segments)
  File "C:\Users\AVD\AppData\Roaming\Python\Python37\site-packages\arcade\draw_commands.py", line 696, in draw_ellipse_filled
    _generic_draw_line_strip(point_list, color, gl.GL_TRIANGLE_FAN)
  File "C:\Users\AVD\AppData\Roaming\Python\Python37\site-packages\arcade\draw_commands.py", line 795, in _generic_draw_line_strip
    fragment_shader=line_fragment_shader,
  File "C:\Users\AVD\AppData\Roaming\Python\Python37\site-packages\arcade\shader.py", line 226, in program
    (fragment_shader, GL_FRAGMENT_SHADER)
  File "C:\Users\AVD\AppData\Roaming\Python\Python37\site-packages\arcade\shader.py", line 111, in __init__
    self.prog_id = prog_id = glCreateProgram()
  File "C:\Users\AVD\AppData\Roaming\Python\Python37\site-packages\pyglet\gl\lib_wgl.py", line 107, in __call__
    return self.func(*args, **kwargs)
  File "C:\Users\AVD\AppData\Roaming\Python\Python37\site-packages\pyglet\gl\lib.py", line 64, in MissingFunction
    raise MissingFunctionException(name, requires, suggestions)
pyglet.gl.lib.MissingFunctionException: glCreateProgram is not exported by the available OpenGL driver.  VERSION_2_0 is required for this functionality.
Warning: Anti-aliasing not supported on this computer.
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-04-16 10:03:31

所以我找到了。我没有一个专用图形卡和反走样不支持我的内置英特尔图形。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/58280952

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档