pyopengl-users Mailing List for PyOpenGL (Page 47)
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: Mads I. <mp...@co...> - 2009-09-24 06:48:24
|
How come glGetString(GL_VENDOR) returns None if I don't have an OpenGL context? My innocent purpose of querying the vendor string is to display some driver info in an 'about box'. Normally I get the context by launching a QGLWidget from Qt, but it would be really silly to do this for the purpose of displaying an about box. All tricks and suggestions are most welcome, Mads -- +------------------------------------------------------------+ | Mads Ipsen, Scientific developer | +------------------------------+-----------------------------+ | QuantumWise A/S | phone: +45-29716388 | | Nørresøgade 27A | www: www.quantumwise.com | | DK-1370 Copenhagen, Denmark | email: mp...@qu... | +------------------------------+-----------------------------+ |
From: Gijs <in...@bs...> - 2009-09-11 21:31:05
|
On 11-9-2009 20:03, Mike C. Fletcher wrote: > Mike C. Fletcher wrote: > >> Gijs wrote: >> >> >>> Hey List, >>> >>> I'm trying to use PBOs for the first time so I'm not completely aware >>> of what I'm doing with the code I found on this site >>> <http://www.mathematik.uni-dortmund.de/%7Egoeddeke/gpgpu/tutorial3.html>. >>> One thing I do know is that the code I can execute in C, I cannot >>> execute in Python. This has to do with a piece of code that makes use >>> of glBufferData and its 4th argument, namely "size". >>> >>> >> This looks like a real API failing in the wrapper. Basically I didn't >> realize that passing in a NULL with a real size was valid when I did >> that wrapper, now even if I didn't I likely wouldn't have wrapped it >> quite that way (i.e. I would have made a wrapper that allowed passing >> size or not, instead of always taking size from the array). Will have >> to rework the function's wrapper to allow passing in size explicitly. >> >> Thanks for pointing out the problem, >> Mike >> >> > I've finally got the fix for this published on PyPI. (i.e. a new alpha > release of PyOpenGL is up) > > Take care, > Mike > > Great, thanks for the fix, Gijs |
From: Mike C. F. <mcf...@vr...> - 2009-09-11 18:03:55
|
Mike C. Fletcher wrote: > Gijs wrote: > >> Hey List, >> >> I'm trying to use PBOs for the first time so I'm not completely aware >> of what I'm doing with the code I found on this site >> <http://www.mathematik.uni-dortmund.de/%7Egoeddeke/gpgpu/tutorial3.html>. >> One thing I do know is that the code I can execute in C, I cannot >> execute in Python. This has to do with a piece of code that makes use >> of glBufferData and its 4th argument, namely "size". >> > This looks like a real API failing in the wrapper. Basically I didn't > realize that passing in a NULL with a real size was valid when I did > that wrapper, now even if I didn't I likely wouldn't have wrapped it > quite that way (i.e. I would have made a wrapper that allowed passing > size or not, instead of always taking size from the array). Will have > to rework the function's wrapper to allow passing in size explicitly. > > Thanks for pointing out the problem, > Mike > I've finally got the fix for this published on PyPI. (i.e. a new alpha release of PyOpenGL is up) Take care, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |
From: René D. <re...@gm...> - 2009-09-04 08:38:15
|
Hi, remember that you can use the OpenGL.raw.GL calls... which are more direct wrappers. Sometimes easier to use if you have a bug/can't figure out how to use the normal python wrappers. Of course then you need to know ctypes... but that's not too hard. cheers, On Sun, Aug 30, 2009 at 9:18 PM, Gijs<in...@bs...> wrote: > Hey List, > > I'm trying to use PBOs for the first time so I'm not completely aware of > what I'm doing with the code I found on this site. One thing I do know is > that the code I can execute in C, I cannot execute in Python. This has to do > with a piece of code that makes use of glBufferData and its 4th argument, > namely "size". > > The C code: > glBindBuffer(GL_PIXEL_PACK_BUFFER_ARB, thebuffer); > glBufferData(GL_PIXEL_PACK_BUFFER_ARB,4*sizeof(float), NULL, > GL_STREAM_READ); > glReadPixels (0, 0, 1, 1, GL_RGBA, GL_FLOAT, 0); > void* mem = glMapBuffer(GL_PIXEL_PACK_BUFFER_ARB, GL_READ_ONLY); > assert(mem); > glUnmapBuffer(GL_PIXEL_PACK_BUFFER_ARB); > glBindBuffer(GL_PIXEL_PACK_BUFFER_ARB, 0); > > Python Code: > glBindBuffer(GL_PIXEL_PACK_BUFFER_ARB, thebuffer) > glBufferData(GL_PIXEL_PACK_BUFFER_ARB,None, GL_STREAM_READ) > glReadPixels (0, 0, 1, 1, GL_RGBA, GL_FLOAT, 0) > mem = glMapBuffer(GL_PIXEL_PACK_BUFFER_ARB, GL_READ_ONLY) > glUnmapBuffer(GL_PIXEL_PACK_BUFFER_ARB) > glBindBuffer(GL_PIXEL_PACK_BUFFER_ARB, 0) > > Since I cannot specify 4 arguments for glBufferData, as I can do in C, the > code I execute in Python is doing something different than the C version. > This results in an OpenGL error 1282 (invalid operation) when I call > glReadPixels. I guess when the interface for this function was written, it > was never expected to be called like this. A normal call would supply a > variable, and PyOpenGL would be able to determine the size, so the size > argument wouldn't be needed. Too bad in a case like this, it is needed, as > far as I can see. Or is there some other way of accessing this function? > > Regards, Gijs > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > 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...> - 2009-09-01 19:25:22
|
Gijs wrote: > Hey List, > > I'm trying to use PBOs for the first time so I'm not completely aware > of what I'm doing with the code I found on this site > <http://www.mathematik.uni-dortmund.de/%7Egoeddeke/gpgpu/tutorial3.html>. > One thing I do know is that the code I can execute in C, I cannot > execute in Python. This has to do with a piece of code that makes use > of glBufferData and its 4th argument, namely "size". This looks like a real API failing in the wrapper. Basically I didn't realize that passing in a NULL with a real size was valid when I did that wrapper, now even if I didn't I likely wouldn't have wrapped it quite that way (i.e. I would have made a wrapper that allowed passing size or not, instead of always taking size from the array). Will have to rework the function's wrapper to allow passing in size explicitly. Thanks for pointing out the problem, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |
From: Ian M. <geo...@gm...> - 2009-08-30 21:16:41
|
Bump/check-the-list-got-it-cause-the-attachments-were-big |
From: Gijs <in...@bs...> - 2009-08-30 20:18:26
|
Hey List, I'm trying to use PBOs for the first time so I'm not completely aware of what I'm doing with the code I found on this site <http://www.mathematik.uni-dortmund.de/%7Egoeddeke/gpgpu/tutorial3.html>. One thing I do know is that the code I can execute in C, I cannot execute in Python. This has to do with a piece of code that makes use of glBufferData and its 4th argument, namely "size". The C code: glBindBuffer(GL_PIXEL_PACK_BUFFER_ARB, thebuffer); glBufferData(GL_PIXEL_PACK_BUFFER_ARB,4*sizeof(float), NULL, GL_STREAM_READ); glReadPixels (0, 0, 1, 1, GL_RGBA, GL_FLOAT, 0); void* mem = glMapBuffer(GL_PIXEL_PACK_BUFFER_ARB, GL_READ_ONLY); assert(mem); glUnmapBuffer(GL_PIXEL_PACK_BUFFER_ARB); glBindBuffer(GL_PIXEL_PACK_BUFFER_ARB, 0); Python Code: glBindBuffer(GL_PIXEL_PACK_BUFFER_ARB, thebuffer) glBufferData(GL_PIXEL_PACK_BUFFER_ARB,None, GL_STREAM_READ) glReadPixels (0, 0, 1, 1, GL_RGBA, GL_FLOAT, 0) mem = glMapBuffer(GL_PIXEL_PACK_BUFFER_ARB, GL_READ_ONLY) glUnmapBuffer(GL_PIXEL_PACK_BUFFER_ARB) glBindBuffer(GL_PIXEL_PACK_BUFFER_ARB, 0) Since I cannot specify 4 arguments for glBufferData, as I can do in C, the code I execute in Python is doing something different than the C version. This results in an OpenGL error 1282 (invalid operation) when I call glReadPixels. I guess when the interface for this function was written, it was never expected to be called like this. A normal call would supply a variable, and PyOpenGL would be able to determine the size, so the size argument wouldn't be needed. Too bad in a case like this, it is needed, as far as I can see. Or is there some other way of accessing this function? Regards, Gijs |
From: Gijs <in...@bs...> - 2009-08-27 09:11:50
|
Apart from needing to call glUseProgram before you can ask its uniform location, your vertex or fragment shader also needs to use the variables in the shader itself. If you don't use them, the shader-compiler will optimize the program so that the variable doesn't exist (since it's not used anyway, it wouldn't really matter), thereby saving memory. The uniform location of a shader variable which doesn't exist or is not used is -1. Not defining the version of the shader afaik doesn't really matter on Windows or Linux, except for special cases, however on Mac OS X you hardly can do without. Mac OS X is quite strict in things like that. You need to define the extensions you use as well, even though Windows and Linux both have no problem if you don't specify them. (I think it does give you a warning of some sorts though). Regards, Gijs PS: You don't have to put GLUT. or GL. in front of every call to glut or the GL. Since you imported them, you have direct access to the functions defined in glut and the GL. On 8/26/09 20:39 , Ian Mallett wrote: > Firstly, you probably don't want to specify the version in the vertex > shader unless you're sure of your system. I also don't know what > happens if you don't specify anything under the main function. Try > using: "void main { gl_Position = ftransform(); }". As to your > problem, I presume the uniform location is returning -1? You need to > use the shader before you can query values from it. I think it's > glUseProgram() > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > ------------------------------------------------------------------------ > > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > |
From: Ian M. <geo...@gm...> - 2009-08-26 18:39:48
|
Firstly, you probably don't want to specify the version in the vertex shader unless you're sure of your system. I also don't know what happens if you don't specify anything under the main function. Try using: "void main { gl_Position = ftransform(); }". As to your problem, I presume the uniform location is returning -1? You need to use the shader before you can query values from it. I think it's glUseProgram() |
From: Ben De L. <bd...@gm...> - 2009-08-26 16:58:05
|
I have this simple test program distilled from a more complex code base, I am using glGetUniformLocation incorrectly but I am not sure what the correct syntax is. Any hits are appreciated! from OpenGL import GL from OpenGL import GLU from OpenGL import GLUT import sys simpleShader = ''' #version 140 uniform int test; void main() { ; } ''' def init(): # select clearing color GL.glClearColor (0.0, 0.0, 0.0, 0.0) # initialize viewing values GL.glMatrixMode(GL.GL_PROJECTION) GL.glLoadIdentity() GL.glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0) shader = GL.glCreateShader(GL.GL_VERTEX_SHADER) GL.glShaderSource(shader, simpleShader) GL.glCompileShader(shader) print GL.glGetShaderInfoLog(shader) program = GL.glCreateProgram() GL.glAttachShader(program, shader) GL.glLinkProgram(program) loc = GL.glGetUniformLocation(program, "test") print loc def display(): GL.glClear (GL.GL_COLOR_BUFFER_BIT) GL.glColor3f (1.0, 1.0, 1.0) GL.glBegin(GL.GL_POLYGON) GL.glVertex3f (0.25, 0.25, 0.0) GL.glVertex3f (0.75, 0.25, 0.0) GL.glVertex3f (0.75, 0.75, 0.0) GL.glVertex3f (0.25, 0.75, 0.0) GL.glEnd() GL.glFlush (); GLUT.glutInit(sys.argv) GLUT.glutInitDisplayMode(GLUT.GLUT_SINGLE | GLUT.GLUT_RGB) GLUT.glutInitWindowSize(250, 250) GLUT.glutInitWindowPosition(100, 100) GLUT.glutCreateWindow("hello") init() GLUT.glutDisplayFunc(display) GLUT.glutMainLoop() |
From: Mike C. F. <mcf...@vr...> - 2009-08-22 23:35:09
|
Joshua Davis wrote: > This issue has been resolved. The fault (if any) is not in PyOpenGL. > > I've written three C test programs to match my three Python test > programs, and the C versions behave identically to the Python > versions. It seems that my hardware/driver/OS combination doesn't > support setting attribute variables using glVertexAttribPointer(), > even though it supports setting attribute variables with > glVertexAttrib4f(), etc. (Incidentally, the Mac OS 10.5 driver for > the Radeon 9600 supports OpenGL 2.0, but the Mac OS 10.4 driver > supports only OpenGL 1.5.) > > Thanks everyone for your help -- especially Mike. Cheers. > Thanks for the update. Nice to know we don't have a PyOpenGL bug (here). I'll add a note to the tutorial regarding the glVertexAttribPointer issue on Macs with that Radeon. Enjoy, Mike > On 2009 Aug 19 , at 5:35 PM, Joshua Davis wrote: > > >> On 2009 Aug 19 , at 11:59 AM, Mike C. Fletcher wrote: >> >> >>> Would be nice if we could confirm that this machine can handle >>> attributes at all (so we know whether this is a problem with the >>> wrapper >>> or the driver). >>> >> I am attaching a new program and its debugging output. This program >> uses the legacy glVertexPointer() to specify the vertices, but uses >> a "color" attribute variable to specify a single color. It works >> correctly; changing "color" to yellow or magenta causes all >> fragments to be that color. So my machine/driver/wrapper can handle >> individual attribute variables, but it has a problem with attribute >> arrays? >> >> I'm going to try to get attribute arrays working from C, as you >> suggested in your other message. (The specs I've found online for >> the Radeon 9600 are too vague to be useful.) Until then I'll stop >> pestering you. Thanks for your help! >> > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |
From: Joshua D. <joshuardavis@q.com> - 2009-08-21 21:04:03
|
This issue has been resolved. The fault (if any) is not in PyOpenGL. I've written three C test programs to match my three Python test programs, and the C versions behave identically to the Python versions. It seems that my hardware/driver/OS combination doesn't support setting attribute variables using glVertexAttribPointer(), even though it supports setting attribute variables with glVertexAttrib4f(), etc. (Incidentally, the Mac OS 10.5 driver for the Radeon 9600 supports OpenGL 2.0, but the Mac OS 10.4 driver supports only OpenGL 1.5.) Thanks everyone for your help -- especially Mike. Cheers. Josh On 2009 Aug 19 , at 5:35 PM, Joshua Davis wrote: > On 2009 Aug 19 , at 11:59 AM, Mike C. Fletcher wrote: > >> Would be nice if we could confirm that this machine can handle >> attributes at all (so we know whether this is a problem with the >> wrapper >> or the driver). > > I am attaching a new program and its debugging output. This program > uses the legacy glVertexPointer() to specify the vertices, but uses > a "color" attribute variable to specify a single color. It works > correctly; changing "color" to yellow or magenta causes all > fragments to be that color. So my machine/driver/wrapper can handle > individual attribute variables, but it has a problem with attribute > arrays? > > I'm going to try to get attribute arrays working from C, as you > suggested in your other message. (The specs I've found online for > the Radeon 9600 are too vague to be useful.) Until then I'll stop > pestering you. Thanks for your help! |
From: Joshua D. <joshuardavis@q.com> - 2009-08-19 22:38:29
|
On 2009 Aug 19 , at 11:59 AM, Mike C. Fletcher wrote: > The trace looks fine. There's an unlikely possibility, which is that > the shader compilation happening before mainloop/display callback > might > fail on OSX's GLUT. To test that, comment out the calls to > initializeShaders and handleDisplayEvent at the top-level of your test > script and add: > > if not shaderProgram: > initializeShaders() > > to the top of your handleDisplayEvent() function. I doubt *very* > strongly that is the problem, as *all* OpenGLContext initialization > happens in that same state (post context creation, pre mainloop) and > it's never been a problem before. Didn't get to trying the code on > friend's Mac last night either. As you suspected, this was not the problem; making that change did not fix things. > Would be nice if we could confirm that this machine can handle > attributes at all (so we know whether this is a problem with the > wrapper > or the driver). I am attaching a new program and its debugging output. This program uses the legacy glVertexPointer() to specify the vertices, but uses a "color" attribute variable to specify a single color. It works correctly; changing "color" to yellow or magenta causes all fragments to be that color. So my machine/driver/wrapper can handle individual attribute variables, but it has a problem with attribute arrays? I'm going to try to get attribute arrays working from C, as you suggested in your other message. (The specs I've found online for the Radeon 9600 are too vague to be useful.) Until then I'll stop pestering you. Thanks for your help! Josh |
From: Mike C. F. <mcf...@vr...> - 2009-08-19 17:18:42
|
Joshua Davis wrote: ... > Update: I've run the same program on a friend's computer, which is > GeForce 8600M GT (OpenGL 3.0), Mac OX 10.5.8, Python 2.5.1, Numpy > 1.3.0, PyOpenGL 3.0.1a3. The program works perfectly (whereas on my > machine, a Radeon 9600, it produces no fragments). The debugging > output is listed below. One thing I notice is that > glVertexAttribPointer() is used on my friend's computer, whereas > glVertexAttribPointerARB() is used on mine. > Right, your machine doesn't provide OpenGL 2.x, theirs does. The extension *should* work if it is present, and as noted, when I use the ARB versions of the entry points here, the code still produces fragments. > I think that even a Radeon 9600 is capable of using vertex attribute > arrays, but if supporting hardware this old is not worth your time, > then let me know; I can take it. > AFAICS the code is producing the correct calls to OpenGL to produce the results. Possibilities still open: * hardware doesn't "really" support shader attributes (or supports them with quirks/extra requirements) * the PyOpenGL OpenGL.GL.shaders module may have a bug in how it maps calls into ARB (but not into core), where the more modern implementations are able to handle the "off" mapping, but not the older implementations o may be some setup missing that older implementation requires? o may be some call that's not raising errors, but doesn't match required usage on 9600 implementation? * ?? we're probably to the point now where the paths to try to fix it would be: * ask on an OpenGL experts forum about what the code should do to get attributes working on 9600s * find some old (C) OpenGL code that worked with a 9600 and shader attributes, ATI's developer site might have something of this vintage kicking around. Comparing against what we're doing may show something missing/wrong for the older hardware. You might have luck in either of those directions. I'm hesitant to explore them without having hardware on which to test hypotheses, but if you find something I can certainly try to help with it. HTH, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |
From: Mike C. F. <mcf...@vr...> - 2009-08-19 17:07:20
|
Alexander Kozlov wrote: > Hi! > > An example program test_glutwindow.py from PyOpenGL-3.0.0/tests/ > doesn't run: > Please add the following lines to the top of the file, they will generate a very verbose debugging log on the console: import logging logging.basicConfig( level = logging.DEBUG ) import OpenGL OpenGL.FULL_LOGGING = True which should tell me which call is actually crashing (you can just send this to me, if you like, rather than the list). Also, the output of: python -c "from OpenGL import __version__; print __version__" will tell me which PyOpenGL version you are using. > Another example, test_glutinit.py, as well as glxgears and all > OpenGL programs work fine though. > > I have MesaLib 7.5 and PyOpenGL 3.0.0 or 3.0.1a3 installed on my > computer. Could anyone help to localize the problem? > Your Operating System (I'm assuming some version of Linux, by the use of Mesa) version, whether you are using a 64-bit processor, and the name/type of video card you have will often be helpful as well: lspci | grep VGA will often help to identify that. Thanks, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |
From: Mike C. F. <mcf...@vr...> - 2009-08-19 16:59:58
|
Joshua Davis wrote: ... >> that's extremely old now. Can you add these lines to the top of your >> script and run it, please: >> >> import logging >> logging.basicConfig( level = logging.DEBUG ) >> import OpenGL >> OpenGL.FULL_LOGGING = True >> >> it'll dump every call it makes onto the console, include all the >> parameters it's passing. That should let me inspect and see if we're >> getting the wrong values showing up at the GL level. > > > This is a great debugging tool! Thanks. So is it a Numpy vs. Numeric > problem? Nope, the info-log there is just telling you that the registered Numeric (old Numpy) handler isn't loadable. That's normal and desirable, you don't want to be using Numeric in modern code, it's available for backward compatibility with old software that doesn't want to convert to Numpy. The trace looks fine. There's an unlikely possibility, which is that the shader compilation happening before mainloop/display callback might fail on OSX's GLUT. To test that, comment out the calls to initializeShaders and handleDisplayEvent at the top-level of your test script and add: if not shaderProgram: initializeShaders() to the top of your handleDisplayEvent() function. I doubt *very* strongly that is the problem, as *all* OpenGLContext initialization happens in that same state (post context creation, pre mainloop) and it's never been a problem before. Didn't get to trying the code on friend's Mac last night either. Would be nice if we could confirm that this machine can handle attributes at all (so we know whether this is a problem with the wrapper or the driver). Good luck, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |
From: Joshua D. <joshuardavis@q.com> - 2009-08-19 16:46:45
|
>> that's extremely old now. Can you add these lines to the top of your >> script and run it, please: >> >> import logging >> logging.basicConfig( level = logging.DEBUG ) >> import OpenGL >> OpenGL.FULL_LOGGING = True >> >> it'll dump every call it makes onto the console, include all the >> parameters it's passing. That should let me inspect and see if we're >> getting the wrong values showing up at the GL level. Update: I've run the same program on a friend's computer, which is GeForce 8600M GT (OpenGL 3.0), Mac OX 10.5.8, Python 2.5.1, Numpy 1.3.0, PyOpenGL 3.0.1a3. The program works perfectly (whereas on my machine, a Radeon 9600, it produces no fragments). The debugging output is listed below. One thing I notice is that glVertexAttribPointer() is used on my friend's computer, whereas glVertexAttribPointerARB() is used on mine. I think that even a Radeon 9600 is capable of using vertex attribute arrays, but if supporting hardware this old is not worth your time, then let me know; I can take it. bash$ python vboattrib.py INFO:OpenGL.acceleratesupport:No OpenGL_accelerate module loaded: No module named OpenGL_accelerate INFO:OpenGL.formathandler:Unable to load registered array format handler numeric: Traceback (most recent call last): File "/Library/Python/2.5/site-packages/OpenGL/arrays/ formathandler.py", line 44, in loadPlugin plugin_class = entrypoint.load() File "/Library/Python/2.5/site-packages/OpenGL/plugins.py", line 14, in load return importByName( self.import_path ) File "/Library/Python/2.5/site-packages/OpenGL/plugins.py", line 28, in importByName module = __import__( ".".join(moduleName), {}, {}, moduleName) File "/Library/Python/2.5/site-packages/OpenGL/arrays/numeric.py", line 15, in <module> raise ImportError( """No Numeric module present: %s"""%(err)) ImportError: No Numeric module present: No module named Numeric DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.GL_OBJECT_ACTIVE_UNIFORMS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.GL_OBJECT_ATTACHED_OBJECTS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.GL_OBJECT_DELETE_STATUS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.GL_OBJECT_INFO_LOG_LENGTH_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.GL_OBJECT_SHADER_SOURCE_LENGTH_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.GL_OBJECT_SUBTYPE_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.GL_OBJECT_TYPE_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.GL_OBJECT_VALIDATE_STATUS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.GL_PROGRAM_OBJECT_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.GL_SHADER_OBJECT_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.glAttachObjectARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.glDeleteObjectARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.glDetachObjectARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.glGetAttachedObjectsARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.glGetHandleARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.glGetObjectParameterfvARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.glGetObjectParameterivARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.glInitShaderObjectsARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.fragment_shader.glInitFragmentShaderARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_shader.GL_OBJECT_ACTIVE_ATTRIBUTES_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_shader.GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_shader.base_glGetActiveAttribARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_shader.glGetObjectParameterivARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_shader.glInitVertexShaderARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_CURRENT_MATRIX_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_CURRENT_MATRIX_STACK_DEPTH_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX0_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX10_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX11_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX12_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX13_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX14_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX15_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX16_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX17_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX18_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX19_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX1_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX20_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX21_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX22_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX23_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX24_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX25_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX26_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX27_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX28_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX29_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX2_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX30_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX31_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX3_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX4_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX5_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX6_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX7_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX8_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX9_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MAX_PROGRAM_ATTRIBS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MAX_PROGRAM_ENV_PARAMETERS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MAX_PROGRAM_INSTRUCTIONS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MAX_PROGRAM_MATRICES_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MAX_PROGRAM_PARAMETERS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MAX_PROGRAM_TEMPORARIES_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_ADDRESS_REGISTERS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_ATTRIBS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_BINDING_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_ERROR_POSITION_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_ERROR_STRING_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_FORMAT_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_FORMAT_ASCII_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_INSTRUCTIONS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_LENGTH_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_NATIVE_ATTRIBS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_NATIVE_PARAMETERS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_NATIVE_TEMPORARIES_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_PARAMETERS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_STRING_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_TEMPORARIES_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_TRANSPOSE_CURRENT_MATRIX_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_VERTEX_PROGRAM_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glBindProgramARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glDeleteProgramsARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glGenProgramsARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glGetProgramEnvParameterdvARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glGetProgramEnvParameterfvARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glGetProgramLocalParameterdvARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glGetProgramLocalParameterfvARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glGetProgramStringARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glGetProgramivARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glInitVertexProgramARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glProgramEnvParameter4dARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glProgramEnvParameter4dvARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glProgramEnvParameter4fARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glProgramEnvParameter4fvARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glProgramLocalParameter4dARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glProgramLocalParameter4dvARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glProgramLocalParameter4fARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glProgramLocalParameter4fvARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glProgramStringARB INFO:OpenGL.calltrace:glutInitDisplayMode( 18 ) INFO:OpenGL.calltrace:glutInitWindowSize( 512,512 ) INFO:OpenGL.calltrace:glutInitWindowPosition( 0,0 ) INFO:OpenGL.calltrace:glutCreateWindow( 'Test' ) INFO:OpenGL.calltrace:glEnable( GL_DEPTH_TEST ) INFO:OpenGL.calltrace:glViewport( 0,0,512,512 ) INFO:OpenGL.calltrace:glMatrixMode( GL_PROJECTION ) INFO:OpenGL.calltrace:glLoadIdentity( ) INFO:OpenGL.calltrace:glFrustum( -5.0,5.0,-5.0,5.0,1.0,11.0 ) INFO:OpenGL.calltrace:glMatrixMode( GL_MODELVIEW ) INFO:OpenGL.calltrace:glLoadIdentity( ) INFO:OpenGL.calltrace:glTranslatef( 0.0,0.0,-5.0 ) INFO:OpenGL.calltrace:glRotatef( 15.0,0.0,0.0,1.0 ) INFO:OpenGL.calltrace:glRotatef( -45.0,1.0,0.0,0.0 ) INFO:OpenGL.extensions:OpenGL Version: 2.0 NVIDIA-1.5.48 INFO:OpenGL.extensions:Chose alternate: glCreateShader from glCreateShader, glCreateShaderObjectARB INFO:OpenGL.calltrace:glCreateShader( GL_VERTEX_SHADER ) INFO:OpenGL.extensions:Chose alternate: glShaderSource from glShaderSource, glShaderSourceARB INFO:OpenGL.calltrace:dataPointer( <class 'OpenGL.arrays.arraydatatype.GLcharArray'>,'\n attribute vec3 position;\n attribute vec3 color;\n void main()\n {\n gl_Position = gl_ModelViewProjectionMatrix * vec4(position, 1.0); \n gl_FrontColor = vec4(color, 1.0);\n }' ) INFO:OpenGL.calltrace:glShaderSource( 1L, 1,<OpenGL.GLUT.special.c_char_p_Array_1 object at 0x1b3d440>,<OpenGL.converters.c_long_Array_1 object at 0x1b398a0> ) INFO:OpenGL.calltrace:from_param( <class 'OpenGL.arrays.arraydatatype.GLintArray'>,<OpenGL.converters.c_long_Arra y_1 object at 0x1b398a0> ) INFO:OpenGL.extensions:Chose alternate: glCompileShader from glCompileShader, glCompileShaderARB INFO:OpenGL.calltrace:glCompileShader( 1L ) INFO:OpenGL.extensions:Chose alternate: glGetShaderiv from glGetShaderiv, glGetObjectParameterivARB INFO:OpenGL.calltrace:zeros( <class 'OpenGL.arrays.arraydatatype.GLintArray'>,(1,) ) INFO:OpenGL.calltrace:glGetShaderiv( 1L,GL_COMPILE_STATUS,array([1]) ) INFO:OpenGL.calltrace:from_param( <class 'OpenGL.arrays.arraydatatype.GLintArray'>,array([1]) ) INFO:OpenGL.calltrace:glCreateShader( GL_FRAGMENT_SHADER ) INFO:OpenGL.calltrace:dataPointer( <class 'OpenGL.arrays.arraydatatype.GLcharArray'>,'\n void main()\n {\n gl_FragColor = gl_Color;\n //gl_FragColor = vec4 (1.0, 0.0, 1.0, 1.0);\n }' ) INFO:OpenGL.calltrace:glShaderSource( 2L, 1,<OpenGL.GLUT.special.c_char_p_Array_1 object at 0x1b398a0>,<OpenGL.converters.c_long_Array_1 object at 0x1b39f30> ) INFO:OpenGL.calltrace:from_param( <class 'OpenGL.arrays.arraydatatype.GLintArray'>,<OpenGL.converters.c_long_Arra y_1 object at 0x1b39f30> ) INFO:OpenGL.calltrace:glCompileShader( 2L ) INFO:OpenGL.calltrace:zeros( <class 'OpenGL.arrays.arraydatatype.GLintArray'>,(1,) ) INFO:OpenGL.calltrace:glGetShaderiv( 2L,GL_COMPILE_STATUS,array([1]) ) INFO:OpenGL.calltrace:from_param( <class 'OpenGL.arrays.arraydatatype.GLintArray'>,array([1]) ) INFO:OpenGL.extensions:Chose alternate: glCreateProgram from glCreateProgram, glCreateProgramObjectARB INFO:OpenGL.calltrace:glCreateProgram( ) INFO:OpenGL.extensions:Chose alternate: glAttachShader from glAttachShader, glAttachObjectARB INFO:OpenGL.calltrace:glAttachShader( 3L,1L ) INFO:OpenGL.calltrace:glAttachShader( 3L,2L ) INFO:OpenGL.extensions:Chose alternate: glLinkProgram from glLinkProgram, glLinkProgramARB INFO:OpenGL.calltrace:glLinkProgram( 3L ) INFO:OpenGL.extensions:Chose alternate: glValidateProgram from glValidateProgram, glValidateProgramARB INFO:OpenGL.calltrace:glValidateProgram( 3L ) INFO:OpenGL.extensions:Chose alternate: glGetProgramiv from glGetProgramiv, glGetObjectParameterivARB INFO:OpenGL.calltrace:zeros( <class 'OpenGL.arrays.arraydatatype.GLintArray'>,(1,) ) INFO:OpenGL.calltrace:glGetProgramiv( 3L,GL_VALIDATE_STATUS,array([0]) ) INFO:OpenGL.calltrace:from_param( <class 'OpenGL.arrays.arraydatatype.GLintArray'>,array([0]) ) INFO:OpenGL.calltrace:zeros( <class 'OpenGL.arrays.arraydatatype.GLintArray'>,(1,) ) INFO:OpenGL.calltrace:glGetProgramiv( 3L,GL_LINK_STATUS,array([0]) ) INFO:OpenGL.calltrace:from_param( <class 'OpenGL.arrays.arraydatatype.GLintArray'>,array([0]) ) INFO:OpenGL.extensions:Chose alternate: glDeleteShader from glDeleteShader, glDeleteObjectARB INFO:OpenGL.calltrace:glDeleteShader( 1L ) INFO:OpenGL.calltrace:glDeleteShader( 2L ) INFO:OpenGL.extensions:Chose alternate: glGetAttribLocation from glGetAttribLocation, glGetAttribLocationARB INFO:OpenGL.calltrace:glGetAttribLocation( 3,'position\x00' ) INFO:OpenGL.calltrace:from_param( <class 'OpenGL.arrays.arraydatatype.GLcharArray'>,'position\x00' ) INFO:OpenGL.calltrace:glGetAttribLocation( 3,'color\x00' ) INFO:OpenGL.calltrace:from_param( <class 'OpenGL.arrays.arraydatatype.GLcharArray'>,'color\x00' ) 0 1 INFO:OpenGL.calltrace:glClear( 16640 ) INFO:OpenGL.extensions:Chose alternate: glUseProgram from glUseProgram, glUseProgramObjectARB INFO:OpenGL.calltrace:glUseProgram( 3 ) INFO:OpenGL.extensions:GL Extension GL_ARB_vertex_buffer_object available INFO:OpenGL.calltrace:zeros( <class 'OpenGL.arrays.arraydatatype.GLuintArray'>,(1,) ) INFO:OpenGL.calltrace:glGenBuffers( 1,array([0], dtype=uint32) ) INFO:OpenGL.calltrace:from_param( <class 'OpenGL.arrays.arraydatatype.GLuintArray'>,array([0], dtype=uint32) ) INFO:OpenGL.calltrace:glBindBuffer( GL_ARRAY_BUFFER,1L ) INFO:OpenGL.calltrace:asArray( <class 'OpenGL.arrays.arraydatatype.ArrayDatatype'>,array([[ 0., 1., 0., 0., 1., 0.], [-1., -1., 0., 1., 1., 0.], [ 1., -1., 0., 0., 1., 1.], [ 2., -1., 0., 1., 0., 0.], [ 4., -1., 0., 0., 1., 0.], [ 4., 1., 0., 0., 0., 1.], [ 2., -1., 0., 1., 0., 0.], [ 4., 1., 0., 0., 0., 1.], [ 2., 1., 0., 0., 1., 1.]], dtype=float32) ) INFO:OpenGL.calltrace:arrayByteCount( <class 'OpenGL.arrays.arraydatatype.ArrayDatatype'>,array([[ 0., 1., 0., 0., 1., 0.], [-1., -1., 0., 1., 1., 0.], [ 1., -1., 0., 0., 1., 1.], [ 2., -1., 0., 1., 0., 0.], [ 4., -1., 0., 0., 1., 0.], [ 4., 1., 0., 0., 0., 1.], [ 2., -1., 0., 1., 0., 0.], [ 4., 1., 0., 0., 0., 1.], [ 2., 1., 0., 0., 1., 1.]], dtype=float32) ) INFO:OpenGL.calltrace:glBufferData( GL_ARRAY_BUFFER,216,array([[ 0., 1., 0., 0., 1., 0.], [-1., -1., 0., 1., 1., 0.], [ 1., -1., 0., 0., 1., 1.], [ 2., -1., 0., 1., 0., 0.], [ 4., -1., 0., 0., 1., 0.], [ 4., 1., 0., 0., 0., 1.], [ 2., -1., 0., 1., 0., 0.], [ 4., 1., 0., 0., 0., 1.], [ 2., 1., 0., 0., 1., 1.]], dtype=float32),GL_DYNAMIC_DRAW ) INFO:OpenGL.calltrace:from_param( <class 'OpenGL.arrays.arraydatatype.ArrayDatatype'>,array([[ 0., 1., 0., 0., 1., 0.], [-1., -1., 0., 1., 1., 0.], [ 1., -1., 0., 0., 1., 1.], [ 2., -1., 0., 1., 0., 0.], [ 4., -1., 0., 0., 1., 0.], [ 4., 1., 0., 0., 0., 1.], [ 2., -1., 0., 1., 0., 0.], [ 4., 1., 0., 0., 0., 1.], [ 2., 1., 0., 0., 1., 1.]], dtype=float32) ) INFO:OpenGL.extensions:Chose alternate: glVertexAttribPointer from glVertexAttribPointer, glVertexAttribPointerARB INFO:OpenGL.calltrace:asArray( <class 'OpenGL.arrays.arraydatatype.ArrayDatatype'>,<OpenGL.arrays.vbo.VBO object at 0x1b5ba50> ) INFO:OpenGL.calltrace:voidDataPointer( <class 'OpenGL.arrays.arraydatatype.ArrayDatatype'>,<OpenGL.arrays.vbo.VBO object at 0x1b5ba50> ) INFO:OpenGL.calltrace:dataPointer( <class 'OpenGL.arrays.arraydatatype.ArrayDatatype'>,<OpenGL.arrays.vbo.VBO object at 0x1b5ba50> ) INFO:OpenGL.calltrace:glVertexAttribPointer( 0,3,GL_FLOAT,False, 24,c_void_p(None) ) INFO:OpenGL.calltrace:from_param( <class 'OpenGL.arrays.arraydatatype.ArrayDatatype'>,c_void_p(None) ) INFO:OpenGL.calltrace:asArray( <class 'OpenGL.arrays.arraydatatype.ArrayDatatype'>,<OpenGL.arrays.vbo.VBOOffse t object at 0x1b65670> ) INFO:OpenGL.calltrace:voidDataPointer( <class 'OpenGL.arrays.arraydatatype.ArrayDatatype'>,<OpenGL.arrays.vbo.VBOOffse t object at 0x1b65670> ) INFO:OpenGL.calltrace:dataPointer( <class 'OpenGL.arrays.arraydatatype.ArrayDatatype'>,<OpenGL.arrays.vbo.VBOOffse t object at 0x1b65670> ) INFO:OpenGL.calltrace:glVertexAttribPointer( 1,3,GL_FLOAT,False, 24,c_void_p(12) ) INFO:OpenGL.calltrace:from_param( <class 'OpenGL.arrays.arraydatatype.ArrayDatatype'>,c_void_p(12) ) INFO:OpenGL.extensions:Chose alternate: glEnableVertexAttribArray from glEnableVertexAttribArray, glEnableVertexAttribArrayARB INFO:OpenGL.calltrace:glEnableVertexAttribArray( 0 ) INFO:OpenGL.calltrace:glEnableVertexAttribArray( 1 ) INFO:OpenGL.calltrace:glDrawArrays( GL_TRIANGLES,0,9 ) INFO:OpenGL.calltrace:glBindBuffer( GL_ARRAY_BUFFER,0 ) INFO:OpenGL.extensions:Chose alternate: glDisableVertexAttribArray from glDisableVertexAttribArray, glDisableVertexAttribArrayARB INFO:OpenGL.calltrace:glDisableVertexAttribArray( 0 ) INFO:OpenGL.calltrace:glDisableVertexAttribArray( 1 ) INFO:OpenGL.calltrace:glUseProgram( 0 ) INFO:OpenGL.calltrace:glFlush( ) INFO:OpenGL.calltrace:glutSwapBuffers( ) INFO:OpenGL.calltrace:glutMainLoop( ) INFO:OpenGL.calltrace:glClear( 16640 ) INFO:OpenGL.calltrace:glUseProgram( 3 ) INFO:OpenGL.calltrace:glBindBuffer( GL_ARRAY_BUFFER,1L ) INFO:OpenGL.calltrace:asArray( <class 'OpenGL.arrays.arraydatatype.ArrayDatatype'>,<OpenGL.arrays.vbo.VBO object at 0x1b5ba50> ) INFO:OpenGL.calltrace:voidDataPointer( <class 'OpenGL.arrays.arraydatatype.ArrayDatatype'>,<OpenGL.arrays.vbo.VBO object at 0x1b5ba50> ) INFO:OpenGL.calltrace:dataPointer( <class 'OpenGL.arrays.arraydatatype.ArrayDatatype'>,<OpenGL.arrays.vbo.VBO object at 0x1b5ba50> ) INFO:OpenGL.calltrace:glVertexAttribPointer( 0,3,GL_FLOAT,False, 24,c_void_p(None) ) INFO:OpenGL.calltrace:from_param( <class 'OpenGL.arrays.arraydatatype.ArrayDatatype'>,c_void_p(None) ) INFO:OpenGL.calltrace:asArray( <class 'OpenGL.arrays.arraydatatype.ArrayDatatype'>,<OpenGL.arrays.vbo.VBOOffse t object at 0x1b65770> ) INFO:OpenGL.calltrace:voidDataPointer( <class 'OpenGL.arrays.arraydatatype.ArrayDatatype'>,<OpenGL.arrays.vbo.VBOOffse t object at 0x1b65770> ) INFO:OpenGL.calltrace:dataPointer( <class 'OpenGL.arrays.arraydatatype.ArrayDatatype'>,<OpenGL.arrays.vbo.VBOOffse t object at 0x1b65770> ) INFO:OpenGL.calltrace:glVertexAttribPointer( 1,3,GL_FLOAT,False, 24,c_void_p(12) ) INFO:OpenGL.calltrace:from_param( <class 'OpenGL.arrays.arraydatatype.ArrayDatatype'>,c_void_p(12) ) INFO:OpenGL.calltrace:glEnableVertexAttribArray( 0 ) INFO:OpenGL.calltrace:glEnableVertexAttribArray( 1 ) INFO:OpenGL.calltrace:glDrawArrays( GL_TRIANGLES,0,9 ) INFO:OpenGL.calltrace:glBindBuffer( GL_ARRAY_BUFFER,0 ) INFO:OpenGL.calltrace:glDisableVertexAttribArray( 0 ) INFO:OpenGL.calltrace:glDisableVertexAttribArray( 1 ) INFO:OpenGL.calltrace:glUseProgram( 0 ) INFO:OpenGL.calltrace:glFlush( ) INFO:OpenGL.calltrace:glutSwapBuffers( ) |
From: Alexander K. <ak...@na...> - 2009-08-19 11:00:49
|
Hi! An example program test_glutwindow.py from PyOpenGL-3.0.0/tests/ doesn't run: --- $ python test_glutwindow.py newArguments ['test_glutwindow.py'] window 1 WindowStatus -> 1 reshape (250, 250) Segmentation fault --- I get the following error message in sys.log: --- kernel: [ 1597.550731] python[1717] general protection ip:b795363f sp:bf92cf08 error:0 in libGL.so.1.5.070500[b7770000+2f0000] --- Another example, test_glutinit.py, as well as glxgears and all OpenGL programs work fine though. I have MesaLib 7.5 and PyOpenGL 3.0.0 or 3.0.1a3 installed on my computer. Could anyone help to localize the problem? Thanks, Alex. |
From: Joshua D. <joshuardavis@q.com> - 2009-08-18 18:00:57
|
On 2009 Aug 18 , at 11:34 AM, Mike C. Fletcher wrote: > Joshua Davis wrote: >> I'm using PyOpenGL 3.0.1a3. Maybe this is relevant: My hardware is an >> ATI Radeon 9600, which is supposed to support OpenGL 2.0, but the >> output below suggests that it's providing only OpenGL 1.5. Is this a >> driver issue? I'm on Mac OS X 10.4.11, and Apple updates drivers >> automatically. OpenGL 1.5 should be enough for VBOs anyway. As an >> aside, elsewhere in my application I'm using framebuffer objects with >> no problem. >> > The 9600 is definitely using the ARB versions of the extensions, not > core. That shouldn't matter. As noted, when I disable core on my > Linux > machines I can run your code with the ARB versions. The 9600 is a > relatively old architecture (2002), so it's not impossible that it > doesn't properly handle attributes. I see at least one mesa changelog > where glGetAttribLocation was always returning 1 for every call, but My two calls to glGetAttribLocation() return 1 and 2, so that's not the problem. > that's extremely old now. Can you add these lines to the top of your > script and run it, please: > > import logging > logging.basicConfig( level = logging.DEBUG ) > import OpenGL > OpenGL.FULL_LOGGING = True > > it'll dump every call it makes onto the console, include all the > parameters it's passing. That should let me inspect and see if we're > getting the wrong values showing up at the GL level. This is a great debugging tool! Thanks. So is it a Numpy vs. Numeric problem? INFO:OpenGL.acceleratesupport:OpenGL_accelerate module loaded INFO:OpenGL.arrays.arraydatatype:Using accelerated ArrayDatatype INFO:OpenGL.formathandler:Unable to load registered array format handler numeric: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/OpenGL/arrays/formathandler.py", line 44, in loadPlugin plugin_class = entrypoint.load() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/OpenGL/plugins.py", line 14, in load return importByName( self.import_path ) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/OpenGL/plugins.py", line 28, in importByName module = __import__( ".".join(moduleName), {}, {}, moduleName) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/OpenGL/arrays/numeric.py", line 15, in <module> raise ImportError( """No Numeric module present: %s"""%(err)) ImportError: No Numeric module present: No module named Numeric DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.GL_OBJECT_ACTIVE_UNIFORMS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.GL_OBJECT_ATTACHED_OBJECTS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.GL_OBJECT_DELETE_STATUS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.GL_OBJECT_INFO_LOG_LENGTH_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.GL_OBJECT_SHADER_SOURCE_LENGTH_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.GL_OBJECT_SUBTYPE_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.GL_OBJECT_TYPE_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.GL_OBJECT_VALIDATE_STATUS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.GL_PROGRAM_OBJECT_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.GL_SHADER_OBJECT_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.glAttachObjectARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.glDeleteObjectARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.glDetachObjectARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.glGetAttachedObjectsARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.glGetHandleARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.glGetObjectParameterfvARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.glGetObjectParameterivARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.shader_objects.glInitShaderObjectsARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.fragment_shader.glInitFragmentShaderARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_shader.GL_OBJECT_ACTIVE_ATTRIBUTES_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_shader.GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_shader.base_glGetActiveAttribARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_shader.glGetObjectParameterivARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_shader.glInitVertexShaderARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_CURRENT_MATRIX_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_CURRENT_MATRIX_STACK_DEPTH_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX0_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX10_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX11_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX12_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX13_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX14_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX15_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX16_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX17_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX18_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX19_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX1_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX20_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX21_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX22_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX23_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX24_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX25_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX26_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX27_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX28_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX29_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX2_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX30_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX31_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX3_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX4_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX5_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX6_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX7_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX8_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MATRIX9_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MAX_PROGRAM_ATTRIBS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MAX_PROGRAM_ENV_PARAMETERS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MAX_PROGRAM_INSTRUCTIONS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MAX_PROGRAM_MATRICES_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MAX_PROGRAM_PARAMETERS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_MAX_PROGRAM_TEMPORARIES_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_ADDRESS_REGISTERS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_ATTRIBS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_BINDING_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_ERROR_POSITION_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_ERROR_STRING_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_FORMAT_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_FORMAT_ASCII_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_INSTRUCTIONS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_LENGTH_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_NATIVE_ATTRIBS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_NATIVE_PARAMETERS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_NATIVE_TEMPORARIES_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_PARAMETERS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_STRING_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_TEMPORARIES_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_TRANSPOSE_CURRENT_MATRIX_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.GL_VERTEX_PROGRAM_ARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glBindProgramARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glDeleteProgramsARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glGenProgramsARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glGetProgramEnvParameterdvARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glGetProgramEnvParameterfvARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glGetProgramLocalParameterdvARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glGetProgramLocalParameterfvARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glGetProgramStringARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glGetProgramivARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glInitVertexProgramARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glProgramEnvParameter4dARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glProgramEnvParameter4dvARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glProgramEnvParameter4fARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glProgramEnvParameter4fvARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glProgramLocalParameter4dARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glProgramLocalParameter4dvARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glProgramLocalParameter4fARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glProgramLocalParameter4fvARB DEBUG:OpenGL.GL.shaders:Found no alternate for: OpenGL.GL.ARB.vertex_program.glProgramStringARB INFO:OpenGL.calltrace:glutInitDisplayMode( 18 ) INFO:OpenGL.calltrace:glutInitWindowSize( 512,512 ) INFO:OpenGL.calltrace:glutInitWindowPosition( 0,0 ) INFO:OpenGL.calltrace:glutCreateWindow( 'Test' ) INFO:OpenGL.calltrace:glEnable( GL_DEPTH_TEST ) INFO:OpenGL.calltrace:glViewport( 0,0,512,512 ) INFO:OpenGL.calltrace:glMatrixMode( GL_PROJECTION ) INFO:OpenGL.calltrace:glLoadIdentity( ) INFO:OpenGL.calltrace:glFrustum( -5.0,5.0,-5.0,5.0,1.0,11.0 ) INFO:OpenGL.calltrace:glMatrixMode( GL_MODELVIEW ) INFO:OpenGL.calltrace:glLoadIdentity( ) INFO:OpenGL.calltrace:glTranslatef( 0.0,0.0,-5.0 ) INFO:OpenGL.calltrace:glRotatef( 15.0,0.0,0.0,1.0 ) INFO:OpenGL.calltrace:glRotatef( -45.0,1.0,0.0,0.0 ) INFO:OpenGL.extensions:OpenGL Version: 1.5 ATI-1.4.18 INFO:OpenGL.extensions:GL Extension GL_ARB_shader_objects available INFO:OpenGL.extensions:Chose alternate: glCreateShaderObjectARB from glCreateShader, glCreateShaderObjectARB INFO:OpenGL.calltrace:glCreateShaderObjectARB( GL_VERTEX_SHADER ) INFO:OpenGL.extensions:Chose alternate: glShaderSourceARB from glShaderSource, glShaderSourceARB INFO:OpenGL.calltrace:glShaderSourceARB( 1L, 1,<OpenGL.GLUT.special.c_char_p_Array_1 object at 0x204b940>,<numpy.ctypeslib.c_long_Array_1 object at 0x204b8f0> ) INFO:OpenGL.extensions:Chose alternate: glCompileShaderARB from glCompileShader, glCompileShaderARB INFO:OpenGL.calltrace:glCompileShaderARB( 1L ) INFO:OpenGL.extensions:Chose alternate: glGetObjectParameterivARB from glGetShaderiv, glGetObjectParameterivARB INFO:OpenGL.calltrace:glGetObjectParameterivARB ( 1L,GL_COMPILE_STATUS,array([1]) ) INFO:OpenGL.calltrace:glCreateShaderObjectARB( GL_FRAGMENT_SHADER ) INFO:OpenGL.calltrace:glShaderSourceARB( 2L, 1,<OpenGL.GLUT.special.c_char_p_Array_1 object at 0x204b940>,<numpy.ctypeslib.c_long_Array_1 object at 0x204b850> ) INFO:OpenGL.calltrace:glCompileShaderARB( 2L ) INFO:OpenGL.calltrace:glGetObjectParameterivARB ( 2L,GL_COMPILE_STATUS,array([1]) ) INFO:OpenGL.extensions:Chose alternate: glCreateProgramObjectARB from glCreateProgram, glCreateProgramObjectARB INFO:OpenGL.calltrace:glCreateProgramObjectARB( ) INFO:OpenGL.extensions:Chose alternate: glAttachObjectARB from glAttachShader, glAttachObjectARB INFO:OpenGL.calltrace:glAttachObjectARB( 3L,1L ) INFO:OpenGL.calltrace:glAttachObjectARB( 3L,2L ) INFO:OpenGL.extensions:Chose alternate: glLinkProgramARB from glLinkProgram, glLinkProgramARB INFO:OpenGL.calltrace:glLinkProgramARB( 3L ) INFO:OpenGL.extensions:Chose alternate: glValidateProgramARB from glValidateProgram, glValidateProgramARB INFO:OpenGL.calltrace:glValidateProgramARB( 3L ) INFO:OpenGL.extensions:Chose alternate: glGetObjectParameterivARB from glGetProgramiv, glGetObjectParameterivARB INFO:OpenGL.calltrace:glGetObjectParameterivARB ( 3L,GL_VALIDATE_STATUS,array([1]) ) INFO:OpenGL.calltrace:glGetObjectParameterivARB ( 3L,GL_LINK_STATUS,array([1]) ) INFO:OpenGL.extensions:Chose alternate: glDeleteObjectARB from glDeleteShader, glDeleteObjectARB INFO:OpenGL.calltrace:glDeleteObjectARB( 1L ) INFO:OpenGL.calltrace:glDeleteObjectARB( 2L ) INFO:OpenGL.extensions:GL Extension GL_ARB_vertex_shader available INFO:OpenGL.extensions:Chose alternate: glGetAttribLocationARB from glGetAttribLocation, glGetAttribLocationARB INFO:OpenGL.calltrace:glGetAttribLocationARB( 3L,'position\x00' ) INFO:OpenGL.calltrace:glGetAttribLocationARB( 3L,'color\x00' ) INFO:OpenGL.calltrace:glClear( 16640 ) INFO:OpenGL.extensions:Chose alternate: glUseProgramObjectARB from glUseProgram, glUseProgramObjectARB INFO:OpenGL.calltrace:glUseProgramObjectARB( 3L ) INFO:OpenGL.extensions:GL Extension GL_ARB_vertex_buffer_object available INFO:OpenGL.calltrace:glGenBuffers( 1,array([0], dtype=uint32) ) INFO:OpenGL.calltrace:glBindBuffer( 34962L,1L ) INFO:OpenGL.calltrace:glBufferData( 34962L,216,array([[ 0., 1., 0., 0., 1., 0.], [-1., -1., 0., 1., 1., 0.], [ 1., -1., 0., 0., 1., 1.], [ 2., -1., 0., 1., 0., 0.], [ 4., -1., 0., 0., 1., 0.], [ 4., 1., 0., 0., 0., 1.], [ 2., -1., 0., 1., 0., 0.], [ 4., 1., 0., 0., 0., 1.], [ 2., 1., 0., 0., 1., 1.]], dtype=float32),35048L ) INFO:OpenGL.extensions:GL Extension GL_ARB_vertex_program available INFO:OpenGL.extensions:Chose alternate: glVertexAttribPointerARB from glVertexAttribPointer, glVertexAttribPointerARB INFO:OpenGL.calltrace:glVertexAttribPointerARB( 1,3,GL_FLOAT,False, 24,c_void_p(None) ) INFO:OpenGL.calltrace:glVertexAttribPointerARB( 2,3,GL_FLOAT,False, 24,c_void_p(12) ) INFO:OpenGL.extensions:Chose alternate: glEnableVertexAttribArrayARB from glEnableVertexAttribArray, glEnableVertexAttribArrayARB INFO:OpenGL.calltrace:glEnableVertexAttribArrayARB( 1 ) INFO:OpenGL.calltrace:glEnableVertexAttribArrayARB( 2 ) INFO:OpenGL.calltrace:glDrawArrays( GL_TRIANGLES,0,9 ) INFO:OpenGL.calltrace:glBindBuffer( 34962L,0 ) INFO:OpenGL.extensions:Chose alternate: glDisableVertexAttribArrayARB from glDisableVertexAttribArray, glDisableVertexAttribArrayARB INFO:OpenGL.calltrace:glDisableVertexAttribArrayARB( 1 ) INFO:OpenGL.calltrace:glDisableVertexAttribArrayARB( 2 ) INFO:OpenGL.calltrace:glUseProgramObjectARB( 0 ) INFO:OpenGL.calltrace:glFlush( ) INFO:OpenGL.calltrace:glutSwapBuffers( ) INFO:OpenGL.calltrace:glutMainLoop( ) INFO:OpenGL.calltrace:glClear( 16640 ) INFO:OpenGL.calltrace:glUseProgramObjectARB( 3L ) INFO:OpenGL.calltrace:glBindBuffer( 34962L,1L ) INFO:OpenGL.calltrace:glVertexAttribPointerARB( 1,3,GL_FLOAT,False, 24,c_void_p(None) ) INFO:OpenGL.calltrace:glVertexAttribPointerARB( 2,3,GL_FLOAT,False, 24,c_void_p(12) ) INFO:OpenGL.calltrace:glEnableVertexAttribArrayARB( 1 ) INFO:OpenGL.calltrace:glEnableVertexAttribArrayARB( 2 ) INFO:OpenGL.calltrace:glDrawArrays( GL_TRIANGLES,0,9 ) INFO:OpenGL.calltrace:glBindBuffer( 34962L,0 ) INFO:OpenGL.calltrace:glDisableVertexAttribArrayARB( 1 ) INFO:OpenGL.calltrace:glDisableVertexAttribArrayARB( 2 ) INFO:OpenGL.calltrace:glUseProgramObjectARB( 0 ) INFO:OpenGL.calltrace:glFlush( ) INFO:OpenGL.calltrace:glutSwapBuffers( ) |
From: Mike C. F. <mcf...@vr...> - 2009-08-18 16:34:56
|
Joshua Davis wrote: ... > Thanks a lot; I've got it installed now. The shader_4.py tutorial now > runs without raising any errors, but it doesn't seem to generate any > fragments; it's just a white screen. (This seems to be exactly what > happened with my own vertex attribute array code.) I've pasted its > console output below. > > I'm using PyOpenGL 3.0.1a3. Maybe this is relevant: My hardware is an > ATI Radeon 9600, which is supposed to support OpenGL 2.0, but the > output below suggests that it's providing only OpenGL 1.5. Is this a > driver issue? I'm on Mac OS X 10.4.11, and Apple updates drivers > automatically. OpenGL 1.5 should be enough for VBOs anyway. As an > aside, elsewhere in my application I'm using framebuffer objects with > no problem. > The 9600 is definitely using the ARB versions of the extensions, not core. That shouldn't matter. As noted, when I disable core on my Linux machines I can run your code with the ARB versions. The 9600 is a relatively old architecture (2002), so it's not impossible that it doesn't properly handle attributes. I see at least one mesa changelog where glGetAttribLocation was always returning 1 for every call, but that's extremely old now. Can you add these lines to the top of your script and run it, please: import logging logging.basicConfig( level = logging.DEBUG ) import OpenGL OpenGL.FULL_LOGGING = True it'll dump every call it makes onto the console, include all the parameters it's passing. That should let me inspect and see if we're getting the wrong values showing up at the GL level. Good luck, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |
From: Mike C. F. <mcf...@vr...> - 2009-08-18 16:22:13
|
Joshua Davis wrote: >>> I don't see any obvious problems with the attribute-based version. >>> I've ... > The two versions of the program are attached below. They differ only > in the initializeShaders() and handleDisplayEvent() functions. But I > suppose the better diagnostic tool is the fact that the shader_4.py > tutorial doesn't seem to generate any fragments on my machine (see my > previous post). Okay, on 2 Linux AMD64 machines (with a Radeon Mobility 3650 and a Geforce 7600), the two scripts produce exactly the same output, these machines have core shader/vbo support, but the script also works if I disable use of the core libraries and use the ARB extensions on the Radeon machine. Hypotheses: * we could be looking at an error in the ARB versions on the Mac driver (extremely unlikely, this is bog-standard stuff) * could be a bug in how we're wrapping the ARB versions o might be a difference between accelerated/unaccelerated PyOpenGL, but doesn't appear to be (I've tested with both on Linux with this script) o might be a platform-specific requirement for the wrapper that we're missing (would be surprising, given that the rest of the extensions are working) * could be some subtle usage bug that Linux ignores but Mac rejects o I'd be surprised there, this is pretty straight-forward code The fact that shader_4 demonstrates the same effect would suggest that we've got something wrong in the wrapper, but without a Mac to test on I'm somewhat limited here in tracking down the failure. I may be able to have a friend try the script at PyGTA this evening. Good luck, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |
From: Joshua D. <joshuardavis@q.com> - 2009-08-17 14:21:23
|
>> I don't see any obvious problems with the attribute-based >> version. I've > done some minimal modifications to create a working full script. I > had > to add some perspective and translation setup (to move the geometry > back > from the viewer). Please consider trying to create this kind of > runnable script when reporting errors, I'm rather short on time to > work > on PyOpenGL and recreating scripts takes time I should be putting into > other tasks. I agree; you're doing valuable work on the project itself and I do not expect you to spend time debugging my code. I didn't include full programs in the interests of keeping my posts small, but in the future I will. The two versions of the program are attached below. They differ only in the initializeShaders() and handleDisplayEvent() functions. But I suppose the better diagnostic tool is the fact that the shader_4.py tutorial doesn't seem to generate any fragments on my machine (see my previous post). Thanks for your help. Josh |
From: Joshua D. <joshuardavis@q.com> - 2009-08-17 14:10:12
|
On 2009 Aug 16 , at 6:46 PM, Mike C. Fletcher wrote: > Afraid I forgot to update the documentation when I split out the > PyVRML97 project out. I've updated it to point to the PyVRML97 > project. Thanks a lot; I've got it installed now. The shader_4.py tutorial now runs without raising any errors, but it doesn't seem to generate any fragments; it's just a white screen. (This seems to be exactly what happened with my own vertex attribute array code.) I've pasted its console output below. I'm using PyOpenGL 3.0.1a3. Maybe this is relevant: My hardware is an ATI Radeon 9600, which is supposed to support OpenGL 2.0, but the output below suggests that it's providing only OpenGL 1.5. Is this a driver issue? I'm on Mac OS X 10.4.11, and Apple updates drivers automatically. OpenGL 1.5 should be enough for VBOs anyway. As an aside, elsewhere in my application I'm using framebuffer objects with no problem. Josh tcsh > python shader_4.py INFO:OpenGL.acceleratesupport:OpenGL_accelerate module loaded PREFERENCELIST ('pygame', 'wx', 'glut', 'tk') INFO:OpenGL.extensions:OpenGL Version: 1.5 ATI-1.4.18 INFO:OpenGL.extensions:GL Extension GL_ARB_shader_objects available INFO:OpenGL.extensions:Chose alternate: glCreateShaderObjectARB from glCreateShader, glCreateShaderObjectARB INFO:OpenGL.extensions:Chose alternate: glShaderSourceARB from glShaderSource, glShaderSourceARB INFO:OpenGL.extensions:Chose alternate: glCompileShaderARB from glCompileShader, glCompileShaderARB INFO:OpenGL.extensions:Chose alternate: glGetObjectParameterivARB from glGetShaderiv, glGetObjectParameterivARB INFO:OpenGL.extensions:Chose alternate: glCreateProgramObjectARB from glCreateProgram, glCreateProgramObjectARB INFO:OpenGL.extensions:Chose alternate: glAttachObjectARB from glAttachShader, glAttachObjectARB INFO:OpenGL.extensions:Chose alternate: glLinkProgramARB from glLinkProgram, glLinkProgramARB INFO:OpenGL.extensions:Chose alternate: glValidateProgramARB from glValidateProgram, glValidateProgramARB INFO:OpenGL.extensions:Chose alternate: glGetObjectParameterivARB from glGetProgramiv, glGetObjectParameterivARB INFO:OpenGL.extensions:Chose alternate: glDeleteObjectARB from glDeleteShader, glDeleteObjectARB INFO:OpenGL.extensions:GL Extension GL_ARB_vertex_shader available INFO:OpenGL.extensions:Chose alternate: glGetAttribLocationARB from glGetAttribLocation, glGetAttribLocationARB INFO:OpenGL.extensions:Chose alternate: glGetUniformLocationARB from glGetUniformLocation, glGetUniformLocationARB INFO:OpenGL.extensions:GL Extension GL_ARB_occlusion_query available INFO:OpenGL.extensions:GL Extension GL_ARB_point_parameters available INFO:OpenGL.extensions:GL Extension GL_EXT_point_parameters unavailable INFO:OpenGL.extensions:Chose alternate: glUseProgramObjectARB from glUseProgram, glUseProgramObjectARB INFO:OpenGL.extensions:Chose alternate: glUniform1fARB from glUniform1f, glUniform1fARB INFO:OpenGL.extensions:GL Extension GL_ARB_vertex_buffer_object available INFO:OpenGL.extensions:GL Extension GL_ARB_vertex_program available INFO:OpenGL.extensions:Chose alternate: glEnableVertexAttribArrayARB from glEnableVertexAttribArray, glEnableVertexAttribArrayARB INFO:OpenGL.extensions:Chose alternate: glVertexAttribPointerARB from glVertexAttribPointer, glVertexAttribPointerARB INFO:OpenGL.extensions:Chose alternate: glDisableVertexAttribArrayARB from glDisableVertexAttribArray, glDisableVertexAttribArrayARB |
From: Ian M. <geo...@gm...> - 2009-08-17 02:13:23
|
On Sun, Aug 16, 2009 at 4:13 PM, Mike C. Fletcher <mcf...@vr...>wrote: Well, the issue was me not knowing what I was doing :-) It's working perfectly now, thanks! > """Test that glDrawBuffers with list argument where value is set""" > previous = glGetIntegerv( GL_READ_BUFFER ) Ah...not glGetString > fbo = glGenFramebuffersEXT(1) > glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo) > try: > img1,img2 = glGenTextures(2) > for img in img1,img2: > glBindTexture( GL_TEXTURE_2D, img ) > glTexImage2D( > GL_TEXTURE_2D, 0, GL_RGB8, > 300, 300, 0, GL_RGB, > GL_INT, > None # no data transferred > ) > > > glFramebufferTexture2DEXT( > GL_FRAMEBUFFER_EXT, > GL_COLOR_ATTACHMENT0_EXT, > GL_TEXTURE_2D, img1, 0 > ) > glFramebufferTexture2DEXT( > GL_FRAMEBUFFER_EXT, > GL_COLOR_ATTACHMENT1_EXT, > GL_TEXTURE_2D, img2, 0 > ) > a_type = constants.GLenum*2 > drawingBuffers = a_type( > GL_COLOR_ATTACHMENT0_EXT, > GL_COLOR_ATTACHMENT1_EXT, > ) > glDrawBuffers(2, drawingBuffers ) > glReadBuffer( GL_COLOR_ATTACHMENT1_EXT ) > pixels = glReadPixels( 0,0, 10,10, GL_RGB, GL_UNSIGNED_BYTE ) > assert len(pixels) == 300, len(pixels) > finally: > glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, 0 ) Ah...not GL_AUX*i* > glReadBuffer( previous ) Ah...not glReadBuffer(GL_BACK) > Can you give me a script that shows the failure? > > Good luck, > Mike Ian |
From: Mike C. F. <mcf...@vr...> - 2009-08-16 23:46:26
|
Joshua Davis wrote: > While hoping for a response to my previous question, I'm trying to > run the tutorial at > > http://bazaar.launchpad.net/~mcfletch/openglcontext/trunk/annotate/ > head:/tests/shader_4.py > > as it is written, verbatim. The thing requires OpenGLContext and its > various dependencies, which are listed at > > http://pyopengl.sourceforge.net/documentation/installation.html > > I've installed PyDispatcher, SimpleParse 2.1.1a2, TTFQuery 1.0.1, > FontTools (for Numpy) 2.1a1, and OpenGLContext 2.1.0a5. Supposedly > SimpleParse 2.1 provides the VRML97 parser, and the directory > OpenGLContext/loaders/ contains vrml.py, but I still get this error: > Afraid I forgot to update the documentation when I split out the PyVRML97 project out. I've updated it to point to the PyVRML97 project. HTH, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |