美文网首页
PyOpenGL的环境搭建

PyOpenGL的环境搭建

作者: AI_Finance | 来源:发表于2018-04-16 15:01 被阅读0次

1、下载glut64.dll,放在C:/windows/System32目录下

2、pip install pyopengl

3、如果可以成功运行以下程序,标志着PyOpenGL环境正确搭建

from OpenGL.GLUTimport *

from OpenGL.GLimport *

from OpenGL.GLUimport *

def drawFunc():

glClear(GL_COLOR_BUFFER_BIT)

# glRotatef(1, 0, 1, 0)

    glutWireTeapot(0.5)

glFlush()

glutInit(sys.argv)

glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB)

glutInitWindowSize(250, 250)

glutInitWindowPosition(100, 100)

glutCreateWindow(b"My Second OGL Program")

glutDisplayFunc(drawFunc)

glutMainLoop()

相关文章

  • PyOpenGL的环境搭建

    1、下载glut64.dll,放在C:/windows/System32目录下 2、pip install pyo...

  • pyOpenGL wglMakeCurrent

    wglMakeCurrent的用法网上较多,可以自行了解,其中两个参数分别是hdc和hglrc,如果需要在子线程创...

  • React Native学习总结篇

    一、环境搭建 1.1 React Native环境搭建 1.1.1 IOS环境搭建 环境:MacOS 注意:不要使...

  • Gradle开发-Groovy环境搭建

    ##Groovy环境搭建 在使用 Groovy 之前首先要搭建几个环境: Groovy 的环境搭建 JDK 环境搭...

  • linux 第四天

    Lamp环境搭建 /*******************Lamp环境搭建:*******************...

  • codePush说明

    codePush环境搭建 环境搭建文章:环境搭建 git地址:codePush git地址2.0.3,And...

  • Robot Framework用法总结

    一,环境的搭建 关于robotframework环境搭建请参考博文:Robot Framework的环境搭建[ht...

  • angular学习--02英雄指南

    环境搭建 angular官网--搭建本地开发环境和工作空间windows 10 搭建angular开发环境免搭建环...

  • 搭建 LNMP + CodeIgniter 开发环境

    搭建 LNMP + CodeIgniter 开发环境搭建 LNMP 环境首先搭建 LNMP 的服务器环境安装 Ng...

  • php环境搭建

    linux 搭建 php 环境 原本的计划是手动搭建php环境,结果我不出所料的搭建失败了(每次搭建环境都很崩溃!...

网友评论

      本文标题:PyOpenGL的环境搭建

      本文链接:https://www.haomeiwen.com/subject/arlekftx.html