This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Visualization of particles with gravity | |
# Adapted from pyopencl example | |
# Source: http://enja.org/2010/08/27/adventures-in-opencl-part-2-particles-with-opengl/ | |
# | |
# Refactoring example to show shader usage: | |
# Uses the x-ray shader found in MeshLab | |
# Code is a modified version of http://www.pygame.org/wiki/GLSLExample | |
# | |
# OpenCL support |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Visualization of particles with gravity | |
# Adapted from pyopencl example | |
# Source: http://enja.org/2010/08/27/adventures-in-opencl-part-2-particles-with-opengl/ | |
# Changelog: playing around with OO structures--nothing big | |
import pyopencl as cl # OpenCL - GPU computing interface | |
mf = cl.mem_flags | |
from pyopencl.tools import get_gl_sharing_context_properties | |
from OpenGL.GL import * # OpenGL - GPU rendering interface |
NewerOlder