首页 > 解决方案 > 出现运行时错误:可用的 OpenGL 驱动程序未导出 glCreateProgram

问题描述

我正在运行 Win 10,DirectX v12 版本 382.05

我从https://realpython.com/arcade-python-game-framework/复制了这个。我已经安装了街机、psychoPy 和数据类。

def basic_arcade_program():
    # Basic arcade program
    # Displays a white window with a blue circle in the middle
    # Imports
    import arcade

    # Constants
    SCREEN_WIDTH = 600
    SCREEN_HEIGHT = 800
    SCREEN_TITLE = "Welcome to Arcade"
    RADIUS = 150
    # Open the window
    arcade.open_window(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_TITLE)
    # Set the background color
    arcade.set_background_color(arcade.color.WHITE)
    # Clear the screen and start drawing
    arcade.start_render()
    # Draw a blue circle
    arcade.draw_circle_filled(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, RADIUS, arcade.color.BLUE)
    # Finish drawing
    arcade.finish_render()
    # Display everything
    arcade.run()    


basic_arcade_program()

我得到这个错误: 在此处输入图像描述

错误源于此行:

arcade.draw_circle_filled(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, RADIUS, arcade.color.BLUE)

标签: pythonarcade

解决方案


推荐阅读