Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
glBegin() context manager?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Mark  
View profile  
 More options Nov 1 2012, 5:11 am
From: Mark <l...@qtrac.plus.com>
Date: Thu, 1 Nov 2012 02:11:02 -0700 (PDT)
Local: Thurs, Nov 1 2012 5:11 am
Subject: glBegin() context manager?
Rather than writing:

glBegin()
... draw
glEnd()

it would be nice to write:

with glContext():
    ... draw

I know I can easily create my own glContext context manager, but it
just seems that it would be nicer built in. Or is there one and I just
haven't found it?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
anatoly techtonik  
View profile  
 More options Nov 1 2012, 7:14 am
From: anatoly techtonik <techto...@gmail.com>
Date: Thu, 1 Nov 2012 04:14:35 -0700 (PDT)
Local: Thurs, Nov 1 2012 7:14 am
Subject: Re: glBegin() context manager?

Just want to make sure that you aware that immediate mode is deprecated in modern
OpenGL versions <http://arcsynthesis.org/gltut/>.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark  
View profile  
 More options Nov 1 2012, 7:19 am
From: Mark <l...@qtrac.plus.com>
Date: Thu, 1 Nov 2012 04:19:53 -0700 (PDT)
Local: Thurs, Nov 1 2012 7:19 am
Subject: Re: glBegin() context manager?
I didn't know that. At the moment I'm working through the 4th edn. of
the Open GL SuperBible...

On 1 Nov, 11:14, anatoly techtonik <techto...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
anatoly techtonik  
View profile  
 More options Nov 1 2012, 8:50 am
From: anatoly techtonik <techto...@gmail.com>
Date: Thu, 1 Nov 2012 15:50:06 +0300
Local: Thurs, Nov 1 2012 8:50 am
Subject: Re: glBegin() context manager?

These are deprecated since OpenGL 3.1
http://www.icare3d.org/news_articles/opengl_3-1_specifications.html

Here is the PDF with some differences explained
http://campar.cs.tum.edu/files/teaching/2011ss/KinectCourse/IntroOpen...
--
anatoly t.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Griffiths  
View profile  
 More options Nov 19 2012, 7:42 pm
From: Adam Griffiths <adam.lw.griffi...@gmail.com>
Date: Mon, 19 Nov 2012 16:42:49 -0800 (PST)
Local: Mon, Nov 19 2012 7:42 pm
Subject: Re: glBegin() context manager?

I've implemented some context managers here:
https://github.com/adamlwgriffiths/PyGLy/blob/master/pygly/gl/legacy/...

Note the legacy module prefix.

Also, be aware that using multiple context managers in a single with
statement will result in undesired behavior due to the order that python
unwinds them.

Ie:

with matrix_mode( GL_PROJECTION ), matrix( projmatrix ):
   pass

Python unwinds in the same order it set (go figure), so the following will
occur:

matrix mode begins unknown
matrix mode push - matrix mode now projection
matrix push - matrix added to projection matrix stack
matrix mode pop - projection mode popped from matrix mode, matrix mode
unknown
matrix pop - matrix popped from unknown matrix stack

Cheers,
Adam


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »