pyopengl-users Mailing List for PyOpenGL (Page 20)
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: Derakon <de...@gm...> - 2012-02-16 19:10:09
|
On further investigation, those functions weren't available because I didn't have an OpenGL context yet. My bad. Moving the set-up to later on in the program (the first paint call) instead gives these errors: RuntimeError: ('Shader compile failure (0): 0(3) : error C7533: global variable gl_ModelViewProjectionMatrix is deprecated after version 120\n0(3) : error C7533: global variable gl_Vertex is deprecated after version 120\n', ['#version 330\n void main() {\n gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n }'], GL_VERTEX_SHADER) Feel free to correct me, but it looks like this means that the tutorial is using deprecated concepts? GL_VERSION is 3.3.0 and GL_SHADER_VERSION is "3.30 NVIDIA via Cg compiler", for what it's worth. -Chris On Thu, Feb 16, 2012 at 10:05 AM, Derakon <de...@gm...> wrote: > I'm trying to figure out OpenGL 3. Well, really I'm trying to figure > out fragment shaders so I can do a false-color filter for my > monochrome camera displays, but the fragment shader tutorial is also > an OpenGL 3 tutorial, so it's off the deep end I go. I took a look at > the shaders tutorial: > http://pyopengl.sourceforge.net/context/tutorials/shader_1.xhtml > > The first problem I run into is literally a context problem: I have no > idea what the high-level structure of the tutorial is because it's > broken up into chunks of a few lines at a time separated by > explanatory text. That'd be fine if the script were repeated without > those interruptions at some point, or if the chunks of program were > bigger, but as it stands the code part of the tutorial is very hard to > read. > > The second problem I have is also a context problem: OpenGLContext > doesn't exist for me. I have a standard Windows Python 2.7 / PyOpenGL > / numpy install. Fortunately I have some prior experience with OpenGL > and guess that I can work around this by using WX rendering contexts > instead. So I adapt the tutorial script to this standalone program: > http://pastebin.com/KWwi1Ahi > > However, when I run this, I get the following error when the first > call to shaders.compileShader is made: > OpenGL.error.NullFunctionError: Attempt to call an undefined alternate > function (glCreateShader, glCreateShaderObjectARB), check for > bool(glCreateShader) before calling > > Amusingly, calling glGetBoolean(glCreateShader) throws *another* error: > KeyError: ('Unknown specifier > <OpenGL.platform.baseplatform.glCreateShader object at > 0x00000000031360F0>', 'Failure in cConverter > <OpenGL.converters.SizedOutput object at 0x0000000002E27748>', > (<OpenGL.platform.baseplatform.glCreateShader object at > 0x00000000031360F0>,), 1, <OpenGL.wrapper.glGetIntegerv object at > 0x000000000305D4C8>) > > -Chris |
From: Derakon <de...@gm...> - 2012-02-16 18:05:43
|
I'm trying to figure out OpenGL 3. Well, really I'm trying to figure out fragment shaders so I can do a false-color filter for my monochrome camera displays, but the fragment shader tutorial is also an OpenGL 3 tutorial, so it's off the deep end I go. I took a look at the shaders tutorial: http://pyopengl.sourceforge.net/context/tutorials/shader_1.xhtml The first problem I run into is literally a context problem: I have no idea what the high-level structure of the tutorial is because it's broken up into chunks of a few lines at a time separated by explanatory text. That'd be fine if the script were repeated without those interruptions at some point, or if the chunks of program were bigger, but as it stands the code part of the tutorial is very hard to read. The second problem I have is also a context problem: OpenGLContext doesn't exist for me. I have a standard Windows Python 2.7 / PyOpenGL / numpy install. Fortunately I have some prior experience with OpenGL and guess that I can work around this by using WX rendering contexts instead. So I adapt the tutorial script to this standalone program: http://pastebin.com/KWwi1Ahi However, when I run this, I get the following error when the first call to shaders.compileShader is made: OpenGL.error.NullFunctionError: Attempt to call an undefined alternate function (glCreateShader, glCreateShaderObjectARB), check for bool(glCreateShader) before calling Amusingly, calling glGetBoolean(glCreateShader) throws *another* error: KeyError: ('Unknown specifier <OpenGL.platform.baseplatform.glCreateShader object at 0x00000000031360F0>', 'Failure in cConverter <OpenGL.converters.SizedOutput object at 0x0000000002E27748>', (<OpenGL.platform.baseplatform.glCreateShader object at 0x00000000031360F0>,), 1, <OpenGL.wrapper.glGetIntegerv object at 0x000000000305D4C8>) -Chris |
From: Nicolas R. <Nic...@in...> - 2012-02-11 11:08:45
|
Have a look at glumpy. Colorization is done using a pixel shader and the colormap is stored in a 1D texture. http://code.google.com/p/glumpy/ Nicolas On Feb 11, 2012, at 0:43 , Gordon Wrigley wrote: > I would think the normal approach would be to use a fragment shader to do a texture lookup, using your 16-bit colors brightness values as the texture coordinate. That would allow a totally arbitrary mapping between input brightness and output color. > > On Sat, Feb 11, 2012 at 10:26 AM, Mike C. Fletcher <mcf...@vr...> wrote: > On 12-02-10 05:33 PM, Derakon wrote: > > I have a program that displays monochrome camera images, obtained as > > Numpy arrays of 16-bit integer pixel brightnesses. I'd like to have a > > false-color mode that displays low values as blue and high values as > > red, to get some extra contrast and make it easier to tell where the > > brightest pixels in the image are. I did some searching around and > > about all I can find is some discussion on using color-index mode, > > with concern that it's really meant for palettized sprites and isn't > > really recommended these days. Is that accurate? > > > > Presumably this task has been done before; what's the recommended way > > to do false color? Especially, I want to be able to rescale what value > > is considered the darkest and what the brightest on the fly -- for > > example, if I get an image where the distance between darkest and > > brightest pixel is only 1000 (~10 bits) then I don't want to be > > scaling things as if the brightest pixel is 2^16-1 and the darkest is > > 0. > > > > Any advice would be recommended. Thanks. > Why not simply do the scaling in the numpy array? That is, to increase > the dynamic range array = array - min( array); array = array * > (2**16-1/max(array)) (sorry if I messed up the numbers there, hopefully > you get the idea, I have a two year old yelling in my ear at the > moment). To do the false-color, you can use a shader, or just duplicate > the data into RGB channels. Indexed-color mode is pretty poorly > tested/supported these days; it may work, but I can't say I've used it > in the last decade or so. > > HTH, > Mike > > -- > ________________________________________________ > Mike C. Fletcher > Designer, VR Plumber, Coder > http://www.vrplumber.com > http://blog.vrplumber.com > > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/_______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users |
From: Gordon W. <go...@to...> - 2012-02-10 23:43:13
|
I would think the normal approach would be to use a fragment shader to do a texture lookup, using your 16-bit colors brightness values as the texture coordinate. That would allow a totally arbitrary mapping between input brightness and output color. On Sat, Feb 11, 2012 at 10:26 AM, Mike C. Fletcher <mcf...@vr...>wrote: > On 12-02-10 05:33 PM, Derakon wrote: > > I have a program that displays monochrome camera images, obtained as > > Numpy arrays of 16-bit integer pixel brightnesses. I'd like to have a > > false-color mode that displays low values as blue and high values as > > red, to get some extra contrast and make it easier to tell where the > > brightest pixels in the image are. I did some searching around and > > about all I can find is some discussion on using color-index mode, > > with concern that it's really meant for palettized sprites and isn't > > really recommended these days. Is that accurate? > > > > Presumably this task has been done before; what's the recommended way > > to do false color? Especially, I want to be able to rescale what value > > is considered the darkest and what the brightest on the fly -- for > > example, if I get an image where the distance between darkest and > > brightest pixel is only 1000 (~10 bits) then I don't want to be > > scaling things as if the brightest pixel is 2^16-1 and the darkest is > > 0. > > > > Any advice would be recommended. Thanks. > Why not simply do the scaling in the numpy array? That is, to increase > the dynamic range array = array - min( array); array = array * > (2**16-1/max(array)) (sorry if I messed up the numbers there, hopefully > you get the idea, I have a two year old yelling in my ear at the > moment). To do the false-color, you can use a shader, or just duplicate > the data into RGB channels. Indexed-color mode is pretty poorly > tested/supported these days; it may work, but I can't say I've used it > in the last decade or so. > > HTH, > Mike > > -- > ________________________________________________ > Mike C. Fletcher > Designer, VR Plumber, Coder > http://www.vrplumber.com > http://blog.vrplumber.com > > > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > 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...> - 2012-02-10 23:26:12
|
On 12-02-10 05:33 PM, Derakon wrote: > I have a program that displays monochrome camera images, obtained as > Numpy arrays of 16-bit integer pixel brightnesses. I'd like to have a > false-color mode that displays low values as blue and high values as > red, to get some extra contrast and make it easier to tell where the > brightest pixels in the image are. I did some searching around and > about all I can find is some discussion on using color-index mode, > with concern that it's really meant for palettized sprites and isn't > really recommended these days. Is that accurate? > > Presumably this task has been done before; what's the recommended way > to do false color? Especially, I want to be able to rescale what value > is considered the darkest and what the brightest on the fly -- for > example, if I get an image where the distance between darkest and > brightest pixel is only 1000 (~10 bits) then I don't want to be > scaling things as if the brightest pixel is 2^16-1 and the darkest is > 0. > > Any advice would be recommended. Thanks. Why not simply do the scaling in the numpy array? That is, to increase the dynamic range array = array - min( array); array = array * (2**16-1/max(array)) (sorry if I messed up the numbers there, hopefully you get the idea, I have a two year old yelling in my ear at the moment). To do the false-color, you can use a shader, or just duplicate the data into RGB channels. Indexed-color mode is pretty poorly tested/supported these days; it may work, but I can't say I've used it in the last decade or so. HTH, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |
From: Derakon <de...@gm...> - 2012-02-10 22:33:58
|
I have a program that displays monochrome camera images, obtained as Numpy arrays of 16-bit integer pixel brightnesses. I'd like to have a false-color mode that displays low values as blue and high values as red, to get some extra contrast and make it easier to tell where the brightest pixels in the image are. I did some searching around and about all I can find is some discussion on using color-index mode, with concern that it's really meant for palettized sprites and isn't really recommended these days. Is that accurate? Presumably this task has been done before; what's the recommended way to do false color? Especially, I want to be able to rescale what value is considered the darkest and what the brightest on the fly -- for example, if I get an image where the distance between darkest and brightest pixel is only 1000 (~10 bits) then I don't want to be scaling things as if the brightest pixel is 2^16-1 and the darkest is 0. Any advice would be recommended. Thanks. -Chris |
From: Gordon L. K. <gl...@uc...> - 2012-02-08 00:16:28
|
I probably have no business piping up here, but the mere sufficiency of using old versions may not be as valuable as the future-proof-ness of using new versions. For educational and open-source settings, and especially if its a new project being created from scratch, I think its nice to be able to work within a context that wholly avoids deprecated functionality. The number of people for whom modern OpenGL functionality is thought of as an "extension" will be monotonically decreasing, no? Gordon On Feb 7, 2012, at 2:24 PM, Ian Mallett wrote: > It's a classic debate--newness or backwards compatibility. However, in this case, it's much simpler: > > I hate OpenGL 3 and 4. They're not an improvement over OpenGL 2, and moreover they do away with nice things (e.g., glVertex, matrices, etc.). About the only thing they do that's good is make some extensions into core functionality. There's something to be said for that, but often it's nothing that's precluded just by using those extensions in the first place. > > I find that OpenGL 2 is perfectly sufficient. It has all the extensions I want for advanced functionality, and it's portable to all devices that are powerful enough to warrant actually doing GPU computing in the first place. > > Finally, I don't support Intel integrated crap. They have dodgy implementations of graphics APIs at best. In my experience, brand new chipsets don't even have support for OpenGL features that were core functionality a decade ago. Lastly on hardware: AMD's GPUs have incorrect GLSL compilers, and NVIDIA's aren't strict enough, though both have been improving over time. > > Ian > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d_______________________________________________ > 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...> - 2012-02-07 20:25:19
|
It's a classic debate--newness or backwards compatibility. However, in this case, it's much simpler: I hate OpenGL 3 and 4. They're not an improvement over OpenGL 2, and moreover they do away with nice things (e.g., glVertex, matrices, etc.). About the only thing they do that's good is make some extensions into core functionality. There's something to be said for that, but often it's nothing that's precluded just by using those extensions in the first place. I find that OpenGL 2 is perfectly sufficient. It has all the extensions I want for advanced functionality, and it's portable to all devices that are powerful enough to warrant actually doing GPU computing in the first place. Finally, I don't support Intel integrated crap. They have dodgy implementations of graphics APIs at *best*. In my experience, brand new chipsets don't even have support for OpenGL features that were core functionality a decade ago. Lastly on hardware: AMD's GPUs have incorrect GLSL compilers, and NVIDIA's aren't strict enough, though both have been improving over time. Ian |
From: Matthew B. <mat...@gm...> - 2012-02-07 20:18:47
|
Hi, On Tue, Feb 7, 2012 at 8:11 PM, Mike C. Fletcher <mcf...@vr...> wrote: > On 12-02-07 02:39 PM, Matthew Brett wrote: >> Hi, >> >> I am sorry if this question has been asked before, but, are there any >> resources to get an idea of what proportion of PCs / laptops in >> current use have OpenGL 3, or OpenGL 4? Or more detail on which >> extensions might be available? >> >> I'm just starting a library that I suppose won't be used widely for at >> least the next 6 months and I wanted to know if I should start with >> OpenGL 3 or stick to OpenGL 1 / 2. >> >> Thanks a lot for any advice, sorry if the question is ignorant, > Depends on your target audience; for instance, the steam survey (mostly > "hardcore" gamers) says that among them ~93% have DirectX 10 capable > GPUs (supporting e.g. geometry shaders, so ~ OpenGL 3.x level of support > IIUC). For casual gamers the percentages will be lower, particularly as > many of the cards in non-gamer machines will be Intel integrated chips, > which are IIRC 2.0 with some 2.1 and 3.x extensions, and even that is > dependent on having up-to-date drivers. If you're planning to port to > Android (GLES) then you'll likely need to have both 1.x/2.x (android > 2.1) and 3.x/4.x (anything higher) rendering paths anyway. > > http://store.steampowered.com/hwsurvey/videocard/ Thanks - that's very helpful, Best, Matthew |
From: Mike C. F. <mcf...@vr...> - 2012-02-07 20:11:38
|
On 12-02-07 02:39 PM, Matthew Brett wrote: > Hi, > > I am sorry if this question has been asked before, but, are there any > resources to get an idea of what proportion of PCs / laptops in > current use have OpenGL 3, or OpenGL 4? Or more detail on which > extensions might be available? > > I'm just starting a library that I suppose won't be used widely for at > least the next 6 months and I wanted to know if I should start with > OpenGL 3 or stick to OpenGL 1 / 2. > > Thanks a lot for any advice, sorry if the question is ignorant, Depends on your target audience; for instance, the steam survey (mostly "hardcore" gamers) says that among them ~93% have DirectX 10 capable GPUs (supporting e.g. geometry shaders, so ~ OpenGL 3.x level of support IIUC). For casual gamers the percentages will be lower, particularly as many of the cards in non-gamer machines will be Intel integrated chips, which are IIRC 2.0 with some 2.1 and 3.x extensions, and even that is dependent on having up-to-date drivers. If you're planning to port to Android (GLES) then you'll likely need to have both 1.x/2.x (android 2.1) and 3.x/4.x (anything higher) rendering paths anyway. http://store.steampowered.com/hwsurvey/videocard/ HTH, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |
From: Matthew B. <mat...@gm...> - 2012-02-07 19:39:54
|
Hi, I am sorry if this question has been asked before, but, are there any resources to get an idea of what proportion of PCs / laptops in current use have OpenGL 3, or OpenGL 4? Or more detail on which extensions might be available? I'm just starting a library that I suppose won't be used widely for at least the next 6 months and I wanted to know if I should start with OpenGL 3 or stick to OpenGL 1 / 2. Thanks a lot for any advice, sorry if the question is ignorant, Best, Matthew |
From: Mike C. F. <mcf...@vr...> - 2012-02-03 18:09:23
|
On 12-02-03 01:30 AM, Ian Mallett wrote: > Hi, > On Thu, Feb 2, 2012 at 3:10 PM, Mike C. Fletcher > <mcf...@vr... <mailto:mcf...@vr...>> wrote: > > > That sounds like a failure in the platform module, that is, > either it > It was actually a failure in the refactoring done for the raw > hierarchy > auto-generation. It worked fine on OS-X and Linux, but failed on > Windows, where there is a distinction between core and extension > procedures. > > I'm still seeing a test failure in the GLU tessellation mechanism (on > both Win64 and Linux64), but I've fixed a crashing problem there on > Win64. I'll release another alpha in a few moments to pick up those > fixes, but expect we'll need another fairly soon to pick up the tess > fixes when I get them. > > Where can I get current source/builds? I couldn't find anything > recent on SourceForge. Releases/downloads: http://pypi.python.org/pypi/PyOpenGL Source code: https://code.launchpad.net/pyopengl The tess issues seem to have been there for a long time; it works perfectly well in OpenGLContext' usage and tests, and even works if I copy the OpenGLContext test into a raw test, but the original test doesn't generate vertices (it wasn't checking for that previously). At this point I'm assuming this is just a test-setup issue, so not a critical fix. HTH, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |
From: Ian M. <geo...@gm...> - 2012-02-03 06:30:51
|
Hi, On Thu, Feb 2, 2012 at 3:10 PM, Mike C. Fletcher <mcf...@vr...>wrote: > > That sounds like a failure in the platform module, that is, either it > It was actually a failure in the refactoring done for the raw hierarchy > auto-generation. It worked fine on OS-X and Linux, but failed on > Windows, where there is a distinction between core and extension > procedures. > > I'm still seeing a test failure in the GLU tessellation mechanism (on > both Win64 and Linux64), but I've fixed a crashing problem there on > Win64. I'll release another alpha in a few moments to pick up those > fixes, but expect we'll need another fairly soon to pick up the tess > fixes when I get them. > Where can I get current source/builds? I couldn't find anything recent on SourceForge. > Take care, > Mike Thanks! Ian |
From: Ian M. <geo...@gm...> - 2012-02-03 06:29:09
|
2012/2/2 Stéphane ANCELOT <san...@fr...> > Hi ! > > I want to render font in opengl with transparent background. The main > problem is that my background is always opaque black ! > > Thanks for help. > > here is my code : > > glEnable(GL_BLEND) > glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) > font = > ImageFont.truetype("/usr/share/fonts/truetype/wqy/wqymicrohei.ttc", 16) > textsize = font.getsize(u"当前运行列表") > im = Image.new("RGB",textsize,"#000") > draw = ImageDraw.Draw(im) > transparent_area = (0,0,im.size[0],im.size[1]) > mask=Image.new('L', im.size, color=0) > drawmask = ImageDraw.Draw(mask) > drawmask.rectangle(transparent_area, fill=0) > im.putalpha(mask) > draw.text((0,0), u"当前运行列表", font=font, fill="red") > #im.save('render.png') > ix, iy, image = im.size[0], im.size[1], im.tostring("raw", "RGBA", 0,-1) > glDrawPixels(ix,iy,GL_RGBA,GL_UNSIGNED_BYTE,image) That's . . . not really very complete code. As of now, I'd suspect some sort of issue with setting up the context; you need to request an alpha buffer. I notice the commented line--is there an alpha channel in that image? Ian |
From: Mike C. F. <mcf...@vr...> - 2012-02-02 22:10:55
|
On 12-02-02 11:47 AM, Mike C. Fletcher wrote: > On 12-02-02 10:45 AM, Ian Mallett wrote: ... >> glEnable(GL_LIGHTING) >> >> >> . . . produces (after creating a window, and, therefore hopefully, a >> context): >> ... >> NullFunctionError: Attempt to call an undefined function glEnable, >> check for bool(glEnable) before calling >> >> Help? Thanks, >> Ian > That sounds like a failure in the platform module, that is, either it It was actually a failure in the refactoring done for the raw hierarchy auto-generation. It worked fine on OS-X and Linux, but failed on Windows, where there is a distinction between core and extension procedures. I'm still seeing a test failure in the GLU tessellation mechanism (on both Win64 and Linux64), but I've fixed a crashing problem there on Win64. I'll release another alpha in a few moments to pick up those fixes, but expect we'll need another fairly soon to pick up the tess fixes when I get them. Take care, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |
From: Mike C. F. <mcf...@vr...> - 2012-02-02 16:47:02
|
On 12-02-02 10:45 AM, Ian Mallett wrote: > Hi, > > I just got a new laptop (64 bit, Py2.6), and am going through the > cursory install-everything phase. > > I'm having trouble with PyOpenGL. Standard OpenGL calls appear to be > undefined. The following minimal example: > > from OpenGL.GL import * > from OpenGL.GLU import * > from OpenGL.GLUT import * > import pygame > from pygame.locals import * > pygame.init() > > Screen = (640,480) > pygame.display.set_mode(Screen,OPENGL|DOUBLEBUF) > > glEnable(GL_LIGHTING) > > > . . . produces (after creating a window, and, therefore hopefully, a > context): > > Traceback (most recent call last): > File "C:\Users\Ian Mallett\Desktop\t.py", line 11, in <module> > glEnable(GL_LIGHTING) > File > "C:\dev\Python26\lib\site-packages\pyopengl-3.0.2a3-py2.6.egg\OpenGL\platform\baseplatform.py", > line 377, in __call__ > self.__name__, self.__name__, > NullFunctionError: Attempt to call an undefined function glEnable, > check for bool(glEnable) before calling > > Help? Thanks, > Ian That sounds like a failure in the platform module, that is, either it doesn't find the DLL, or finds the wrong DLL. The most likely cause there is the "64-bit" ness of the machine, as I don't have a 64-bit Windows machine on which to test/work... actually, scratch that, just realized that my server *did* come with a 64-bit Windows... just need to give up the server for an afternoon. My guess is that opengl32, glut32, glu32 are renamed to something like opengl64 or the like. Guess I should fire up Win64 and find out. OpenGL_accelerate is definitely going to be broken/MIA, as it requires compilation and I haven't done that for Win64 before. You could probably put a pdb call in platform/win32.py and figure it out before I get there (I'm going to have to pick up my son in a few minutes), but if not I'll try to get to it this afternoon. Thanks, Mike |
From: Ian M. <geo...@gm...> - 2012-02-02 15:45:30
|
Hi, I just got a new laptop (64 bit, Py2.6), and am going through the cursory install-everything phase. I'm having trouble with PyOpenGL. Standard OpenGL calls appear to be undefined. The following minimal example: from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GLUT import * import pygame from pygame.locals import * pygame.init() Screen = (640,480) pygame.display.set_mode(Screen,OPENGL|DOUBLEBUF) glEnable(GL_LIGHTING) . . . produces (after creating a window, and, therefore hopefully, a context): Traceback (most recent call last): File "C:\Users\Ian Mallett\Desktop\t.py", line 11, in <module> glEnable(GL_LIGHTING) File "C:\dev\Python26\lib\site-packages\pyopengl-3.0.2a3-py2.6.egg\OpenGL\platform\baseplatform.py", line 377, in __call__ self.__name__, self.__name__, NullFunctionError: Attempt to call an undefined function glEnable, check for bool(glEnable) before calling Help? Thanks, Ian |
From: Stéphane A. <san...@fr...> - 2012-02-02 14:01:55
|
Hi ! I want to render font in opengl with transparent background. The main problem is that my background is always opaque black ! Thanks for help. here is my code : glEnable(GL_BLEND) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) font = ImageFont.truetype("/usr/share/fonts/truetype/wqy/wqymicrohei.ttc", 16) textsize = font.getsize(u"当前运行列表") im = Image.new("RGB",textsize,"#000") draw = ImageDraw.Draw(im) transparent_area = (0,0,im.size[0],im.size[1]) mask=Image.new('L', im.size, color=0) drawmask = ImageDraw.Draw(mask) drawmask.rectangle(transparent_area, fill=0) im.putalpha(mask) draw.text((0,0), u"当前运行列表", font=font, fill="red") #im.save('render.png') ix, iy, image = im.size[0], im.size[1], im.tostring("raw", "RGBA", 0,-1) glDrawPixels(ix,iy,GL_RGBA,GL_UNSIGNED_BYTE,image) |
From: Mike C. F. <mcf...@vr...> - 2012-01-31 15:21:24
|
On 12-01-23 06:36 AM, Hans Wurst wrote: > Hello list, > > I found a bug in glBufferSubData while doing the following call: > glBufferSubData(target, offset, np.array((0.5,), dtype=float32)) I've altered the signature and the code slightly so that the code now implements precisely what the documentation said it did; i.e. only considers ints or longs valid sizes, while previously anything that could be converted to ints/longs would be considered a size (a single-item array being something that will convert without a TypeError). Should come out with the next alpha release. ... > Workaround for users: Just give the size on your own (np.array.nbytes) > Solution: I recommend adding these 3 lines right before the try-block: > if data is None: > data = size > size = None > > I hope this helps making PyOpenGL better. > [Sorry if I got the wrong mailing list :(] This is fine as a place to report errors. HTH, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |
From: Hans W. <p-e...@we...> - 2012-01-23 11:36:14
|
Hello list, I found a bug in glBufferSubData while doing the following call: glBufferSubData(target, offset, np.array((0.5,), dtype=float32)) The reason lies within these lines: try: if size is not None: # !!error is here:!! size = int( size ) except TypeError, err: if data is not None: raise TypeError( """Expect an integer size *or* a data-array, not both""" ) My data arrives at the size parameter. But int(np.array((0.5,), dtype=float32) does not raise an error and returns the containing data converted to an integer (which is later used for the size parameter of baseOperation and leads to an error within GL). Workaround for users: Just give the size on your own (np.array.nbytes) Solution: I recommend adding these 3 lines right before the try-block: if data is None: data = size size = None I hope this helps making PyOpenGL better. [Sorry if I got the wrong mailing list :(] Best regards |
From: Alejandro S. <as...@gm...> - 2012-01-22 20:32:29
|
Hi Ian, Thank you for your answer. I reviewed the link you provided as well as a couple of its references. Embarrassingly enough, the problem seems to be the fact that I misread the OpenGL docs. I was under the impression that the glCheckFramebufferStatus function expected the attachment point as its parameter, whereas in fact it was expecting the target (namely GL_FRAMEBUFFER). This is why I was getting an "invalid enumerant" exception. Your point regarding the need to use a Renderbuffer is completely valid, however, they only seem to be mandatory when attaching to the depth and stencil buffers. Thank you for the help. Best, Alejandro.- 2012/1/21 Ian Mallett <geo...@gm...> > Hi, > > You're not setting up the FBO correctly. You need to set up a > renderbuffer, make renderbuffer storage, etc. The status will only be > complete after all setup is completed. > > You can Google for resources. If I recall correctly, it was this link<http://www.gamedev.net/page/resources/_/technical/opengl/opengl-frame-buffer-object-101-r2331>that I found helpful. > > Ian > -- http://alejandrosegovia.net |
From: Ian M. <geo...@gm...> - 2012-01-21 19:52:01
|
Hi, You're not setting up the FBO correctly. You need to set up a renderbuffer, make renderbuffer storage, etc. The status will only be complete after all setup is completed. You can Google for resources. If I recall correctly, it was this link<http://www.gamedev.net/page/resources/_/technical/opengl/opengl-frame-buffer-object-101-r2331>that I found helpful. Ian |
From: Alejandro S. <as...@gm...> - 2012-01-21 19:46:17
|
import pygame from OpenGL.GL import * from OpenGL.GL.framebufferobjects import * import os scr = pygame.display.set_mode((100,100), pygame.OPENGL) glClearColor(0.0,0.0,0.0,0.0) glClear(GL_COLOR_BUFFER_BIT) pygame.display.flip() print "Renderer:" print glGetString(GL_VERSION), glGetString(GL_RENDERER) print os.uname() tex_id = glGenTextures(1) glBindTexture(GL_TEXTURE_2D, tex_id) glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 512, 512, 0, GL_RGB, GL_UNSIGNED_INT, None) glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR) glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR) glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE) glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE) fbo_id = glGenFramebuffersEXT(1) glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo_id) glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, tex_id, 0) assert (glCheckFramebufferStatusEXT(GL_COLOR_ATTACHMENT0_EXT) == GL_FRAMEBUFFER_STATUS_COMPLETE_EXT), "FBO creation failed!" |
From: Urs S. <p-e...@we...> - 2012-01-18 19:53:09
|
Am Montag, den 16.01.2012, 12:41 -0500 schrieb Mike C. Fletcher: > On 12-01-16 12:32 PM, Hans Wurst wrote: > > Hi guys, > > > > I've written the following wrapper-code for glGetUniformIndices: > > > > @lazy( glGetUniformIndices ) > > def glGetUniformIndices(baseOperation, program, uniformNames): > > num = len(uniformNames) > > maxLen = max([len(x) for x in uniformNames])+1 > > names = ((ctypes.c_char * maxLen) * num)() > I believe you want ctypes.c_char_p * num here, with this formulation > you'd then need to create a new array of pointers each of which was > pointing at the beginning of the row for that value. Don't have a > test-case handy to test that assumption, though. > > for i,name in enumerate(uniformNames): > > names[i].value = name > > c_names = ctypes.cast(ctypes.pointer(ctypes.pointer(names)), > > > > ctypes.POINTER(ctypes.POINTER(OpenGL.constants.GLchar))) > > obuff = (ctypes.c_uint32 * num)() > > print ctypes.byref(obuff) > > print c_names > > print "Before", baseOperation.__name__ > > baseOperation(program, num, c_names, ctypes.byref(obuff)) > > print "After", baseOperation.__name__ > > return [o.value for o in obuff] > HTH, > Mike > Sorry for double-mailing my answer, but I think something was wrong with my mail client. I don't understand your suggestion, do you have some example code or can go into more detail please? Code would be great. Thx |
From: Tony P. <emp...@gm...> - 2012-01-16 23:43:11
|
in whish part is swapBuffers() exactly ??? i put on in __init__ and __initiatializaGL and nothing appears and remember my problem is spiral not appears in QGraphicsView,... i don't want it out in the other black windows... check the pic thanxs for your help but still have with the problem :-( any other suggest? 2012/1/16 Mike C. Fletcher <mcf...@vr...> > On 12-01-16 11:30 AM, Tony Peña wrote: > > Hi > > > > With this http://www.siafoo.net/snippet/316 i'm try to load in my > > QGraphicsView with this code > > http://paste.debian.net/152440/ ... and appears the background only > > out of QGraphicvsView and not spiral either like this > > image http://oi43.tinypic.com/2zftnb9.jpg .. any idea to fix this? > Did you remember to call swapBuffers() on the Q GL widget? > > Good luck, > Mike > > -- > ________________________________________________ > Mike C. Fletcher > Designer, VR Plumber, Coder > http://www.vrplumber.com > http://blog.vrplumber.com > > > > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Mar 27 - Feb 2 > Save $400 by Jan. 27 > Register now! > http://p.sf.net/sfu/rsa-sfdev2dev2 > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > -- Antonio Peña Secure email with PGP 0x8B021001 available at http://pgp.mit.edu Fingerprint: 74E6 2974 B090 366D CE71 7BB2 6476 FA09 8B02 1001 |