<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
      <title>Tagged with windowclosing() - Processing 2.x and 3.x Forum</title>
      <link>https://forum.processing.org/two/discussions/tagged/feed.rss?Tag=windowclosing%28%29</link>
      <pubDate>Sun, 08 Aug 2021 19:42:34 +0000</pubDate>
         <description>Tagged with windowclosing() - Processing 2.x and 3.x Forum</description>
   <language>en-CA</language>
   <atom:link href="/two/discussions/taggedwindowclosing%28%29/feed.rss" rel="self" type="application/rss+xml" />
   <item>
      <title>Switching openGL context</title>
      <link>https://forum.processing.org/two/discussion/22449/switching-opengl-context</link>
      <pubDate>Mon, 08 May 2017 07:12:11 +0000</pubDate>
      <dc:creator>JDev</dc:creator>
      <guid isPermaLink="false">22449@/two/discussions</guid>
      <description><![CDATA[<p>I recently had this discussion on stack overflow
<a href="http://stackoverflow.com/questions/43829384/opengl-state-reset?noredirect=1#comment74705693_43829384" target="_blank" rel="nofollow">http://stackoverflow.com/questions/43829384/opengl-state-reset?noredirect=1#comment74705693_43829384</a></p>

<p>and a user pointed me out that maybe i am leaving the openGL context in a different state each run, and that maybe i can switch openGL context.</p>

<p>wich made me look into:
<a href="https://forum.processing.org/two/discussion/2879/processing-2-1-1-how-to-get-the-gl-context" target="_blank" rel="nofollow">https://forum.processing.org/two/discussion/2879/processing-2-1-1-how-to-get-the-gl-context</a></p>

<p>Of course almost anyone seems more in the know about openGL JOGL ecc... than me and im REALLY far from attempting a pull.</p>

<p>i was wondering if it was possible to do something like</p>

<p>"switching context"</p>

<pre><code>    frame.addWindowListener( new WindowAdapter() {
            @ Override
            public void windowClosing(WindowEvent we) {

                "clearing or switching context"

                System.exit(0);
            }
        } );
</code></pre>

<p>and/or maybe if someone can advise me on renderers used by processing or possible combinations to obtain a clean state.</p>

<p>Beacause using awt in addition to processing seems usefull enough to me and its working 80% of the time. of course 20% random fail makes what im doing trash.</p>
]]></description>
   </item>
   </channel>
</rss>