phi += 0.5 # degrees model = np.eye(4, dtype=np.float32) glm.rotate(model, theta, 0, 0, 1) glm.rotate(model, phi, 0, 1, 0) transform['model'] = model # Build cube data V, I, O = colorcube() vertices = V.view(gloo.VertexBuffer) faces = I.view(gloo.IndexBuffer) outline = O.view(gloo.IndexBuffer) cube = gloo.Program(vertex, fragment) cube.bind(vertices) transform = PVMProjection(Position("position")) cube['transform'] = transform window.attach(transform) phi, theta = 0, 0 # OpenGL initalization gl.glEnable(gl.GL_DEPTH_TEST) gl.glPolygonOffset(1, 1) gl.glEnable(gl.GL_LINE_SMOOTH) gl.glBlendFunc(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA) gl.glLineWidth(0.75) # Run app.run()
phi += 0.5 # degrees model = np.eye(4, dtype=np.float32) glm.rotate(model, theta, 0, 0, 1) glm.rotate(model, phi, 0, 1, 0) cube['model'] = model # Build cube data V, I, O = colorcube() vertices = V.view(gloo.VertexBuffer) faces = I.view(gloo.IndexBuffer) outline = O.view(gloo.IndexBuffer) cube = gloo.Program(vertex, fragment) cube.bind(vertices) transform = PVMProjection(Position3D("position")) cube['transform'] = transform window.attach(transform) phi, theta = 0, 0 # OpenGL initalization gl.glEnable(gl.GL_DEPTH_TEST) gl.glPolygonOffset(1, 1) gl.glEnable(gl.GL_LINE_SMOOTH) gl.glBlendFunc(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA) gl.glLineWidth(0.75) # Run app.run()
def on_init(): gl.glBlendFunc(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA) gl.glPolygonOffset(1, 1) gl.glEnable(gl.GL_LINE_SMOOTH) gl.glLineWidth(2.5)
def on_init(): gl.glEnable(gl.GL_DEPTH_TEST) gl.glPolygonOffset(1, 1) gl.glEnable(gl.GL_LINE_SMOOTH) gl.glLineWidth(0.75)
def on_init(): #gl.glEnable(gl.GL_DEPTH_TEST) gl.glPolygonOffset(1, 1) gl.glEnable(gl.GL_LINE_SMOOTH)
def on_init(): # init the OpenGL parameters gl.glEnable(gl.GL_DEPTH_TEST) # enable depth buffer gl.glEnable(gl.GL_LINE_SMOOTH) # enable line antialiasing gl.glPolygonOffset(1, 1) # resize line polygon
def on_init(): gl.glEnable(gl.GL_DEPTH_TEST) gl.glPolygonOffset(1, 1) gl.glEnable(gl.GL_LINE_SMOOTH) gl.glBlendFunc(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA)