【发布时间】:2022-01-04 00:55:21
【问题描述】:
我只想将立方体内部的部分渲染为类似于图 2 所示的部分
我当前渲染球体的代码在这里
def Sphere(ball):
glPushMatrix()
sphere = gluNewQuadric()
glTranslatef(ball.pos.x,ball.pos.y,ball.pos.z) #Move to the place
glColor3fv((1,0,0)) #Put color
gluSphere(sphere, ball.radius, 16, 8) #Draw sphere
glPopMatrix()
【问题讨论】:
标签: python opengl render physics pyopengl