pyopengl-users Mailing List for PyOpenGL (Page 3)
Brought to you by:
mcfletch
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(81) |
Oct
(41) |
Nov
(55) |
Dec
(14) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(34) |
Feb
(3) |
Mar
(16) |
Apr
(5) |
May
(10) |
Jun
(13) |
Jul
(24) |
Aug
(14) |
Sep
(14) |
Oct
(9) |
Nov
(10) |
Dec
(16) |
2003 |
Jan
(25) |
Feb
(59) |
Mar
(9) |
Apr
(21) |
May
(54) |
Jun
(4) |
Jul
(16) |
Aug
(19) |
Sep
(19) |
Oct
(15) |
Nov
(13) |
Dec
(22) |
2004 |
Jan
(19) |
Feb
(8) |
Mar
(20) |
Apr
(16) |
May
(13) |
Jun
(18) |
Jul
(18) |
Aug
(14) |
Sep
(24) |
Oct
(47) |
Nov
(20) |
Dec
(10) |
2005 |
Jan
(23) |
Feb
(31) |
Mar
(11) |
Apr
(29) |
May
(18) |
Jun
(7) |
Jul
(11) |
Aug
(12) |
Sep
(8) |
Oct
(4) |
Nov
(11) |
Dec
(7) |
2006 |
Jan
(7) |
Feb
(8) |
Mar
(15) |
Apr
(3) |
May
(8) |
Jun
(25) |
Jul
(19) |
Aug
(3) |
Sep
(17) |
Oct
(27) |
Nov
(24) |
Dec
(9) |
2007 |
Jan
(6) |
Feb
(43) |
Mar
(33) |
Apr
(8) |
May
(20) |
Jun
(11) |
Jul
(7) |
Aug
(8) |
Sep
(11) |
Oct
(22) |
Nov
(15) |
Dec
(18) |
2008 |
Jan
(14) |
Feb
(6) |
Mar
(6) |
Apr
(37) |
May
(13) |
Jun
(17) |
Jul
(22) |
Aug
(16) |
Sep
(14) |
Oct
(16) |
Nov
(29) |
Dec
(13) |
2009 |
Jan
(7) |
Feb
(25) |
Mar
(38) |
Apr
(57) |
May
(12) |
Jun
(32) |
Jul
(32) |
Aug
(35) |
Sep
(10) |
Oct
(28) |
Nov
(16) |
Dec
(49) |
2010 |
Jan
(57) |
Feb
(37) |
Mar
(22) |
Apr
(15) |
May
(45) |
Jun
(25) |
Jul
(32) |
Aug
(7) |
Sep
(13) |
Oct
(2) |
Nov
(11) |
Dec
(28) |
2011 |
Jan
(35) |
Feb
(39) |
Mar
|
Apr
(25) |
May
(32) |
Jun
(17) |
Jul
(29) |
Aug
(10) |
Sep
(26) |
Oct
(9) |
Nov
(28) |
Dec
(4) |
2012 |
Jan
(24) |
Feb
(47) |
Mar
(4) |
Apr
(8) |
May
(9) |
Jun
(6) |
Jul
(4) |
Aug
(1) |
Sep
(4) |
Oct
(28) |
Nov
(2) |
Dec
(2) |
2013 |
Jan
(11) |
Feb
(3) |
Mar
(4) |
Apr
(38) |
May
(15) |
Jun
(11) |
Jul
(15) |
Aug
(2) |
Sep
(2) |
Oct
(4) |
Nov
(3) |
Dec
(14) |
2014 |
Jan
(24) |
Feb
(31) |
Mar
(28) |
Apr
(16) |
May
(7) |
Jun
(6) |
Jul
(1) |
Aug
(10) |
Sep
(10) |
Oct
(2) |
Nov
|
Dec
|
2015 |
Jan
(6) |
Feb
(5) |
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(2) |
Oct
(1) |
Nov
(19) |
Dec
|
2016 |
Jan
(6) |
Feb
(1) |
Mar
(7) |
Apr
|
May
(6) |
Jun
|
Jul
(3) |
Aug
(7) |
Sep
|
Oct
(2) |
Nov
(2) |
Dec
|
2017 |
Jan
|
Feb
(6) |
Mar
(8) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(3) |
Oct
(2) |
Nov
|
Dec
|
2018 |
Jan
(9) |
Feb
(1) |
Mar
|
Apr
|
May
(1) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(6) |
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Joel P. <joe...@ho...> - 2017-02-22 10:37:34
|
As a follow-up: I got an answer sent to me privately rather than to the list, and it solved the problem for my part. Posting the solution here for people who run into the same issue. In order to avoid the crash "AttributeError: module 'OpenGL.GL' has no attribute 'GL_READ_WRITE'", it is sufficient to import OpenGL.GLU before OpenGL.GL. The following code crashes (on some machines, under unknown circumstances, on ubuntu 16.04) with the stack trace in the original post: #!/usr/bin/python3 import OpenGL from OpenGL.GL import * The following code does not crash: #!/usr/bin/python3 import OpenGL import OpenGL.GLU from OpenGL.GL import * I don't understand the reason for this behavior, but the solution is derived from a bug report posted at python's bug tracker: https://bugs.python.org/issue26245 |
From: Matti K. <mat...@gm...> - 2017-02-20 23:48:39
|
I wasn't able to reproduce your error (Ubuntu 16.10), how did you install 3.0.2? But before answering that! If its not a hard requirement to use 3.0.2 I would suggest installing and using 3.1.0 : # remove your current pyopengl, might through synaptic or with $ sudo apt-get remove python3-pyopengl $ sudo apt-get install python3-pip $ python3 -m pip install pyopengl ...using 3.1.0 I saw no errors with your test script. == The most-recent code changes the line that errored out to: def mapVBO( vbo, access=0x88BA ): # GL_READ_WRITE If you really don't want to install 3.1.0, you could try editing /usr/lib/python3/dist-packages/OpenGL/arrays/vbo.py line 430 and making the change above-- you may find more errors though. On 2/20/17 3:07 PM, Joel Palmius wrote: > (cross-posted from the -devel list) > > I have a very simple script: > > #!/usr/bin/python3 > import OpenGL > from OpenGL.GL import * > > Running this script with python 3.5.1 on an updated ubuntu 16.04 causes the following stack trace: > > Traceback (most recent call last): > File "test.py", line 3, in <module> > from OpenGL.GL import * > File "/usr/lib/python3/dist-packages/OpenGL/GL/__init__.py", line 3, in <module> > from OpenGL.GL.VERSION.GL_1_1 import * > File "/usr/lib/python3/dist-packages/OpenGL/GL/VERSION/GL_1_1.py", line 10, in <module> > from OpenGL import platform, constants, constant, arrays > File "/usr/lib/python3/dist-packages/OpenGL/arrays/__init__.py", line 22, in <module> > formathandler.FormatHandler.loadAll() > File "/usr/lib/python3/dist-packages/OpenGL/arrays/formathandler.py", line 28, in loadAll > cls.loadPlugin( entrypoint ) > File "/usr/lib/python3/dist-packages/OpenGL/arrays/formathandler.py", line 35, in loadPlugin > plugin_class = entrypoint.load() > File "/usr/lib/python3/dist-packages/OpenGL/plugins.py", line 14, in load > return importByName( self.import_path ) > File "/usr/lib/python3/dist-packages/OpenGL/plugins.py", line 28, in importByName > module = __import__( ".".join(moduleName), {}, {}, moduleName) > File "/usr/lib/python3/dist-packages/OpenGL/arrays/vbo.py", line 430, in <module> > def mapVBO( vbo, access=GL.GL_READ_WRITE ): > AttributeError: module 'OpenGL.GL' has no attribute 'GL_READ_WRITE' > > Running exactly the same script with python 2.7.12 does not cause any crash. > > The installed version of pyopengl is 3.0.2. > > Is this a bug with pyopengl, and is this mailing list then the appropriate place to report it? > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users |
From: Joel P. <joe...@ho...> - 2017-02-20 21:08:04
|
(cross-posted from the -devel list) I have a very simple script: #!/usr/bin/python3 import OpenGL from OpenGL.GL import * Running this script with python 3.5.1 on an updated ubuntu 16.04 causes the following stack trace: Traceback (most recent call last): File "test.py", line 3, in <module> from OpenGL.GL import * File "/usr/lib/python3/dist-packages/OpenGL/GL/__init__.py", line 3, in <module> from OpenGL.GL.VERSION.GL_1_1 import * File "/usr/lib/python3/dist-packages/OpenGL/GL/VERSION/GL_1_1.py", line 10, in <module> from OpenGL import platform, constants, constant, arrays File "/usr/lib/python3/dist-packages/OpenGL/arrays/__init__.py", line 22, in <module> formathandler.FormatHandler.loadAll() File "/usr/lib/python3/dist-packages/OpenGL/arrays/formathandler.py", line 28, in loadAll cls.loadPlugin( entrypoint ) File "/usr/lib/python3/dist-packages/OpenGL/arrays/formathandler.py", line 35, in loadPlugin plugin_class = entrypoint.load() File "/usr/lib/python3/dist-packages/OpenGL/plugins.py", line 14, in load return importByName( self.import_path ) File "/usr/lib/python3/dist-packages/OpenGL/plugins.py", line 28, in importByName module = __import__( ".".join(moduleName), {}, {}, moduleName) File "/usr/lib/python3/dist-packages/OpenGL/arrays/vbo.py", line 430, in <module> def mapVBO( vbo, access=GL.GL_READ_WRITE ): AttributeError: module 'OpenGL.GL' has no attribute 'GL_READ_WRITE' Running exactly the same script with python 2.7.12 does not cause any crash. The installed version of pyopengl is 3.0.2. Is this a bug with pyopengl, and is this mailing list then the appropriate place to report it? |
From: Matti K. <mat...@gm...> - 2017-02-12 20:20:06
|
I tried to have a look at your code, but I don't have the `gi' package on my machine, and `pip install gi' can't find it either. 1) Would you accept help in the form of a program that starts with `from OpenGL import GLUT' , or does your problem require gi? As for the error you posted, looking at https://mesamatrix.net/ I see that glGenVertexArrays is a part of OpenGL 3.0, extension GL_ARB_vertex_array_object which seems to have broad support. 2) Maybe your graphics device (or its driver) is ancient? Since your gist seems to indicate you are using GTK, I assume you are running this under Linux. You may want to look into running PyOpenGL under mesa, using one of their software renderers if for whatever reason you don't have OpenGL3.0 support. Using the mesa CPU renderer under Linux: http://www.mattikariluoma.com/blog/Headless%20Rendered%20OpenGL%20Scenes.html >From: Oliver Marks <oly@di...> - 2017-02-11 22:40:09 > >Thought i would have a stab at trying to make this work, I cant find any >existing working examples. > >I have linked a gist if any one want to try. > >currently I am getting this error. > >OpenGL.error.NullFunctionError: Attempt to call an undefined function >glGenVertexArrays, check for bool(glGenVertexArrays) before calling > >Which to me sounds like its not available to the context, GLArea is >supplying the context so i am unsure why this would be ? > >Any ideas or can anyone give me some pointers ? > >https://gist.github.com/olymk2/5b3e49ac83130e580bd9983f2e5d49c3 > |
From: Oliver M. <ol...@di...> - 2017-02-11 22:40:09
|
Thought i would have a stab at trying to make this work, I cant find any existing working examples. I have linked a gist if any one want to try. currently I am getting this error. OpenGL.error.NullFunctionError: Attempt to call an undefined function glGenVertexArrays, check for bool(glGenVertexArrays) before calling Which to me sounds like its not available to the context, GLArea is supplying the context so i am unsure why this would be ? Any ideas or can anyone give me some pointers ? https://gist.github.com/olymk2/5b3e49ac83130e580bd9983f2e5d49c3 |
From: Nathen H. <nat...@gm...> - 2017-02-04 00:03:00
|
Hello, I am receiving the following error when attempting to load bytes using glCompressedTexImage2D as the last argument, referenced as "data" in the docs. AttributeError: ("'module' object has no attribute 'ArrayType'", 'Failure in cConverter <OpenGL.GL.images.CompressedImageConverter object at 0x10232d050>', (GL_TEXTURE_2D, 0, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, 32, 32, 0, 1024), 6, <OpenGL.platform.baseplatform.glCompressedTexImage2D object at 0x10232b7e8>) I have tried to load the data as bytes (using the built-in python bytes function), bytearray (builtin function) and simply as read from the file. The error is identical for all three approaches. Any thoughts on how to remediate this? With Thanks! Nathen Hinson |
From: enrike <al...@gm...> - 2016-11-20 07:24:42
|
az., 2016.eko azaren 16a 05:09(e)an, Antoine Martin igorleak idatzi zuen: > On 21/10/16 02:55, enrike wrote: >> Hi >> >> I have an app that uses PyQt4 and PyOpenGL. On latest mac OSX the app >> runs fine from command line but when I pack it with PyInstaller I get >> this error. >> >> Traceback (most recent call last): >> File "site-packages/mirra/main.py", line 90, in resizeGL >> File "site-packages/mirra/engine.py", line 183, in restart >> File "errorchecker.pyx", line 53, in >> OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError >> (src/errorchecker.c:1218) >> OpenGL.error.GLError: GLError( >> err = 1286, >> description = 'invalid framebuffer operation', >> baseOperation = glClear, >> cArguments = (16640,) >> ) >> >> removing the glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) from >> that line to a previous step in the program seems to solve the problem, >> any ideas why this is happening? > Could be a driver bug: > http://stackoverflow.com/questions/21241786/ > > What chipset is this running on? Also Intel? it is an old mac running an old version of OSX not sure about which one but definitely around 6 years old both machine and OS. I get it to do tests from a friend sometimes > Maybe the pyinstaller version uses a different codepath to trigger this? > (no accelerate module or something) |
From: Antoine M. <an...@na...> - 2016-11-16 04:35:02
|
On 21/10/16 02:55, enrike wrote: > Hi > > I have an app that uses PyQt4 and PyOpenGL. On latest mac OSX the app > runs fine from command line but when I pack it with PyInstaller I get > this error. > > Traceback (most recent call last): > File "site-packages/mirra/main.py", line 90, in resizeGL > File "site-packages/mirra/engine.py", line 183, in restart > File "errorchecker.pyx", line 53, in > OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError > (src/errorchecker.c:1218) > OpenGL.error.GLError: GLError( > err = 1286, > description = 'invalid framebuffer operation', > baseOperation = glClear, > cArguments = (16640,) > ) > > removing the glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) from > that line to a previous step in the program seems to solve the problem, > any ideas why this is happening? Could be a driver bug: http://stackoverflow.com/questions/21241786/ What chipset is this running on? Also Intel? Maybe the pyinstaller version uses a different codepath to trigger this? (no accelerate module or something) Cheers Antoine > > thanks > > enrike > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > |
From: enrike <al...@gm...> - 2016-10-20 19:55:21
|
Hi I have an app that uses PyQt4 and PyOpenGL. On latest mac OSX the app runs fine from command line but when I pack it with PyInstaller I get this error. Traceback (most recent call last): File "site-packages/mirra/main.py", line 90, in resizeGL File "site-packages/mirra/engine.py", line 183, in restart File "errorchecker.pyx", line 53, in OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError (src/errorchecker.c:1218) OpenGL.error.GLError: GLError( err = 1286, description = 'invalid framebuffer operation', baseOperation = glClear, cArguments = (16640,) ) removing the glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) from that line to a previous step in the program seems to solve the problem, any ideas why this is happening? thanks enrike |
From: Paul M. <pau...@su...> - 2016-10-07 15:27:38
|
Hi, With PyOpenGL 3.1.0 on Windows 8.1, Python 2.7 amd64 I get an exception in the call to glGetActiveAttrib in this piece of code: program = compileProgram(vertex_shader, fragment_shader) self.programs[name] = program print 'Program %d' % program # Get list of active uniforms active_uniforms = [] n_uniforms = glGetProgramiv(program, GL_ACTIVE_UNIFORMS) print '%d uniforms:' % n_uniforms for i in xrange(n_uniforms): name, size, type = glGetActiveUniform(program, i) # XXX could check actual type and location against what is registered location = glGetUniformLocation(program, name) print 'Uniform', name, size, type, location active_uniforms.append(name) self.active_uniforms[program] = active_uniforms # Get list of active attributes active_attributes = [] n_attributes = glGetProgramiv(program, GL_ACTIVE_ATTRIBUTES) print '%d attributes:' % n_attributes print glGetActiveAttrib for i in xrange(n_attributes): name, size, type = glGetActiveAttrib(program, i) # XXX could check actual type and location against what is registered location = glGetAttribLocation(program, name) print 'Attribute', name, size, type, location active_attributes.append(name) Relevant output: Program 3 4 uniforms: Uniform model_view_matrix 1 35676 2 Uniform normal_matrix 1 35675 5 Uniform projection_matrix 1 35676 1 Uniform view_matrix 1 35676 3 2 attributes: Traceback (most recent call last): File "cfd_vis.py", line 589, in <module> shader_registery.setup_shaders_gl() File "d:\projects\cfd-vis-git\stuff.py", line 321, in setup_shaders_gl name, size, type = glGetActiveAttrib(program, i) File "D:\Software\Python27-amd64\lib\site-packages\OpenGL\latebind.py", line 45, in __call__ return self._finalCall( *args, **named ) File "D:\Software\Python27-amd64\lib\site-packages\OpenGL\wrapper.py", line 653, in wrapperCall pyArgs = tuple( calculate_pyArgs( args )) File "D:\Software\Python27-amd64\lib\site-packages\OpenGL\wrapper.py", line 428, in calculate_pyArgs args ValueError: glGetActiveAttrib requires 3 arguments (program, index, bufSize, length, size, type, name), received 2: (3, 0) I don't understand what's going wrong. glGetActiveUniform and glGetActiveAttrib have exactly the same call signature and while glGetActiveUniform() succeeds glGetActiveAttrib() fails with a message that it expects 3 paramaters instead of 2. Any clues? Regards, Paul |
From: Okba B. <okb...@gm...> - 2016-08-21 23:00:22
|
Hi! because of the known multitexturing bug of pyOpenGL 3 on windows, I'm trying to build pyOpenGL 2.0.2.01 on python 2.7 in order to use it with the VisionEgg package, I had alredy installed the VC compiler for python 2.7 but I still get the vc error " Unable to find vcvarsall.bat" after running the setup.py script. What I want to know is if this even possible to build that version for my desired python version and if so what I'm missing. Thanks |
From: Ian M. <ia...@ge...> - 2016-08-19 09:47:19
|
On Thu, Aug 18, 2016 at 1:41 AM, Michael Bieri <mi...@gm...> wrote: > I'd like to use compute shaders with PyOpenGL. That will require OpenGL > 4.3. Currently I do not even know, what version is actually running on my > system. In general, I'm a bit lost... > So . . . like, *how* lost? Have you used compute shaders before? OpenGL before? PyOpenGL before? > So, first of all: How can I find out which version of PyOpenGL > Whichever version you installed. If you don't remember, try the following: import OpenGL print(OpenGL.version.__version__) Remember that, despite appearances, this is the PyOpenGL version--the package. It doesn't say anything about what the OpenGL context can do (that's also how it's possible to get this information without a GL context). > and OpenGL I have? > Create a context using your favorite windowing system. During that process, you choose (or it's done for you). If you're asking about what your system supports, look up your GPU name for GL support. Alternately, the program "GPU Caps Viewer" will measure the capability of your GPU/driver combination and report in-detail. Second, is it possible to update to OpenGL 4.3 > What precisely do you mean by this? > and an according PyOpenGL? What do I have to do (roughly)? > The latest PyOpenGL (currently 3.1.0, I believe) should support everything. It has a module for compute shaders, though I haven't used it myself. > I'm sorry, but currently I'm a bit confused about all this... > > Best regards, > Michael > Ian |
From: Michael B. <mi...@gm...> - 2016-08-18 08:41:33
|
Hi all I'd like to use compute shaders with PyOpenGL. That will require OpenGL 4.3. Currently I do not even know, what version is actually running on my system. In general, I'm a bit lost... So, first of all: How can I find out which version of PyOpenGL and OpenGL I have? Second, is it possible to update to OpenGL 4.3 and an according PyOpenGL? What do I have to do (roughly)? I'm sorry, but currently I'm a bit confused about all this... Best regards, Michael |
From: Nicolas P. R. <Nic...@in...> - 2016-08-12 10:21:56
|
I did, it's in the list... Nicolas > On 12 Aug 2016, at 12:00, Michael Bieri <mi...@gm...> wrote: > > Thanks Nicolas for that list, there are some interesting project. > > For the moment, I'd like to use rather simple, low-level stuff that gives me good access and an unobstructed view to what's going on on the GPU, as I might also want to do some non-graphic calculations closely related to the geometry on it. So high-level visualisation APIs like Mayavi are not the solution right now, as they also seem very "heavyweight" with a lot of dependencies. > > Is there a specific reason you did not recommend your own project, Glumpy? It seems to be a lean but powerful library. > > > On Fri, Aug 12, 2016 at 11:24 AM, Nicolas P. Rougier <Nic...@in...> wrote: > > > GLFW is a good choice for the context handling since glut is now deprecated. > You can find Python bindings at: https://github.com/rougier/pyglfw > > > For scientific visualization, you might be interested in: > http://glumpy.github.io and http://vispy.org > > > Pyglet (https://pyglet.readthedocs.io/en/pyglet-1.2-maintenance/) is great but it seems unmaintained and it does not use the dynamic pipeline (a.k.a. shaders) > > > For a very basic python tutorial on modern GL, you can have a look at: > http://glumpy.readthedocs.io/en/latest/tutorial/introduction.html > > > Next, you can look at library such as ogre (http://www.ogre3d.org) that provided python bindings. > Mayavi (http://docs.enthought.com/mayavi/mayavi/) is also worth a look and may have already solved your problem. > > > > Nicolas > > > > > > On 12 Aug 2016, at 11:10, Michael Bieri <mi...@gm...> wrote: > > > > Hi all > > > > I'm currently trying to dive into the world of 2D/3D graphics with OpenGL. I plan to use it for scientific visualisation. Normally I'll have data that's already close to input data for OpenGL, for example a list of points + a list of indices creating triangles form the points + a color value for each triangle. I plan to use it from Python. > > > > There's a lot of resources about OpenGL with Python, but I'm not quite sure what's state-of-the-art currently since some resources are several years old. So a few questions: > > - Is pyopengl still state-of-the-art or are there better Python bindings for a new project? > > - Which context library and which bindings is most recommended as of 2016? I think there's the choice between GLFW, OpenGL Context and GLUT, plus different bindings for each. > > > > It's relatively difficult to get good answers on these questions since not too many people do OpenGL with Python. So hopefully the mailing list can help a bit. > > > > Best regards > > Michael > > ------------------------------------------------------------------------------ > > What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic > > patterns at an interface-level. Reveals which users, apps, and protocols are > > consuming the most bandwidth. Provides multi-vendor support for NetFlow, > > J-Flow, sFlow and other flows. Make informed decisions using capacity > > planning reports. http://sdm.link/zohodev2dev_______________________________________________ > > PyOpenGL Homepage > > http://pyopengl.sourceforge.net > > _______________________________________________ > > PyOpenGL-Users mailing list > > PyO...@li... > > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > > |
From: Michael B. <mi...@gm...> - 2016-08-12 10:00:42
|
Thanks Nicolas for that list, there are some interesting project. For the moment, I'd like to use rather simple, low-level stuff that gives me good access and an unobstructed view to what's going on on the GPU, as I might also want to do some non-graphic calculations closely related to the geometry on it. So high-level visualisation APIs like Mayavi are not the solution right now, as they also seem very "heavyweight" with a lot of dependencies. Is there a specific reason you did not recommend your own project, Glumpy? It seems to be a lean but powerful library. On Fri, Aug 12, 2016 at 11:24 AM, Nicolas P. Rougier < Nic...@in...> wrote: > > > GLFW is a good choice for the context handling since glut is now > deprecated. > You can find Python bindings at: https://github.com/rougier/pyglfw > > > For scientific visualization, you might be interested in: > http://glumpy.github.io and http://vispy.org > > > Pyglet (https://pyglet.readthedocs.io/en/pyglet-1.2-maintenance/) is > great but it seems unmaintained and it does not use the dynamic pipeline > (a.k.a. shaders) > > > For a very basic python tutorial on modern GL, you can have a look at: > http://glumpy.readthedocs.io/en/latest/tutorial/introduction.html > > > Next, you can look at library such as ogre (http://www.ogre3d.org) that > provided python bindings. > Mayavi (http://docs.enthought.com/mayavi/mayavi/) is also worth a look > and may have already solved your problem. > > > > Nicolas > > > > > > On 12 Aug 2016, at 11:10, Michael Bieri <mi...@gm...> wrote: > > > > Hi all > > > > I'm currently trying to dive into the world of 2D/3D graphics with > OpenGL. I plan to use it for scientific visualisation. Normally I'll have > data that's already close to input data for OpenGL, for example a list of > points + a list of indices creating triangles form the points + a color > value for each triangle. I plan to use it from Python. > > > > There's a lot of resources about OpenGL with Python, but I'm not quite > sure what's state-of-the-art currently since some resources are several > years old. So a few questions: > > - Is pyopengl still state-of-the-art or are there better Python bindings > for a new project? > > - Which context library and which bindings is most recommended as of > 2016? I think there's the choice between GLFW, OpenGL Context and GLUT, > plus different bindings for each. > > > > It's relatively difficult to get good answers on these questions since > not too many people do OpenGL with Python. So hopefully the mailing list > can help a bit. > > > > Best regards > > Michael > > ------------------------------------------------------------ > ------------------ > > What NetFlow Analyzer can do for you? Monitors network bandwidth and > traffic > > patterns at an interface-level. Reveals which users, apps, and protocols > are > > consuming the most bandwidth. Provides multi-vendor support for NetFlow, > > J-Flow, sFlow and other flows. Make informed decisions using capacity > > planning reports. http://sdm.link/zohodev2dev___ > ____________________________________________ > > PyOpenGL Homepage > > http://pyopengl.sourceforge.net > > _______________________________________________ > > PyOpenGL-Users mailing list > > PyO...@li... > > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > > |
From: Nicolas P. R. <Nic...@in...> - 2016-08-12 09:24:38
|
GLFW is a good choice for the context handling since glut is now deprecated. You can find Python bindings at: https://github.com/rougier/pyglfw For scientific visualization, you might be interested in: http://glumpy.github.io and http://vispy.org Pyglet (https://pyglet.readthedocs.io/en/pyglet-1.2-maintenance/) is great but it seems unmaintained and it does not use the dynamic pipeline (a.k.a. shaders) For a very basic python tutorial on modern GL, you can have a look at: http://glumpy.readthedocs.io/en/latest/tutorial/introduction.html Next, you can look at library such as ogre (http://www.ogre3d.org) that provided python bindings. Mayavi (http://docs.enthought.com/mayavi/mayavi/) is also worth a look and may have already solved your problem. Nicolas > On 12 Aug 2016, at 11:10, Michael Bieri <mi...@gm...> wrote: > > Hi all > > I'm currently trying to dive into the world of 2D/3D graphics with OpenGL. I plan to use it for scientific visualisation. Normally I'll have data that's already close to input data for OpenGL, for example a list of points + a list of indices creating triangles form the points + a color value for each triangle. I plan to use it from Python. > > There's a lot of resources about OpenGL with Python, but I'm not quite sure what's state-of-the-art currently since some resources are several years old. So a few questions: > - Is pyopengl still state-of-the-art or are there better Python bindings for a new project? > - Which context library and which bindings is most recommended as of 2016? I think there's the choice between GLFW, OpenGL Context and GLUT, plus different bindings for each. > > It's relatively difficult to get good answers on these questions since not too many people do OpenGL with Python. So hopefully the mailing list can help a bit. > > Best regards > Michael > ------------------------------------------------------------------------------ > What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic > patterns at an interface-level. Reveals which users, apps, and protocols are > consuming the most bandwidth. Provides multi-vendor support for NetFlow, > J-Flow, sFlow and other flows. Make informed decisions using capacity > planning reports. http://sdm.link/zohodev2dev_______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users |
From: Michael B. <mi...@gm...> - 2016-08-12 09:11:04
|
Hi all I'm currently trying to dive into the world of 2D/3D graphics with OpenGL. I plan to use it for scientific visualisation. Normally I'll have data that's already close to input data for OpenGL, for example a list of points + a list of indices creating triangles form the points + a color value for each triangle. I plan to use it from Python. There's a lot of resources about OpenGL with Python, but I'm not quite sure what's state-of-the-art currently since some resources are several years old. So a few questions: - Is pyopengl still state-of-the-art or are there better Python bindings for a new project? - Which context library and which bindings is most recommended as of 2016? I think there's the choice between GLFW, OpenGL Context and GLUT, plus different bindings for each. It's relatively difficult to get good answers on these questions since not too many people do OpenGL with Python. So hopefully the mailing list can help a bit. Best regards Michael |
From: Ian M. <ia...@ge...> - 2016-07-22 20:58:09
|
Hey Mike, pip install -f https://blog.vrplumber.com/media/packages PyOpenGL > PyOpenGL-accelerate > Note: should probably add "--upgrade" to this. Also, I wasn't able to install/test on 2.6 since apparently 2.6 doesn't support pip's use of SSL correctly. I installed it on 2.7; pip reports that it downloaded "PyOpenGL-3.1.1.tar.gz", but that this produces an installation of "PyOpenGL-3.1.0b2". Before I run tests, is that intentional? Ian |
From: Mike L. <mik...@gm...> - 2016-07-22 20:47:38
|
Installed on OS X with python 2.7 from homebrew, install seemed to go fine but on running lesson1.py from PyOpenGL-Demo/NeHe I get the following error: Mikes-Air:NeHe mike$ python lesson1.py Traceback (most recent call last): File "lesson1.py", line 40, in <module> from OpenGL.GL import * File "/usr/local/lib/python2.7/site-packages/OpenGL/GL/__init__.py", line 4, in <module> from OpenGL.GL.VERSION.GL_1_1 import * File "/usr/local/lib/python2.7/site-packages/OpenGL/GL/VERSION/GL_1_1.py", line 14, in <module> from OpenGL.raw.GL.VERSION.GL_1_1 import * File "/usr/local/lib/python2.7/site-packages/OpenGL/raw/GL/VERSION/GL_1_1.py", line 7, in <module> from OpenGL.raw.GL import _errors File "/usr/local/lib/python2.7/site-packages/OpenGL/raw/GL/_errors.py", line 4, in <module> _error_checker = _ErrorChecker( _p, _p.GL.glGetError ) AttributeError: 'NoneType' object has no attribute 'glGetError' On Fri, Jul 22, 2016 at 5:14 PM, Mike C. Fletcher <mcf...@vr...> wrote: > Hi all, > > As many of you may have noticed, I've been rather absent in the PyOpenGL > world recently. The 3.1.1a1 release was a year and a half ago, and I got > distracted with trying to get AppVeyor to automatically build the C > extensions, then got busy at work and wanted to play with machine > learning in my spare time. Long story short, it's more than time to get > the 3.1.1 release out the door. > > Today I've landed a few changes that fix e.g. respecting LD_PRELOAD on > Linux (but which may negatively impact Darwin/OS-X, so need testing), a > few minor changes that should fix situations where you've specified > no-single-item-result unpacking but try to get shader/program logs, etc. > > The release *should* work on all of Python 2.7, 3.4 and 3.5 (and likely > on 2.6, but I don't have that in the test suite any more). The tox suite > runs without error on Linux amd64 (Ubuntu 16.04), but I'd like to see if > we run on Darwin (OSX) and Win32/64 before doing the final release. > Unless you have a wheel of pygame you likely won't be able to run the > tox suite, so please test with your real-world code. > > Because the testpypi server doesn't let me actually upload multiple > times, I've uploaded the proposed final release here: > > pip install -f https://blog.vrplumber.com/media/packages PyOpenGL > PyOpenGL-accelerate > > and I'm needing two groups to test (in particular): > > * windows users > * mac users > > as those are the platforms I don't have. > > I'm also expecting this will be the last release where the Launchpad > repository will be maintained. The github repository will become the > primary development environment moving forward, as that should make it > easier for people to propose patches etc. > > https://github.com/mcfletch/pyopengl > > Enjoy all, > Mike > > > > ------------------------------------------------------------------------------ > What NetFlow Analyzer can do for you? Monitors network bandwidth and > traffic > patterns at an interface-level. Reveals which users, apps, and protocols > are > consuming the most bandwidth. Provides multi-vendor support for NetFlow, > J-Flow, sFlow and other flows. Make informed decisions using capacity > planning > reports.http://sdm.link/zohodev2dev > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > |
From: Mike C. F. <mcf...@vr...> - 2016-07-22 20:30:13
|
Hi all, As many of you may have noticed, I've been rather absent in the PyOpenGL world recently. The 3.1.1a1 release was a year and a half ago, and I got distracted with trying to get AppVeyor to automatically build the C extensions, then got busy at work and wanted to play with machine learning in my spare time. Long story short, it's more than time to get the 3.1.1 release out the door. Today I've landed a few changes that fix e.g. respecting LD_PRELOAD on Linux (but which may negatively impact Darwin/OS-X, so need testing), a few minor changes that should fix situations where you've specified no-single-item-result unpacking but try to get shader/program logs, etc. The release *should* work on all of Python 2.7, 3.4 and 3.5 (and likely on 2.6, but I don't have that in the test suite any more). The tox suite runs without error on Linux amd64 (Ubuntu 16.04), but I'd like to see if we run on Darwin (OSX) and Win32/64 before doing the final release. Unless you have a wheel of pygame you likely won't be able to run the tox suite, so please test with your real-world code. Because the testpypi server doesn't let me actually upload multiple times, I've uploaded the proposed final release here: pip install -f https://blog.vrplumber.com/media/packages PyOpenGL PyOpenGL-accelerate and I'm needing two groups to test (in particular): * windows users * mac users as those are the platforms I don't have. I'm also expecting this will be the last release where the Launchpad repository will be maintained. The github repository will become the primary development environment moving forward, as that should make it easier for people to propose patches etc. https://github.com/mcfletch/pyopengl Enjoy all, Mike |
From: Uğur G. <ugu...@gm...> - 2016-05-29 14:16:41
|
Hi Ian, There are two basic ways to get functionality in GL. Either you load it > from an extension (which PyOpenGL handily does for you) or you use the core > API. The "Right Thing" is to use the core API if available, with a fallback > to the extension, with a fallback to a different algorithm. In practice, > people commonly pick one and go with it. I picked the extension, because > it's more widely compatible than core, but still not giving up on the > functionality entirely. > Thanks for sharing your wisdom with me! If I'll ever write a project for public I'll go with this "use the core if available and fallback to extensions if necessary" method. For now I'll stick with the core one for my study projects. PyGame is a very good software package, especially for low-perf 2D drawing. > It's how I got started in graphics programming and I recommend it still. It > is unfortunate that distributions haven't been made available, and this is > a source of active . . . consternation . . . on the PyGame list. Unofficial > pip wheels can be found here > <http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame>, or you can use the > (somewhat outdated) installers on the site > <http://www.pygame.org/download.shtml>. > Thanks for pointing out pip wheels for pygame. This way I'll be able to try it out. ^_^ Finally, I succeeded to do post-processing using an FBO! Here are screenshots of before and after the colored triange's pixels are inverted: http://imgur.com/a/P2wxt I removed all of the abstractions/classes in your code related to framebuffer and texture generation and pasted to my project and it worked! Then I compared your code with mine and found the source of the problem. When I generate the texture ID, if I use this expressions texture = GLuint() glGenTextures(1, texture) nothing is rendered on the texture. Generating texture ID this way works fine: texture = glGenTextures(1) I don't know whether this is a feature or a bug. :-) I was going with the former way (creating a GLuint object first, and manipulating it in the glGenX function by giving it as the second argument) because it looks more like the C/C++ OpenGL code I find on the Internet. And it works fine with glGenVertexArrays, glGenBuffers, glGenFramebuffers, and glGenRenderbuffers but not with glGenTextures. I updated the code to demonstrate this behavior: https://gist.github.com/vug/2c7953d5fdf750c727af249ded3e9018 Have a good day! u |
From: Ian M. <ia...@ge...> - 2016-05-28 20:32:57
|
> > I am using GLFW to generate the window, and my opengl version on OSX is > 4.1. You are using pygame for that purpose. Do you think that might be the > source of my problem? > I was at the airport, and couldn't answer this immediately. There are two basic ways to get functionality in GL. Either you load it from an extension (which PyOpenGL handily does for you) or you use the core API. The "Right Thing" is to use the core API if available, with a fallback to the extension, with a fallback to a different algorithm. In practice, people commonly pick one and go with it. I picked the extension, because it's more widely compatible than core, but still not giving up on the functionality entirely. The reason it didn't work for you is probably that GLFW created a forward-compatible-only GL context (which removes older extensions). If you instead request an ordinary context, the FBOs extension should work fine. OTOH, most computers nowadays, even Macs, support a high-enough core GL for the non-extension FBOs, so it sortof doesn't matter whether you pick the extension or the core. I wasn't able to "pip install pygame" to install pygame, hence I am > hesitant to use it. > PyGame is a very good software package, especially for low-perf 2D drawing. It's how I got started in graphics programming and I recommend it still. It is unfortunate that distributions haven't been made available, and this is a source of active . . . consternation . . . on the PyGame list. Unofficial pip wheels can be found here <http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame>, or you can use the (somewhat outdated) installers on the site <http://www.pygame.org/download.shtml>. By the way, I saw your amazing explanation on why y-axis should mean > upwards direction on your website: "Part of the problem was that Blender, > like many other modeling softwares use z for up, which is morally wrong > (TL;DR: If y is "up" in 2D (clue: it is), then it should also be "up" in > 3D; it's demented to redefine it to mean something literally orthogonal to > its original meaning when you simply add a new coordinate)" Even though, as > a physicist, I am in the "z is up" camp, I appreciated the persuasion power > and simplicity of your argument. Also, my girlfriend agrees with you. :-) > I'm glad you enjoyed it <http://geometrian.com/programming/tutorials/graphicstips/zaxis/index.php>! I must say, though, that it's unfortunately not one of my better argumentative pieces. In fact, it's probably my worst--even counting my incredibly poorly received rant on TTD. Rewriting it to be more coherent is on my (long) todo list. Ian |
From: Uğur G. <ugu...@gm...> - 2016-05-28 19:35:09
|
I did some more research. It looks like the EXT-framebuffer is deprecated: https://www.opengl.org/wiki/Framebuffer_Object#EXT_Framebuffer_object "EXT_Framebuffer_object Warning: This section describes legacy OpenGL APIs that have been removed from core OpenGL 3.1 and above" Hence, I assume that I should be good to go with non-EXT version. I also tried GLUT instead of GLFW, but that didn't solve my problem. I guess the library to create the window is not related to the framebuffer issue. I uploaded a newer version where you can choose between GLFW and GLUT, and between using offscreen framebuffer or not (via global variables WINDOW_LIBRARY and TRY_FRAMEBUFFER) here: https://gist.github.com/vug/2c7953d5fdf750c727af249ded3e9018 This is how I generate the framebuffer. fbo = GLuint() glGenFramebuffers(1, fbo) glBindFramebuffer(GL_FRAMEBUFFER, fbo) texture = GLuint() glGenTextures(1, texture) glBindTexture(GL_TEXTURE_2D, texture) glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST) glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST) glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, SIDE, SIDE, 0, GL_RGB, GL_UNSIGNED_BYTE, None) glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture, 0) rbo = GLuint() glGenRenderbuffers(1, rbo) glBindRenderbuffer(GL_RENDERBUFFER, rbo) glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, SIDE, SIDE) glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_RENDERBUFFER, rbo) if not glCheckFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE: print('framebuffer binding failed') exit() glBindFramebuffer(GL_FRAMEBUFFER, 0) glBindTexture(GL_TEXTURE_2D, 0) glBindRenderbuffer(GL_RENDERBUFFER, 0) Best, u On Sat, May 28, 2016 at 1:10 PM, Uğur Güney <ugu...@gm...> wrote: > Thanks for your response and sharing your code! > > I started looking at your code. You are using from OpenGL.GL.EXT > extensions by importing > > from OpenGL.GL.EXT.framebuffer_object import * > > I don't know what GL extensions are for in pyopengl, however, I tried to > move from non-extension version to EXT versions of GL functions. > Unfortunately, just at the beginning, calling the glGenFramebuffersEXT via > > fbo = glGenFramebuffersEXT(1) > > generates this error: > > OpenGL.error.NullFunctionError: Attempt to call an undefined function > glGenFramebuffersEXT, check for bool(glGenFramebuffersEXT) before calling > > Also bool(glGenFramebuffersEXT) return False, > whereas bool(glGenFramebuffers) is True. > > I am using GLFW to generate the window, and my opengl version on OSX is > 4.1. You are using pygame for that purpose. Do you think that might be the > source of my problem? > > I wasn't able to "pip install pygame" to install pygame, hence I am > hesitant to use it. But I'll try glut and other window generation options > to see whether framebuffer's work in them, or whether EXT functions can be > called. Does this make sense? > > PS: > By the way, I saw your amazing explanation on why y-axis should mean > upwards direction on your website: "Part of the problem was that Blender, > like many other modeling softwares use z for up, which is morally wrong > (TL;DR: If y is "up" in 2D (clue: it is), then it should also be "up" in > 3D; it's demented to redefine it to mean something literally orthogonal to > its original meaning when you simply add a new coordinate)" Even though, as > a physicist, I am in the "z is up" camp, I appreciated the persuasion power > and simplicity of your argument. Also, my girlfriend agrees with you. :-) > > Have a good day! > u > > On Fri, May 27, 2016 at 8:44 PM, Ian Mallett <ia...@ge...> wrote: > >> On Fri, May 27, 2016 at 5:35 PM, Uğur Güney <ugu...@gm...> wrote: >> >>> I am a beginner who studies OpenGL using PyOpenGL. I want to learn >>> post-processing effects and as the first step I want to be able to render a >>> scene into a FBO and then render that FBO on a quad that cover the whole >>> screen. >>> >>> The python code I am running is this: >>> https://gist.github.com/vug/2c7953d5fdf750c727af249ded3e9018 I combined >>> parts from several tutorials I found on the internet. >>> >> >> >>> I appreciate if anyone can direct me on how to render on an offscreen >>> framebuffer via PyOpenGL. >>> >> >> As another reference, you may like to consider some of my code. For >> example, I wrote a Game of Life simulator >> <http://geometrian.com/programming/projects/index.php?project=Game%20of%20Life> >> that uses FBOs (it actually uses two IIRC; feedback requires ping-ponging). >> The code is well-abstracted and reasonably well-tested, so it should serve >> as a good example. >> >> Ian >> > > |
From: Uğur G. <ugu...@gm...> - 2016-05-28 17:10:54
|
Thanks for your response and sharing your code! I started looking at your code. You are using from OpenGL.GL.EXT extensions by importing from OpenGL.GL.EXT.framebuffer_object import * I don't know what GL extensions are for in pyopengl, however, I tried to move from non-extension version to EXT versions of GL functions. Unfortunately, just at the beginning, calling the glGenFramebuffersEXT via fbo = glGenFramebuffersEXT(1) generates this error: OpenGL.error.NullFunctionError: Attempt to call an undefined function glGenFramebuffersEXT, check for bool(glGenFramebuffersEXT) before calling Also bool(glGenFramebuffersEXT) return False, whereas bool(glGenFramebuffers) is True. I am using GLFW to generate the window, and my opengl version on OSX is 4.1. You are using pygame for that purpose. Do you think that might be the source of my problem? I wasn't able to "pip install pygame" to install pygame, hence I am hesitant to use it. But I'll try glut and other window generation options to see whether framebuffer's work in them, or whether EXT functions can be called. Does this make sense? PS: By the way, I saw your amazing explanation on why y-axis should mean upwards direction on your website: "Part of the problem was that Blender, like many other modeling softwares use z for up, which is morally wrong (TL;DR: If y is "up" in 2D (clue: it is), then it should also be "up" in 3D; it's demented to redefine it to mean something literally orthogonal to its original meaning when you simply add a new coordinate)" Even though, as a physicist, I am in the "z is up" camp, I appreciated the persuasion power and simplicity of your argument. Also, my girlfriend agrees with you. :-) Have a good day! u On Fri, May 27, 2016 at 8:44 PM, Ian Mallett <ia...@ge...> wrote: > On Fri, May 27, 2016 at 5:35 PM, Uğur Güney <ugu...@gm...> wrote: > >> I am a beginner who studies OpenGL using PyOpenGL. I want to learn >> post-processing effects and as the first step I want to be able to render a >> scene into a FBO and then render that FBO on a quad that cover the whole >> screen. >> >> The python code I am running is this: >> https://gist.github.com/vug/2c7953d5fdf750c727af249ded3e9018 I combined >> parts from several tutorials I found on the internet. >> > > >> I appreciate if anyone can direct me on how to render on an offscreen >> framebuffer via PyOpenGL. >> > > As another reference, you may like to consider some of my code. For > example, I wrote a Game of Life simulator > <http://geometrian.com/programming/projects/index.php?project=Game%20of%20Life> > that uses FBOs (it actually uses two IIRC; feedback requires ping-ponging). > The code is well-abstracted and reasonably well-tested, so it should serve > as a good example. > > Ian > |
From: Ian M. <ia...@ge...> - 2016-05-28 00:45:15
|
On Fri, May 27, 2016 at 5:35 PM, Uğur Güney <ugu...@gm...> wrote: > I am a beginner who studies OpenGL using PyOpenGL. I want to learn > post-processing effects and as the first step I want to be able to render a > scene into a FBO and then render that FBO on a quad that cover the whole > screen. > > The python code I am running is this: > https://gist.github.com/vug/2c7953d5fdf750c727af249ded3e9018 I combined > parts from several tutorials I found on the internet. > > I appreciate if anyone can direct me on how to render on an offscreen > framebuffer via PyOpenGL. > As another reference, you may like to consider some of my code. For example, I wrote a Game of Life simulator <http://geometrian.com/programming/projects/index.php?project=Game%20of%20Life> that uses FBOs (it actually uses two IIRC; feedback requires ping-ponging). The code is well-abstracted and reasonably well-tested, so it should serve as a good example. Ian |