Re: [PyOpenGL-Users] Using framebuffers
Brought to you by:
mcfletch
|
From: Ian M. <ia...@ge...> - 2016-05-28 20:32:57
|
> > I am using GLFW to generate the window, and my opengl version on OSX is > 4.1. You are using pygame for that purpose. Do you think that might be the > source of my problem? > I was at the airport, and couldn't answer this immediately. There are two basic ways to get functionality in GL. Either you load it from an extension (which PyOpenGL handily does for you) or you use the core API. The "Right Thing" is to use the core API if available, with a fallback to the extension, with a fallback to a different algorithm. In practice, people commonly pick one and go with it. I picked the extension, because it's more widely compatible than core, but still not giving up on the functionality entirely. The reason it didn't work for you is probably that GLFW created a forward-compatible-only GL context (which removes older extensions). If you instead request an ordinary context, the FBOs extension should work fine. OTOH, most computers nowadays, even Macs, support a high-enough core GL for the non-extension FBOs, so it sortof doesn't matter whether you pick the extension or the core. I wasn't able to "pip install pygame" to install pygame, hence I am > hesitant to use it. > PyGame is a very good software package, especially for low-perf 2D drawing. It's how I got started in graphics programming and I recommend it still. It is unfortunate that distributions haven't been made available, and this is a source of active . . . consternation . . . on the PyGame list. Unofficial pip wheels can be found here <http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame>, or you can use the (somewhat outdated) installers on the site <http://www.pygame.org/download.shtml>. By the way, I saw your amazing explanation on why y-axis should mean > upwards direction on your website: "Part of the problem was that Blender, > like many other modeling softwares use z for up, which is morally wrong > (TL;DR: If y is "up" in 2D (clue: it is), then it should also be "up" in > 3D; it's demented to redefine it to mean something literally orthogonal to > its original meaning when you simply add a new coordinate)" Even though, as > a physicist, I am in the "z is up" camp, I appreciated the persuasion power > and simplicity of your argument. Also, my girlfriend agrees with you. :-) > I'm glad you enjoyed it <http://geometrian.com/programming/tutorials/graphicstips/zaxis/index.php>! I must say, though, that it's unfortunately not one of my better argumentative pieces. In fact, it's probably my worst--even counting my incredibly poorly received rant on TTD. Rewriting it to be more coherent is on my (long) todo list. Ian |