Re: Using framebuffers

Ian Mallett <[email protected]> Sat, 28 May 2016 13:32:36 -0700
Newsgroups gmane.comp.python.opengl.user
Message-ID <CAG4NV=ud2F2VC7s5LzjR1V0xVdWd7t9e8PoW-TMFoHG2kD2wyQ@mail.gmail.com>
--===============1022760398280121253==
Content-Type: multipart/alternative; boundary=001a114385b652f1ae0533eced73

--001a114385b652f1ae0533eced73
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

>
> =E2=80=8BI 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 th=
e
> source of my problem?
>
=E2=80=8BI 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 t=
o
> 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 pow=
er
> 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=E2=80=8B

--001a114385b652f1ae0533eced73
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><blockquote style=3D"margin:0px 0px 0px 0.8ex;border-left:=
1px solid rgb(204,204,204);padding-left:1ex" class=3D"gmail_quote"><div cla=
ss=3D"gmail_default"><span style=3D"font-family:arial,helvetica,sans-serif"=
>=E2=80=8BI am using GLFW to generate the window, and my opengl version on =
OSX is=20
4.1. You are using pygame for that purpose. Do you think that might be=20
the source of my problem?</span></div></blockquote><div><div class=3D"gmail=
_default" style=3D"font-family:times new roman,serif;display:inline">=E2=80=
=8BI was at the airport, and couldn&#39;t answer this immediately.<br><br><=
/div><div class=3D"gmail_default" style=3D"font-family:times new roman,seri=
f;display:inline">There are two basic ways to get functionality in GL. Eith=
er you load it from an extension (which PyOpenGL handily does for you) or y=
ou use the core API. The &quot;Right Thing&quot; 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&#39;s more widely compatible than core, but still=
 not giving up on the functionality entirely.<br><br></div><div class=3D"gm=
ail_default" style=3D"font-family:times new roman,serif;display:inline">The=
 reason it didn&#39;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, mo=
st computers nowadays, even Macs, support a high-enough core GL for the non=
-extension FBOs, so it sortof doesn&#39;t matter whether you pick the exten=
sion or the core.<br><span style=3D"font-family:arial,helvetica,sans-serif"=
><br></span><blockquote style=3D"margin:0px 0px 0px 0.8ex;border-left:1px s=
olid rgb(204,204,204);padding-left:1ex" class=3D"gmail_quote"><span style=
=3D"font-family:arial,helvetica,sans-serif">I wasn&#39;t able to &quot;pip =
install pygame&quot; to install pygame, hence I am hesitant to use it.</spa=
n><br></blockquote></div><div class=3D"gmail_default" style=3D"font-family:=
times new roman,serif;display:inline">PyGame is a very good software packag=
e, especially for low-perf 2D drawing. It&#39;s how I got started in graphi=
cs programming and I recommend it still. It is unfortunate that distributio=
ns haven&#39;t been made available, and this is a source of active . . . co=
nsternation . . . on the PyGame list. Unofficial pip wheels can be found <a=
 href=3D"http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame">here</a>, or yo=
u can use the (somewhat outdated) installers <a href=3D"http://www.pygame.o=
rg/download.shtml">on the site</a>.<br><br><blockquote style=3D"margin:0px =
0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" clas=
s=3D"gmail_quote"><span style=3D"font-family:arial,helvetica,sans-serif">By=
 the way, I saw your amazing explanation on why y-axis should mean=20
upwards direction on your website: &quot;Part of the problem was that=20
Blender, like many other modeling softwares use z =C2=A0for up, which is=20
morally wrong (TL;DR: If y =C2=A0is &quot;up&quot; in 2D (clue: it is), the=
n it should=20
also be &quot;up&quot; in 3D; it&#39;s demented to redefine it to mean some=
thing=20
literally orthogonal to its original meaning when you simply add a new=20
coordinate)&quot; Even though, as a physicist, I am in the &quot;z is up&qu=
ot; camp, I=20
appreciated the persuasion power and simplicity of your argument. Also,=20
my girlfriend agrees with you. :-)</span><br></blockquote></div><div class=
=3D"gmail_default" style=3D"font-family:times new roman,serif;display:inlin=
e">I&#39;m glad you enjoyed <a href=3D"http://geometrian.com/programming/tu=
torials/graphicstips/zaxis/index.php">it</a>! I must say, though, that it&#=
39;s unfortunately not one of my better argumentative pieces. In fact, it&#=
39;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.<br></div>=
<div class=3D"gmail_default" style=3D"font-family:times new roman,serif;dis=
play:inline"><br></div><div class=3D"gmail_default" style=3D"font-family:ti=
mes new roman,serif;display:inline">Ian=E2=80=8B</div>=C2=A0</div></div>

--001a114385b652f1ae0533eced73--


--===============1022760398280121253==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
--===============1022760398280121253==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net
_______________________________________________
PyOpenGL-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyopengl-users

--===============1022760398280121253==--