pyopengl-users Mailing List for PyOpenGL (Page 23)
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: SourceForge.net <no...@so...> - 2011-10-13 05:08:21
|
Feature Requests item #739335, was opened at 2003-05-18 04:08 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=355988&aid=739335&group_id=5988 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Tk Group: v2.1 Status: Open Resolution: None Priority: 4 Private: No Submitted By: Mike C. Fletcher (mcfletch) Assigned to: Nobody/Anonymous (nobody) Summary: Only create Tk root if necessary... Initial Comment: Importing the OpenGL.Tk module currently automatically creates a Tkinter root. Would be nice if this was only done if there is no root when creating an actual widget. Work-around is to do: from Tkinter import * my_root = Tk() from OpenGL.Tk import * But that's sub-optimal. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2011-10-13 05:08 Message: p5XExi <a href="http://kedxhepoqujd.com/">kedxhepoqujd</a>, [url=http://evpccagkcfpt.com/]evpccagkcfpt[/url], [link=http://utqlsgddkgig.com/]utqlsgddkgig[/link], http://bnijxxraehas.com/ ---------------------------------------------------------------------- Comment By: Rene Liebscher (rliebscher) Date: 2003-05-19 08:10 Message: Logged In: YES user_id=28463 Maybe moving some initialization code to first class use will do. Please check this. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=355988&aid=739335&group_id=5988 |
From: tolomea <go...@to...> - 2011-10-12 07:35:18
|
Version stuff: Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24) [GCC 4.5.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. import OpenGL OpenGL.__version__ '3.0.2a1' I'm using FORWARD_COMPATIBLE_ONLY, context version 3.3 and GLUT_CORE_PROFILE. I'm porting a working (same machine and environment etc) C program to Python, and the glGenVertexArrays function is giving me grief. The pythonic form: vao = glGenVertexArrays(1) produces "TypeError: this function takes at least 2 arguments" which I presume means it hasn't been wrapped yet. The ctypes form: vao = GLuint() glGenVertexArrays(1, ctypes.byref(vao)) produces: Traceback (most recent call last): File "main.py", line 230, in <module> main(sys.argv) File "main.py", line 221, in main init() File "main.py", line 155, in init glGenVertexArrays(1, ctypes.byref(vao)) File "/usr/local/lib/python2.7/dist-packages/OpenGL/platform/baseplatform.py", line 372, in __call__ return self( *args, **named ) File "/usr/local/lib/python2.7/dist-packages/OpenGL/error.py", line 208, in glCheckError baseOperation = baseOperation, OpenGL.error.GLError: GLError( err = 1280, description = 'invalid enumerant', baseOperation = glGenVertexArrays, cArguments = (1, <cparam 'P' (0xb74b9b48)>) ) I've no idea what could be causing that and googling hasn't turned up anything useful. Does anyone have any suggestions as to where to look? Are there any known working examples of using vertex array objects and pyopengl that I could cross check against? G |
From: Hugo G. <sou...@us...> - 2011-10-03 18:52:01
|
Hello, Whenever I zoom in to my NURBS objects my application suddenly becomes extremely slow thus unresponsive. But if I zoom back then everything runs smoothly. Has anyone got this similar problem, how can I rectify it? Thanks! |
From: Alejandro S. <as...@gm...> - 2011-09-19 17:22:26
|
Hey guys, I just ran into some issues while attempting to cx_Freeze an application that uses PyOpenGL. The build process would execute to completion, but upon trying to run the generated executable, I would get a message stating that the "win32" module could not be found. I'm posting the solution that worked for me, in case anyone ever runs into the same issue. What I had to do was to add the following imports: from OpenGL.GL import * import OpenGL.platform.win32 import OpenGL.arrays.ctypesarrays import OpenGL.arrays.numpymodule import OpenGL.arrays.lists import OpenGL.arrays.numbers import OpenGL.arrays.formathandler #import OpenGL.arrays.strings #Only if you use GLSL I got the original idea from this thread: http://www.mail-archive.com/cx-...@li.../msg00220.html. I just needed to add a couple of additional imports. Well, I hope this helps anyone. Best, Alejandro.- -- http://alejandrosegovia.net |
From: Ian M. <geo...@gm...> - 2011-09-14 14:24:58
|
On Wed, Sep 14, 2011 at 7:00 AM, René Dudfield <re...@gm...> wrote: > Hello, > > Ian, do you know how this can be done? I'm not sure it can yet. > > I've filed an issue on the pygame issue tracker. I've also asked on the > SDL mailing list if it is possible with SDL 1.2. I know it is possible with > SDL 1.3, but pygame doesn't use that yet. > > https://bitbucket.org/pygame/pygame/issue/85/creation-of-a-32-or-41-core-profile > > cheers, As far as I know, explicitly selecting the OpenGL version at context creation in SDL 1.2 isn't possible. I was referring more to SDL's ability to request various bit depthbuffers, colorbuffers, stencilbuffers, and it's support for creating multisampled contexts--none of which is (easily, if at all) available for GLUT. Plus, GLUT's command design pattern callbacks irk everyone I know. Typically, I just use extensions for advanced OpenGL. That's more portable anyway. Ian |
From: René D. <re...@gm...> - 2011-09-14 13:00:22
|
On Tue, Sep 13, 2011 at 9:11 PM, Alejandro Segovia <as...@gm...>wrote: > Hi René, > > On Tue, Sep 13, 2011 at 2:59 PM, René Dudfield <re...@gm...> wrote: > >> Hi, >> >> there are new binaries for python.org python and apple python on OSX. >> You can also install it via macports, or homebrew if you use those. >> > > I use macports as well. > > >> >> If you let me know what you want exposed from SDL I can expose it in >> pygame. >> > > It would be great if we could have a way to request the creation of a 3.2 > or 4.1 Core Profile context in pygame's set_display_mode function (or > equivalent). > > Think that could be done? > > Best, > Alejandro.- > > > -- > http://alejandrosegovia.net > > Hello, Ian, do you know how this can be done? I'm not sure it can yet. I've filed an issue on the pygame issue tracker. I've also asked on the SDL mailing list if it is possible with SDL 1.2. I know it is possible with SDL 1.3, but pygame doesn't use that yet. https://bitbucket.org/pygame/pygame/issue/85/creation-of-a-32-or-41-core-profile cheers, |
From: Mike C. F. <mcf...@vr...> - 2011-09-14 03:05:22
|
On 11-09-13 02:17 PM, T.J. Jankun-Kelly wrote: > So, now that I have a Core Proifle, forward compatible context (the only option on Lion), I get errors when loading PyOpenGL. I have the latest from bzr which included the patch for it, but the patch does not work because my OpenGL is firing an AttributeError, not a GLerror. So, after patching that (attached) I get an error deeper down: When wrapper tries to call glGetIntergerv. The odd thing is that is glGetIntegerv(GL_NUM_EXTENSIONS) works when I call it directly. > > > I'm attaching the error and the code that generates it. Help would be appreciated. On my Ubuntu machine, the code runs to completion, likely because my machine doesn't really honour the forward-compatible-only flag, so has a glGetString available. There was a bug in the glGetStringi return type that was causing it to attempt to instantiate ArrayDataType objects (which are not data objects, they are place holders). That may be a side-effect of some changes in Python 2.7's ctypes? Will have to investigate complex return types to be sure we're getting the right data-types everywhere. I've fixed the bug in glGetStringi for now in bzr head, but as I can't see a reason for the glGetIntegerv bug yet, I don't have a fix there. You may find that de-activating the accelerate module makes it easier to debug what is crashing (that's how I found the glGetStringi bug); just include: OpenGL.USE_ACCELERATE = False at the top of your main script and you can use pdb to trace into the operations being performed in wrapping the functions. You should not need the byref() around the arrayID, ctypes handles that automatically when you pass a primitive type in where an array is required. Good luck, and let me know if there's anything more I can help with. I have no forward-compatible-context test code at the moment, so this is all in "theoretically should work" territory. Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |
From: T.J. Jankun-K. <tj...@cs...> - 2011-09-13 19:30:45
|
On Sep 13, 2011, at 2:08 PM, Alejandro Segovia wrote: > This might sound incredibly silly, but may be worth testing. Have you tried calling glGenVertexArrays like so?: > > arrayID = glGenVertexArrays(1) > > Some PyOpenGL functions are "Pythonized" and can cause problems. > > Alejandro.- > Thanks, I had forgotten about that. Unfortunately that and its permutations: glGenVertexArrays(1, arrayID) glGenvertexArrays(1, [arrayID]) all generate the same error. TJK -- T.J. Jankun-Kelly Associate Professor (Visualization, Analytics & Gaming) Computer Science & Engineering, Mississippi State University http://www.cse.msstate.edu/~tjk/ @dr_tj |
From: Alejandro S. <as...@gm...> - 2011-09-13 19:11:59
|
Hi René, On Tue, Sep 13, 2011 at 2:59 PM, René Dudfield <re...@gm...> wrote: > Hi, > > there are new binaries for python.org python and apple python on OSX. You > can also install it via macports, or homebrew if you use those. > I use macports as well. > > If you let me know what you want exposed from SDL I can expose it in > pygame. > It would be great if we could have a way to request the creation of a 3.2 or 4.1 Core Profile context in pygame's set_display_mode function (or equivalent). Think that could be done? Best, Alejandro.- -- http://alejandrosegovia.net |
From: Alejandro S. <as...@gm...> - 2011-09-13 19:08:47
|
Hello TJ, === The code > #!/usr/bin/env pythonw > from __future__ import division > > from ctypes import * > > from glfw import * > from OpenGL.GL import * > > # Initialize GLFW > if not glfwInit(): > raise RuntimeError("glfw failed to initialize") > > # Open a 300x300 OpenGL window with an OpenGL 3.2 Core Profile context > glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 3) > glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, 2) > glfwOpenWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE) > glfwOpenWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE) > if not glfwOpenWindow(300, 300, 0,0,0,0,24,0, GLFW_WINDOW): > glfwTerminate() > raise RuntimeError("glfw could not create window") > > > # This is a test of glGetIntegerv. It doesn't crash when I call it directly > count = glGetIntegerv( GL_NUM_EXTENSIONS ) > print "count", count > > # Error occurs here > arrayID = GLuint() > glGenVertexArrays(1, byref(arrayID)) > This might sound incredibly silly, but may be worth testing. Have you tried calling glGenVertexArrays like so?: arrayID = glGenVertexArrays(1) Some PyOpenGL functions are "Pythonized" and can cause problems. Alejandro.- -- http://alejandrosegovia.net |
From: René D. <re...@gm...> - 2011-09-13 18:26:59
|
Hi, there are new binaries for python.org python and apple python on OSX. You can also install it via macports, or homebrew if you use those. If you let me know what you want exposed from SDL I can expose it in pygame. cheers, On Tue, Sep 13, 2011 at 1:36 AM, Greg Ewing <gre...@ca...>wrote: > T.J. Jankun-Kelly wrote: > > > Pygame was a bear last year to get running on my Mac; it never fully > > worked. I'd be reassured if someone has. > > I've gotten it to work on a number of Macs without much > difficulty. I have a local Python installation compiled > from source, though -- I don't know what the experience > is like for someone trying to install it all from binaries. > > As far as I remember, my approach was: > > * Install SDL framework binaries in /Library/Frameworks > * Compile and install libjpeg and libpng in /usr/local > * Compile and install pygame in local Python > > -- > Greg > > > ------------------------------------------------------------------------------ > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > Learn about the latest advances in developing for the > BlackBerry® mobile platform with sessions, labs & more. > See new tools and technologies. Register for BlackBerry® DevCon today! > http://p.sf.net/sfu/rim-devcon-copy1 > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > |
From: T.J. Jankun-K. <tj...@cs...> - 2011-09-13 18:25:43
|
On Sep 12, 2011, at 11:55 AM, Nicolas Rougier wrote: > > You can also use glfw (http://www.glfw.org), I've made bindings using ctypes (see attached files). > > Nicolas > > <defaults.py> > <events.py> > <glfw.py> > <listmodes.py> > Gratzi. Works like a charm. I'm getting other errors now (which I'll post soon), but glfw is working fine. TJK -- T.J. Jankun-Kelly Associate Professor (Visualization, Analytics & Gaming) Computer Science & Engineering, Mississippi State University http://www.cse.msstate.edu/~tjk/ @dr_tj |
From: T.J. Jankun-K. <tj...@cs...> - 2011-09-13 18:17:38
|
So, now that I have a Core Proifle, forward compatible context (the only option on Lion), I get errors when loading PyOpenGL. I have the latest from bzr which included the patch for it, but the patch does not work because my OpenGL is firing an AttributeError, not a GLerror. So, after patching that (attached) I get an error deeper down: When wrapper tries to call glGetIntergerv. The odd thing is that is glGetIntegerv(GL_NUM_EXTENSIONS) works when I call it directly. I'm attaching the error and the code that generates it. Help would be appreciated. TJK === The code #!/usr/bin/env pythonw from __future__ import division from ctypes import * from glfw import * from OpenGL.GL import * # Initialize GLFW if not glfwInit(): raise RuntimeError("glfw failed to initialize") # Open a 300x300 OpenGL window with an OpenGL 3.2 Core Profile context glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 3) glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, 2) glfwOpenWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE) glfwOpenWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE) if not glfwOpenWindow(300, 300, 0,0,0,0,24,0, GLFW_WINDOW): glfwTerminate() raise RuntimeError("glfw could not create window") # This is a test of glGetIntegerv. It doesn't crash when I call it directly count = glGetIntegerv( GL_NUM_EXTENSIONS ) print "count", count # Error occurs here arrayID = GLuint() glGenVertexArrays(1, byref(arrayID)) glfwTerminate() ==== === The error Traceback (most recent call last): File "error.py", line 29, in <module> glGenVertexArrays(1, byref(arrayID)) File "/Users/tjk/.virtualenvs/gfx/lib/python2.7/site-packages/PyOpenGL-3.0.2a1-py2.7.egg/OpenGL/platform/baseplatform.py", line 371, in __call__ if self.load(): File "/Users/tjk/.virtualenvs/gfx/lib/python2.7/site-packages/PyOpenGL-3.0.2a1-py2.7.egg/OpenGL/platform/baseplatform.py", line 351, in load if not platform.PLATFORM.checkExtension( self.extension ): File "/Users/tjk/.virtualenvs/gfx/lib/python2.7/site-packages/PyOpenGL-3.0.2a1-py2.7.egg/OpenGL/platform/baseplatform.py", line 246, in checkExtension result = extensions.hasGLExtension( name ) File "/Users/tjk/.virtualenvs/gfx/lib/python2.7/site-packages/PyOpenGL-3.0.2a1-py2.7.egg/OpenGL/extensions.py", line 58, in hasGLExtension count = glGetIntegerv( GL_NUM_EXTENSIONS ) File "/Users/tjk/.virtualenvs/gfx/lib/python2.7/site-packages/PyOpenGL-3.0.2a1-py2.7.egg/OpenGL/latebind.py", line 41, in __call__ return self._finalCall( *args, **named ) File "/Users/tjk/.virtualenvs/gfx/lib/python2.7/site-packages/PyOpenGL-3.0.2a1-py2.7.egg/OpenGL/wrapper.py", line 580, in wrapperCall raise err OpenGL.error.GLError: GLError( err = 1280, description = 'invalid enumerant', baseOperation = glGetIntegerv, pyArgs = (GL_NUM_EXTENSIONS,), cArgs = ( GL_NUM_EXTENSIONS, array([13], dtype=int32), ), cArguments = ( GL_NUM_EXTENSIONS, array([13], dtype=int32), ) ) ==== -- T.J. Jankun-Kelly Associate Professor (Visualization, Analytics & Gaming) Computer Science & Engineering, Mississippi State University http://www.cse.msstate.edu/~tjk/ @dr_tj |
From: Greg E. <gre...@ca...> - 2011-09-13 03:36:00
|
T.J. Jankun-Kelly wrote: > Pygame was a bear last year to get running on my Mac; it never fully > worked. I'd be reassured if someone has. I've gotten it to work on a number of Macs without much difficulty. I have a local Python installation compiled from source, though -- I don't know what the experience is like for someone trying to install it all from binaries. As far as I remember, my approach was: * Install SDL framework binaries in /Library/Frameworks * Compile and install libjpeg and libpng in /usr/local * Compile and install pygame in local Python -- Greg |
From: Henry G. <he...@ca...> - 2011-09-12 18:59:36
|
My code is reliant on the ARB_sync extension. Under linux, the mesa Intel driver supports it fine with the Intel GM965 video card. Under Windows, however, I don't seem to have the extension available ( bool(glFenceSync) is False), despite using the latest driver. Is there any workaround for this? Clearly the hardware supports it on some level. I know this might be better asked on an OpenGL list, but I was wondering if there might be some experience here. Cheers, Henry |
From: Mark L. <mar...@pe...> - 2011-09-12 18:23:01
|
On further investigation, the class KFbxXMatrix is part of the Autodesk FBX Api. I'll check with that Discussion Group about the proper usage. Thanks for the comments. Mark |
From: Nicolas R. <Nic...@in...> - 2011-09-12 16:55:58
|
You can also use glfw (http://www.glfw.org), I've made bindings using ctypes (see attached files). Nicolas On Sep 12, 2011, at 17:14 , T.J. Jankun-Kelly wrote: > > On Sep 12, 2011, at 9:28 AM, Ian Mallett wrote: >> >> I highly recommend SDL as a cross-platform windowing library. Has much better context creation support from GLUT. In Python, that's PyGame. PyGame and PyOpenGL should theoretically work on all platforms. > > > Pygame was a bear last year to get running on my Mac; it never fully worked. I'd be reassured if someone has. > > Also, at this point, I see no documentation about getting a Core Profile context in PyGame. SDL has support, but I don't see it being passed onto PyGame yet (checked the bitbucket src; its doesn't seem to have the write constants). > > TJK > > -- > T.J. Jankun-Kelly > Associate Professor (Visualization, Analytics & Gaming) > Computer Science & Engineering, Mississippi State University > http://www.cse.msstate.edu/~tjk/ @dr_tj > > ------------------------------------------------------------------------------ > Doing More with Less: The Next Generation Virtual Desktop > What are the key obstacles that have prevented many mid-market businesses > from deploying virtual desktops? How do next-generation virtual desktops > provide companies an easier-to-deploy, easier-to-manage and more affordable > virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/_______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users |
From: T.J. Jankun-K. <tj...@cs...> - 2011-09-12 15:14:41
|
On Sep 12, 2011, at 9:28 AM, Ian Mallett wrote: > > I highly recommend SDL as a cross-platform windowing library. Has much better context creation support from GLUT. In Python, that's PyGame. PyGame and PyOpenGL should theoretically work on all platforms. Pygame was a bear last year to get running on my Mac; it never fully worked. I'd be reassured if someone has. Also, at this point, I see no documentation about getting a Core Profile context in PyGame. SDL has support, but I don't see it being passed onto PyGame yet (checked the bitbucket src; its doesn't seem to have the write constants). TJK -- T.J. Jankun-Kelly Associate Professor (Visualization, Analytics & Gaming) Computer Science & Engineering, Mississippi State University http://www.cse.msstate.edu/~tjk/ @dr_tj |
From: Ian M. <geo...@gm...> - 2011-09-12 14:47:54
|
On Sun, Sep 11, 2011 at 5:49 PM, Mark Laff <mar...@pe...>wrote: > ** > Newb to both Python and OpenGL, so this may be a trivial question. > > I have C > C++ > sample code which looks like: > > void GlDrawCrossHair(KFbxXMatrix& pGlobalPosition) > { > glColor3f(1.0, 1.0, 1.0); > glLineWidth(1.0); > > glPushMatrix(); > glMultMatrixd((double*) pGlobalPosition); > ... > > but when I try to write, in Python: > > > def DrawCrosshair(pGlobalPosition): > glColor3f(1.0,1.0,1.0) > glLineWidth(1.0) > > glPushMatrix() > glMultMatrixd(pGlobalPosition) > > In your C++ code, class KFbxXMatrix probably has some specified way to convert to an array of type double. You'll need to do whatever the equivalent is in Python; i.e., glMultMatrixd(*pGlobalPosition.getArray()) or whatever. Ian |
From: Alejandro S. <as...@gm...> - 2011-09-12 14:47:29
|
Hello Mark, On Sun, Sep 11, 2011 at 8:49 PM, Mark Laff <mar...@pe...>wrote: > ** > > def DrawCrosshair(pGlobalPosition): > glColor3f(1.0,1.0,1.0) > glLineWidth(1.0) > > glPushMatrix() > glMultMatrixd(pGlobalPosition) > > TypeError: ("No array-type handler for type <class 'fbx.KFbxXMatrix'> > (value: <fbx.KFbxXMatrix object at 0x0000000003AE01C8>) registered", > <function asArraySize at 0x00000000035C5CF8>) > GLUT Display callback <function display at 0x0000000003954CF8> with (),{} > failed: returning None ("No array-type handler for type <class > 'fbx.KFbxXMatrix'> (value: <fbx.KFbxXMatrix object at 0x0000000003AE01C8>) > registered", <function asArraySize at 0x00000000035C5CF8>) > > The error message leads me to believe the problem is related to the type of the pGlobalPosition variable. Is there any easy way you could convert a "fbx.KFbxXMatrix" instance to a numpy array or a Python list? Best, Alejandro.- -- http://alejandrosegovia.net |
From: Mike C. F. <mcf...@vr...> - 2011-09-12 14:38:53
|
On 11-09-11 11:50 PM, T.J. Jankun-Kelly wrote: > I'm adapting my Computer Graphics class to the 3.2 Core Profile (as it > is now supported by OS X). However, GLUT.framework does not expose > methods to create contexts before creating windows (so I can't request > a 3.2 context) and freeglut is X based, not Cocoa, so I'm not sure if > it'll work (and I'd rather not go X). So, a few questions: > > - Has anyone gotten PyOpenGL and OpenGL 3.2 to work on OS X? With what > means of generating/managing windows? > - Similar question for Windows. The Glut interface for PyOpenGL does't > expose the freeglut glutInitContextVersion et al so I'm not sure how > one would do about it there. Those extensions in FreeGLUT are present in bzr head, which should be out as PyOpenGL 3.0.2a1 in a few hours, if nothing goes terribly wrong. HTH, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |
From: Ian M. <geo...@gm...> - 2011-09-12 14:28:46
|
On Sun, Sep 11, 2011 at 9:50 PM, T.J. Jankun-Kelly <tj...@cs...>wrote: > I'm adapting my Computer Graphics class to the 3.2 Core Profile (as it is > now supported by OS X). However, GLUT.framework does not expose methods to > create contexts before creating windows (so I can't request a 3.2 context) > and freeglut is X based, not Cocoa, so I'm not sure if it'll work (and I'd > rather not go X). So, a few questions: > > - Has anyone gotten PyOpenGL and OpenGL 3.2 to work on OS X? With what > means of generating/managing windows? > - Similar question for Windows. The Glut interface for PyOpenGL does't > expose the freeglut glutInitContextVersion et al so I'm not sure how one > would do about it there. > > Thanks for any assistance. > > TJK > I highly recommend SDL as a cross-platform windowing library. Has much better context creation support from GLUT. In Python, that's PyGame. PyGame and PyOpenGL should theoretically work on all platforms. |
From: Nicolas R. <Nic...@in...> - 2011-09-12 08:16:55
|
Thanks ! I now see the GLUT.glutWMCloseFunc. Most probably I did not test it properly in the first place. By the way, I added a glut interactive mode to the ipython shell. https://github.com/rougier/ipython/tree/glut May come handy to test code interactively. Nicolas On Sep 4, 2011, at 23:31 , Mike C. Fletcher wrote: > On 11-08-26 08:21 AM, Nicolas Rougier wrote: >> >> >> Hi everybody, >> >> >> While having a look at glut headers on OSX, I realized that there are >> a glutCheckLoop and a glutWMCloseFunc functions but they are not >> exported through OpenGL.GLUT. > > glutWMCloseFunc *should* be available from the freeglut extensions by > default (IIUC it's actually a deprecated version of glutCloseFunc()). > glutCheckLoop appears to be solving the same problem as FreeGLUT's > glutMainLoopEvent call, apparently from Rob Fletcher's GLUT patches. > I've added it to the wrapper in an os-x specific module (it will > evaluate to bool(False) if the function is not defined, as with > everything else). > > So, do you not see glutWMCloseFunc in OpenGL.GLUT ? If you don't with > bzr head, then there's a bug somewhere. > > python -c "from OpenGL import GLUT; print GLUT.glutWMCloseFunc" > > HTH, > Mike > > -- > ________________________________________________ > Mike C. Fletcher > Designer, VR Plumber, Coder > http://www.vrplumber.com > http://blog.vrplumber.com > > > ------------------------------------------------------------------------------ > Special Offer -- Download ArcSight Logger for FREE! > Finally, a world-class log management solution at an even better > price-free! And you'll get a free "Love Thy Logs" t-shirt when you > download Logger. Secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsisghtdev2dev > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users |
From: T.J. Jankun-K. <tj...@cs...> - 2011-09-12 04:04:25
|
I'm adapting my Computer Graphics class to the 3.2 Core Profile (as it is now supported by OS X). However, GLUT.framework does not expose methods to create contexts before creating windows (so I can't request a 3.2 context) and freeglut is X based, not Cocoa, so I'm not sure if it'll work (and I'd rather not go X). So, a few questions: - Has anyone gotten PyOpenGL and OpenGL 3.2 to work on OS X? With what means of generating/managing windows? - Similar question for Windows. The Glut interface for PyOpenGL does't expose the freeglut glutInitContextVersion et al so I'm not sure how one would do about it there. Thanks for any assistance. TJK -- T.J. Jankun-Kelly Associate Professor (Visualization, Analytics & Gaming) Computer Science & Engineering, Mississippi State University http://www.cse.msstate.edu/~tjk/ @dr_tj |
From: Mark L. <mar...@pe...> - 2011-09-12 00:16:11
|
Newb to both Python and OpenGL, so this may be a trivial question. I have C sample code which looks like: void GlDrawCrossHair(KFbxXMatrix& pGlobalPosition) { glColor3f(1.0, 1.0, 1.0); glLineWidth(1.0); glPushMatrix(); glMultMatrixd((double*) pGlobalPosition); ... but when I try to write, in Python: def DrawCrosshair(pGlobalPosition): glColor3f(1.0,1.0,1.0) glLineWidth(1.0) glPushMatrix() glMultMatrixd(pGlobalPosition) I get: ... File "C:/Users/Mark/Documents/Projects/MICA/MicaPython/Mica.py", line 141, in DrawCrosshair glMultMatrixd(pGlobalPosition) File "C:\Python26\lib\site-packages\OpenGL\latebind.py", line 45, in __call__ return self._finalCall( *args, **named ) File "C:\Python26\lib\site-packages\OpenGL\wrapper.py", line 569, in wrapperCall pyArgs = tuple( calculate_pyArgs( args )) File "C:\Python26\lib\site-packages\OpenGL\wrapper.py", line 354, in calculate_pyArgs yield converter(args[index], self, args) File "C:\Python26\lib\site-packages\OpenGL\arrays\arrayhelpers.py", line 110, in asArraySize handler = typ.getHandler( incoming ) File "C:\Python26\lib\site-packages\OpenGL\arrays\arraydatatype.py", line 52, in __call__ typ, repr(value)[:50] TypeError: ("No array-type handler for type <class 'fbx.KFbxXMatrix'> (value: <fbx.KFbxXMatrix object at 0x0000000003AE01C8>) registered", <function asArraySize at 0x00000000035C5CF8>) GLUT Display callback <function display at 0x0000000003954CF8> with (),{} failed: returning None ("No array-type handler for type <class 'fbx.KFbxXMatrix'> (value: <fbx.KFbxXMatrix object at 0x0000000003AE01C8>) registered", <function asArraySize at 0x00000000035C5CF8>) This must be a simple operation but I cannot find any examples to go by. I'm running on Windows Vista, Python 2.6.6, and PyOpenGl 3.0.1. Thanks in advance, Mark |