<?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 fullscreen() - Processing 2.x and 3.x Forum</title>
      <link>https://forum.processing.org/two/discussions/tagged/feed.rss?Tag=fullscreen%28%29</link>
      <pubDate>Sun, 08 Aug 2021 19:56:20 +0000</pubDate>
         <description>Tagged with fullscreen() - Processing 2.x and 3.x Forum</description>
   <language>en-CA</language>
   <atom:link href="/two/discussions/taggedfullscreen%28%29/feed.rss" rel="self" type="application/rss+xml" />
   <item>
      <title>Fullscreen mode with Ubuntu</title>
      <link>https://forum.processing.org/two/discussion/23136/fullscreen-mode-with-ubuntu</link>
      <pubDate>Mon, 19 Jun 2017 20:14:58 +0000</pubDate>
      <dc:creator>PascalAudet</dc:creator>
      <guid isPermaLink="false">23136@/two/discussions</guid>
      <description><![CDATA[<p>On Ubuntu the general menu bar stay visible on Fullscreen and presentation mode.
How can I hide this?</p>

<p><img src="http://medvet.umontreal.ca/lemp/full.png" alt="" /></p>
]]></description>
   </item>
   <item>
      <title>True Fullscreen With Ubuntu</title>
      <link>https://forum.processing.org/two/discussion/26608/true-fullscreen-with-ubuntu</link>
      <pubDate>Fri, 02 Mar 2018 12:30:57 +0000</pubDate>
      <dc:creator>gtz</dc:creator>
      <guid isPermaLink="false">26608@/two/discussions</guid>
      <description><![CDATA[<p>i have trouble running a processing sketch in true fulscreen with ubuntu. i searched the forums and a solution that generally seemed to work was to run the sketch in fullScreen(P2D) instead of the standard renderer. that appears to have worked for some people, but on my machine it doesn't, ubuntu's unity title bar is still visible.</p>

<p>i'd be greatful for any pointers on how to go about that.</p>

<p>a minimal sketch to reproduce the problem would be (i can't seem to figure out how to use code tags with this editor. sorry):</p>

<pre><code>void setup(){
  fullScreen(P2D);
}

void draw(){
  background(0, 255, 0);
}
</code></pre>

<p>resulting in something like this:</p>

<p><img src="https://forum.processing.org/two/uploads/imageupload/877/H3II1UJMFEVF.png" alt="fullscreen_fail" title="fullscreen_fail" /></p>

<p>i'm running ubuntu 6.04 LTS on an 
Intel® Core™ i7-6600U CPU @ 2.60GHz × 4 
with Intel® HD Graphics 520 (Skylake GT2)</p>

<p>thanks for your time.</p>
]]></description>
   </item>
   <item>
      <title>How to start a sketch as fullscreen-window?</title>
      <link>https://forum.processing.org/two/discussion/26514/how-to-start-a-sketch-as-fullscreen-window</link>
      <pubDate>Sat, 24 Feb 2018 19:45:51 +0000</pubDate>
      <dc:creator>Jonas_Karg</dc:creator>
      <guid isPermaLink="false">26514@/two/discussions</guid>
      <description><![CDATA[<p>I'd like to use one of my processing sketches as wallpaper-engine background. In order to be able to use a program as wallpaper however it has to be a fullscreen-window.
No - It's not possible to set the window-size to the screen size.</p>

<p>Thanks in advance.</p>
]]></description>
   </item>
   <item>
      <title>Gif Animation Library - Still having memory leaks</title>
      <link>https://forum.processing.org/two/discussion/26132/gif-animation-library-still-having-memory-leaks</link>
      <pubDate>Fri, 26 Jan 2018 17:09:29 +0000</pubDate>
      <dc:creator>fleetfox</dc:creator>
      <guid isPermaLink="false">26132@/two/discussions</guid>
      <description><![CDATA[<p>Hi,
I already asked this as a new post in an old discussion from two years ago, but as expected nobody answered! ;) So I try my luck again:</p>

<p>I would like to build a wooden frame with a display that shows gifs and jpgs when it is activated by a touch sensor. I am using an Up core board with win10 for this which really is a nice piece of hardware. I am using the gif library from 01010101's github account, which seems to be the newest version (<a href="https://github.com/01010101/GifAnimation" target="_blank" rel="nofollow">https://github.com/01010101/GifAnimation</a>) and works with processing 3.
Unfortunately this library seems to have a memory leak problem as already discussed in here: <a href="https://forum.processing.org/two/discussion/12452/animated-gif-slideshow" target="_blank" rel="nofollow">https://forum.processing.org/two/discussion/12452/animated-gif-slideshow</a>
To be honest this discussion did not help me to fix the memory leak problem with this library. I still get the error message after several gifs are shown. This is my test code I am using to explore possible solutions:</p>

<pre><code>import gifAnimation.*;

Gif myGif;
String[] filenames;
String path;

void setup() {

  fullScreen(P2D);
  frameRate(25);
  imageMode(CENTER);
  path = sketchPath();   
  path = path+"\\files\\GifDiv";       
  filenames = listFileNames(path);
  myGif = new Gif(this, path+"\\"+filenames[int(random(0,filenames.length)-1)]);

}

void draw() {

    if (frameCount == 1 ){
      myGif = new Gif(this, path+"\\"+filenames[int(random(0,filenames.length)-1)]);
      myGif.play();
      println(frameCount);
      println("first Play");
      image(myGif, displayWidth/2, displayHeight/2, myGif.width , myGif.height);    
    } else if (frameCount % 40 == 0){
      myGif.stop();
      myGif.dispose();     
      myGif = null;
      background(0);
      println(frameCount);
      println("clear Cache");
  } else if (frameCount % 40 == 1){
      myGif = new Gif(this, path+"\\"+filenames[int(random(0,filenames.length)-1)]);
      myGif.play();
      println(frameCount);
      println("new Play");
      image(myGif, displayWidth/2, displayHeight/2, myGif.width , myGif.height);
  } else{
    println(frameCount+" just Counting Frames");
    image(myGif, displayWidth/2, displayHeight/2, myGif.width , myGif.height);
  }

}

String[] listFileNames(String dir) {
  File file = new File(dir);
  if (file.isDirectory()) {
    String names[] = file.list();
    return names;
  } else {
    // If it's not a directory
    return null;
  }
}
</code></pre>

<p>The code might seem odd, but I wanted to test what happens when at one frame in time no gif is shown, disposed and set to null. My hope was that in this moment the memory would be cleared. It wasn't!!
The source of this problem might be the libraries dispose() command, which might not totally clear the memory!?  But this is the point where it ends for me as I am too stupid to write pure Java-Code, possibly fix this and compile another version of the library. So my hope is to find somebody here who is library coder and might be willing to help!</p>

<p>Best,
Tim</p>
]]></description>
   </item>
   <item>
      <title>fullScreen()</title>
      <link>https://forum.processing.org/two/discussion/26123/fullscreen</link>
      <pubDate>Fri, 26 Jan 2018 11:44:10 +0000</pubDate>
      <dc:creator>zymon</dc:creator>
      <guid isPermaLink="false">26123@/two/discussions</guid>
      <description><![CDATA[<p>Hi - in fullscreen mode width and height dont seem to work. I am wanting to use Width height to control image location on the screen.  How to do it, anyone?</p>

<p>Cheers!</p>
]]></description>
   </item>
   <item>
      <title>Python Mode : fullScreen() ??</title>
      <link>https://forum.processing.org/two/discussion/24732/python-mode-fullscreen</link>
      <pubDate>Wed, 25 Oct 2017 08:46:53 +0000</pubDate>
      <dc:creator>josephh</dc:creator>
      <guid isPermaLink="false">24732@/two/discussions</guid>
      <description><![CDATA[<p>Hello,</p>

<p>I want to know if the function fullScreen() works on Python Mode because it's missing on the reference page.</p>

<p>Thanks</p>
]]></description>
   </item>
   <item>
      <title>Can you run a sketch on two screens at the same time?</title>
      <link>https://forum.processing.org/two/discussion/25082/can-you-run-a-sketch-on-two-screens-at-the-same-time</link>
      <pubDate>Sat, 18 Nov 2017 21:14:04 +0000</pubDate>
      <dc:creator>Joar_10_aar</dc:creator>
      <guid isPermaLink="false">25082@/two/discussions</guid>
      <description><![CDATA[<p>Hi!
I want two run my processing sketch at two screens at the same time, is that possible? + I want the sketch to have fullscreen at both screens.</p>
]]></description>
   </item>
   <item>
      <title>How to connect these two codes?</title>
      <link>https://forum.processing.org/two/discussion/25568/how-to-connect-these-two-codes</link>
      <pubDate>Thu, 14 Dec 2017 18:44:16 +0000</pubDate>
      <dc:creator>Jinbread</dc:creator>
      <guid isPermaLink="false">25568@/two/discussions</guid>
      <description><![CDATA[<p>Hi,</p>

<p>I want to connect these two codes, but don't know how to do it. 
Basically, what I want to do is when mouse is pressed, it changes to the second code.</p>

<p>Here is first code</p>

<pre lang="processing">

int a = 0;

void setup(){
  fullScreen();
  
  rectMode(CENTER);
  frameRate(100);
  noCursor();
}

void draw() {
  
  int W = displayWidth;
  int H = displayHeight;
  
  if(a &lt; displayWidth ) {
    background(0);  
    
    translate(W/2, H/2);
    for (float i = -3000; i &lt; W; i += 200){
      if(a+i &lt;= displayWidth){
        
        
        noFill();
        strokeWeight(10);
    
        rect(0, 0, a + i, (a + i) * H / W);
        if(a + i &gt; 0) {
          stroke(255);
        } else {
          noStroke();
        }
      }
    }
    //noFill();
    //strokeWeight(10);

    //rect(0, 0, a, a * H / W);
    //stroke(255);      
    
    //a = a - 10;
    a = a + 1;
  } else {
    a = 0;
  }
}

</pre>

<p>Here is the second code:</p>

<pre lang="processing">

import processing.serial.*;
Serial myPort;

float angleX = 0.0;
float angleY = 0.0;

void setup(){
  println(Serial.list());
  myPort = new Serial(this, Serial.list()[1], 9600);
  fullScreen();
  noFill();
  stroke(255);
  strokeWeight(4);
  
  //frameRate(60);
}

String val;

void draw() {
  
  float startX = 100;
  float startY = 20;
  float x = 200;
  float two = sqrt(2);
  float a = x / two;
  float b = x - a;
  
  if (myPort.available() &gt; 0) {
    String val = myPort.readStringUntil('\n');
    String[] list = split(val, 'a');
    if(val != null) {
      int number = int (list[0].trim());
      int number2 = int (list[1].trim());
      background(0);
      // left
      pushMatrix();
      translate(startX, startY + b);
      rotate(radians(angleX));
      rect(0, 0, b, a);
      popMatrix();
      
      pushMatrix();
      translate(startX, startY + a + b);
      rotate(radians(-angleY));
      rect(0, 0, b, a);
      popMatrix();
      
      pushMatrix();
      translate(startX, startY + 2 * a + b);
      rotate(radians(angleX*3));
      rect(0, 0, b, a);
      popMatrix();
    
      pushMatrix();
      translate(startX, startY + 3 * a + b);
      rotate(radians(-angleY*2));
      rect(0, 0, b, a);
      popMatrix();
      
      // top
      pushMatrix();
      translate(startX + b, startY);
      rotate(radians(angleY*5));
      rect(0, 0, a, b);
      popMatrix();
      
      pushMatrix();
      translate(startX + a + b, startY);
      rotate(radians(-angleX*2));
      rect(0, 0, a, b);
      popMatrix();
        
      // right
      pushMatrix();
      translate(startX + b + a * 2, startY + b);
      rotate(radians(angleY*7));
      rect(0, 0, b, a);
      popMatrix();
      
      pushMatrix();
      translate(startX + b + a * 2, startY + a + b);
      rotate(radians(-angleX*3));
      rect(0, 0, b, a);
      popMatrix();
      
      pushMatrix();
      translate(startX + b + a * 2, startY + 2 * a + b);
      rotate(radians(angleY));
      rect(0, 0, b, a);
      popMatrix();
    
      pushMatrix();
      translate(startX + b + a * 2, startY + 3 * a + b);
      rotate(radians(-angleX*5));
      rect(0, 0, b, a);
      popMatrix();
        
      // bottom
      
      pushMatrix();
      translate(startX + b, startY + a * 4 + b);
      rotate(radians(angleY*3));
      rect(0, 0, a, b);
      popMatrix();
      
      pushMatrix();
      translate(startX + a + b, startY + a * 4 + b);
      rotate(radians(-angleX));
      rect(0, 0, a, b);
      popMatrix();
      
      angleX = number;
      angleY = number2;
      
      // debugging
      
      textSize(32);
      text(number, width/2, height/2 + 20); 
      text(number2, width/2, height/2 - 20);
     
      if(number == 357 &amp;&amp; number2 == 357){
        text("done", width/2 + 100, height/2 + 20);
      }
      
    }
  }
}

</pre>
]]></description>
   </item>
   <item>
      <title>Fullframe Video Capture</title>
      <link>https://forum.processing.org/two/discussion/25304/fullframe-video-capture</link>
      <pubDate>Thu, 30 Nov 2017 17:05:06 +0000</pubDate>
      <dc:creator>bonniem</dc:creator>
      <guid isPermaLink="false">25304@/two/discussions</guid>
      <description><![CDATA[<p>Does anyone know how to get this video capture code working at fullScreen( )? When I change it to full screen it does not work at all and I know it is based on the fact this code was written for a specific size and a lot is based on that size.</p>

<p>This is a modification of Daniel Shiffman's Video - Software Mirrors code.  <a href="https://processing.org/tutorials/video/" target="_blank" rel="nofollow">https://processing.org/tutorials/video/</a></p>

<p>Thanks!</p>

<pre><code>import processing.video.*;

// Size of each cell in the grid, ratio of window size to video size
int videoScale = 20;

// Number of columns and rows in the system
int cols, rows;

// Variable to hold onto Capture object
Capture video;

// used for the noise randomness
float xoff = 0.0;
float yoff = 0.0;
float coff = 0.0;


void setup() {  
  size(1280, 720); 
  //fullScreen( );

  // Initialize columns and rows  
  cols = width/videoScale;  
  rows = height/videoScale;  
  background(0);
  video = new Capture(this, cols, rows);
  video.start();
}

// Read image from the camera
void captureEvent(Capture video) {  
  video.read();
}

void draw() {
  video.loadPixels(); 

  // Begin loop for columns  
  for (int i = 0; i &lt; cols; i++) {    
    // Begin loop for rows    
    for (int j = 0; j &lt; rows; j++) {            
      int x = i*videoScale;      
      int y = j*videoScale;
      color c = video.pixels[i + j*video.width];

      fill(c);   
      stroke(0); 

      //rotate the rect
      xoff = xoff + .01;
      float n = noise(xoff) * width;
      pushMatrix( );
      translate(x + videoScale/2, y + videoScale/2);
      rotate(radians(45 + n));
      translate(-(x + videoScale/2), -(y + videoScale/2));

      // draw the rect with the video color
      rect(x, y, videoScale/1.9, videoScale/1.9); 
      popMatrix( );
    }
  }
}
</code></pre>
]]></description>
   </item>
   <item>
      <title>Make a running sketch fullscreen?</title>
      <link>https://forum.processing.org/two/discussion/25203/make-a-running-sketch-fullscreen</link>
      <pubDate>Sun, 26 Nov 2017 06:20:48 +0000</pubDate>
      <dc:creator>azaad</dc:creator>
      <guid isPermaLink="false">25203@/two/discussions</guid>
      <description><![CDATA[<p>I'm curious, is there any way to enter fullscreen mode on a Processing sketch which is already running?</p>
]]></description>
   </item>
   <item>
      <title>How to get the number of displays available ?</title>
      <link>https://forum.processing.org/two/discussion/25062/how-to-get-the-number-of-displays-available</link>
      <pubDate>Fri, 17 Nov 2017 11:57:53 +0000</pubDate>
      <dc:creator>schmittmachine</dc:creator>
      <guid isPermaLink="false">25062@/two/discussions</guid>
      <description><![CDATA[<p>Hello,
I'd like to have my sketch adapt to the number of screens (display) of the computer.
When more than one screen, I display information on the secondary screens, using the multiple sketches technique (<a rel="nofollow" href="https://forum.processing.org/two/discussion/10937/multiple-sketches">https://forum.processing.org/two/discussion/10937/multiple-sketches</a>, and the new fullScreen(displayNumber) function in these secondary sketches.
But I didn't find any way to computationally know the number of available screens, so as to open the right number of secondary sketches automatically...
I guess that the inner code of fullScreen() knows this number. It would be useful to give access to it in the langage.
Thanks for any hint.</p>
]]></description>
   </item>
   <item>
      <title>How to remove the title bar from a sketch?</title>
      <link>https://forum.processing.org/two/discussion/23099/how-to-remove-the-title-bar-from-a-sketch</link>
      <pubDate>Sat, 17 Jun 2017 12:26:51 +0000</pubDate>
      <dc:creator>rajiv_tctech</dc:creator>
      <guid isPermaLink="false">23099@/two/discussions</guid>
      <description><![CDATA[<p>I have a sketch which I want to run in full screen with no title-bar and consequently no minimize/restore/close buttons.</p>

<p>How can I do this?</p>
]]></description>
   </item>
   <item>
      <title>Change screen on a fullscreen app (JOGL &amp; AWT) (and also request focus)</title>
      <link>https://forum.processing.org/two/discussion/25005/change-screen-on-a-fullscreen-app-jogl-awt-and-also-request-focus</link>
      <pubDate>Tue, 14 Nov 2017 14:06:55 +0000</pubDate>
      <dc:creator>MacTuitui</dc:creator>
      <guid isPermaLink="false">25005@/two/discussions</guid>
      <description><![CDATA[<p>Hi, I'm running a sketch on a remote computer and I'm starting by making the app full screen on the secondary monitor on that computer with a fullScreen(X) command.</p>

<p>However for some unknown reasons I'm losing the connection to that second monitor sometimes... the OS thinks the display is not there anymore and brings back the window to the first display.</p>

<p>Is there a way to try to reposition the window to that second screen when it comes back?</p>

<p>In the past I would have made a undecorated window that is the size of the second screen and setLocation(x,y) on that frame, but it looks like it is not straightforward to access the frame anymore.</p>

<p>(as a bonus, I'd also like to be able to "requestFocus" on a fullscreen sketch)</p>

<p>Thanks in advance!</p>
]]></description>
   </item>
   <item>
      <title>Is it possible to run a program in full-screen and prevent the user from exiting/closing the screen?</title>
      <link>https://forum.processing.org/two/discussion/23816/is-it-possible-to-run-a-program-in-full-screen-and-prevent-the-user-from-exiting-closing-the-screen</link>
      <pubDate>Tue, 15 Aug 2017 01:45:12 +0000</pubDate>
      <dc:creator>Robert_Beatty</dc:creator>
      <guid isPermaLink="false">23816@/two/discussions</guid>
      <description><![CDATA[<p>I need to develop a user interface for an interactive museum exhibit. The user will press buttons on a screen and view information on the screen. I would like to use Processing to do it. I see that Processing has a fullScreen command. That's good. Is there a way to run the program in a way such that the user can't close the window and access the desktop/OS? In other words, I'm looking for some sort of museum kiosk mode (a simple password would be required to pull it out of full-screen mode and access the OS). I don't need all the details at this point. I just need to know if it can be done. If it can't be done, I don't think I can use Processing for my project.</p>
]]></description>
   </item>
   <item>
      <title>How to exit fullScreen</title>
      <link>https://forum.processing.org/two/discussion/23819/how-to-exit-fullscreen</link>
      <pubDate>Tue, 15 Aug 2017 13:00:35 +0000</pubDate>
      <dc:creator>bloomboy</dc:creator>
      <guid isPermaLink="false">23819@/two/discussions</guid>
      <description><![CDATA[<p>I have searched the examples and tutorials, and finding it difficult to locate a fix for this,
At present I have a patch that runs successfully and opens fullscreen - When I press escape to exit the patch quits unexpectedly with the issue 'Could not run the sketch (Target VM failed to initialize).'</p>

<p>What am i missing out here?
Can I create a keypress to exit fullScreen and cut out this error?</p>

<pre><code> void setup() {



  fullScreen(P3D);

  PJOGL.profile=1;
    surface.setResizable(true);
</code></pre>
]]></description>
   </item>
   <item>
      <title>Exit full screen mode in python processing?</title>
      <link>https://forum.processing.org/two/discussion/23785/exit-full-screen-mode-in-python-processing</link>
      <pubDate>Sat, 12 Aug 2017 17:59:14 +0000</pubDate>
      <dc:creator>netrate</dc:creator>
      <guid isPermaLink="false">23785@/two/discussions</guid>
      <description><![CDATA[<p>I noticed that</p>

<p>fullScreen()</p>

<p>Works in python processing, but is there a method to use the ESC key or otherwise to close the window?</p>
]]></description>
   </item>
   <item>
      <title>fullScreen(P2D); not working with GLCapture,</title>
      <link>https://forum.processing.org/two/discussion/23688/fullscreen-p2d-not-working-with-glcapture</link>
      <pubDate>Thu, 03 Aug 2017 05:34:10 +0000</pubDate>
      <dc:creator>tLap</dc:creator>
      <guid isPermaLink="false">23688@/two/discussions</guid>
      <description><![CDATA[<p>longtime forum reader first time poster. Hopefully I am doing this correctly, thanks for your patience. 
my program runs fine with display width at 1080, tested on bigger display and does not work.</p>

<p>I am using:
   Raspberry Pi 3b.
   logitech webcam.</p>

<p>1st problem:
GL Video examples work using fullScreen(P2D). The image examples using (P3D) can go full screen; but I can not get the capture example to work in fullscreen even if I am not loading the camera to the canvas. The largest I can get it to display is 1280 width which is the highest my camera will capture. is this related? is there a work around.  size(displayWidth, displayHeight, P2D) works best but there are some weird behaviors on the tv but works great on my mac-book-pro.</p>

<p>2nd problem:
when I run a sketch the camera works the first time, then I close the sketch. When I open it and I get a error ArrayIndexOutOfBoundsException:0   but I only have one camera so its [0]. OR I get no capture devices found. when I hit play again it works just fine.<br />
it finds the devices every other time with out error, Dependably 50% of the time. I tried adding an exit() to see if I needed to turn off the cameras and that does not help, any other suggestions?</p>

<p>I have combed the forums here is a related threads to P2D and fullscreen issues. 
- <a href="https://github.com/processing/processing/issues/5046" target="_blank" rel="nofollow">https://github.com/processing/processing/issues/5046</a> 
- <a href="https://github.com/processing/processing/issues/4561" target="_blank" rel="nofollow">https://github.com/processing/processing/issues/4561</a></p>

<p>again they work for everything but the capture event.</p>

<p>thanks for any advice.</p>

<p>-t</p>
]]></description>
   </item>
   <item>
      <title>Stretch processing sketch to full screen resolution meanwhile it still remain the same pixel as well</title>
      <link>https://forum.processing.org/two/discussion/23326/stretch-processing-sketch-to-full-screen-resolution-meanwhile-it-still-remain-the-same-pixel-as-well</link>
      <pubDate>Wed, 05 Jul 2017 20:02:42 +0000</pubDate>
      <dc:creator>luk1993</dc:creator>
      <guid isPermaLink="false">23326@/two/discussions</guid>
      <description><![CDATA[<p>I developing this game by using this resolution <code>size(600, 800);</code> and every code has been developed based on 600pixels x 800pixels. But then when I tried to scale it to <code>fullScreen();</code>, everything messed and goes wrong. Therefore, I'm seeking the solution of what if only stretch the game to fullscreen but still remain same(600, 800) sketch pixels.</p>

<p>1) 600pixels x 800pixel (develop based on this pixels) but after compiled apk and install to my android phone, it became 
smaller resolution:
<a href="https://www.dropbox.com/s/f18bq75eamxar4k/non-fullscreen.jpg?dl=0" target="_blank" rel="nofollow">https://www.dropbox.com/s/f18bq75eamxar4k/non-fullscreen.jpg?dl=0</a></p>

<p><code>size(600, 800, P2D);</code></p>

<p>2)after I scale it to fullScreen(); it looked like this:
<a href="https://www.dropbox.com/s/qltaescdo421u0z/fullscreen.jpg?dl=0" target="_blank" rel="nofollow">https://www.dropbox.com/s/qltaescdo421u0z/fullscreen.jpg?dl=0</a></p>

<p><code>fullScreen();</code></p>

<pre><code>PFont bitoem;
PImage birdImg, bgImg, obsImg, menuImg, startBtn;
int score = 0, highScore = 0, genestate = 1, x = -200, y, vy = 0,  wx[] = new int[2], wy[] = new int[2];

void setup() {

  fullScreen();
  //size(600, 800, P2D);

  //game images
  birdImg = loadImage("chosenBird_8Bit.png");
  bgImg = loadImage("background_color002(1680x800).jpg");
  obsImg = loadImage("obstacle_long.jpg");
  menuImg = loadImage("startMenu.jpg");
  startBtn = loadImage("startBtn.jpg");
  bitoem = loadFont("8BITWONDERNominal-48.vlw");

  //fonts style
  textFont(bitoem, 24);
  fill(255,255,255);
  textSize(28);

}

void draw() { //runs 60 times a second
  //background image loop
  if(genestate == 0) {
    //background(255,255,255);
    imageMode(CORNER);
    image(bgImg, x, 0);
    image(bgImg, x+bgImg.width, 0);

    x -= 3;
    vy += 1;
    y += vy;

    if(x == -1680) x=0;

    //generate obstacle imgs
    for(int i = 0; i &lt; 2; i++){
      imageMode(CENTER);
      image(obsImg, wx[i], wy[i] - ((obsImg.height/2)+100));
      image(obsImg, wx[i], wy[i] + (obsImg.height/2+100));
      if(wx[i] &lt; 0 ){
        wy[i] = (int)random(200,height -200);
        wx[i] = width;
      }

      //accumulative score
      if(wx[i] == width/2){
        //playerScore.play();
        //playerScore = minim.loadFile("sfx_point.wav");
        highScore = max(++score, highScore);
      }

      //bird image touch obstacle img, it will goes to genestate1
      if(y&gt;height || y&lt;0 || (abs(width/2-wx[i])&lt;25 &amp;&amp; abs(y-wy[i]) &gt; 100))
      genestate=1;
      wx[i] -= 6;


    }

    image(birdImg, width/2, y, 46, 30.5);

    //calculate the score while middle pixel goes through the pipe
    text(""+score, width/2-15, 70);
  }

  else{
      imageMode(CENTER);
      image(menuImg, width/2, height/2);
      image(startBtn, width/2, 500); 
      text(highScore, 350, width/2-15);

   }
}

void mousePressed(){
  vy =- 17;


  if(genestate == 1){
    wx[0] = 600;
    wy[0] = y = height/2;
    wx[1] = 900;
    wy[1] = 600;
    x = genestate = score = 0;    
  }
}
</code></pre>
]]></description>
   </item>
   <item>
      <title>Can I decrease lag when using multiple images?</title>
      <link>https://forum.processing.org/two/discussion/23179/can-i-decrease-lag-when-using-multiple-images</link>
      <pubDate>Fri, 23 Jun 2017 13:17:16 +0000</pubDate>
      <dc:creator>Max_b_jo</dc:creator>
      <guid isPermaLink="false">23179@/two/discussions</guid>
      <description><![CDATA[<p>Hi! 3rd question here and this time I don't think I can solve it by myself.</p>

<p>I have a bunch of images displayed and rotating. It runs fine in a smaller window but lags in a larger. So I'm wondering if there's a better way for me to do this. I'll post the main sketch and the class pic_map that actually draws it. Please help my brain. Am I using to many pictures? The average size of the images are 7k.</p>

<p>Main:</p>

<pre><code>pic_map[] p;

PImage[] img; 

color[] c = new color[24];

int[] x = {415, 285, 143, 459, 336, 195, 524, 435, 340, 629, 600, 554, 754, 779, 813, 865, 944, 1039, 923, 1044, 1181, 944, 1070, 1220};

int[] y = {684, 698, 711, 553, 508, 454, 446, 351, 241, 380, 250, 113, 389, 261, 115, 454, 350, 247, 558, 510, 454, 687, 691, 692};

int[] s_ize = {120, 130, 150, 120, 130, 150, 120, 130, 150, 120, 130, 150, 120, 130, 150, 120, 130, 150, 120, 130, 150, 120, 130, 150};

String[][] path = {
  {"bilder/A/0.png", "bilder/A/1.png"},
  {"bilder/B/0.png", "bilder/B/1.png", "bilder/B/2.png"},
  {"bilder/C/0.png", "bilder/C/1.png"},
  {"bilder/D/0.png", "bilder/D/1.png", "bilder/D/2.png"},
  {"bilder/E/0.png", "bilder/E/1.png"},
  {"bilder/F/0.png"},
  {"bilder/G/0.png", "bilder/G/1.png", "bilder/G/1.png"},
  {"bilder/H/0.png", "bilder/H/1.png", "bilder/H/2.png", "bilder/H/3.png"},
  {"bilder/I/0.png", "bilder/I/1.png", "bilder/I/2.png", "bilder/I/3.png"},
  {"bilder/J/0.png", "bilder/J/1.png"},
}; 

float[][] rot = {
  {0.5, 1.0},
  {0.5, 1.1, -0.2},
  {0.6, -1.0},
  {0.5, 1.0, -0.3},
  {0.5, 1.0},
  {0.3},
  {0.5, 0.5, -0.5},
  {0.6, 0.4, -0.5, 0.4},
  {0.5, 0.5, -0.5, 0.4},
  {0.8, 0.3, -0.5}
};

float ratio = 1;


void setup() {
  //fullScreen();

  frameRate(30
  );

  size(500,300);
  ratio = float(width) / 1280.0;
  print(ratio);

  p = new pic_map[10];
  for(int i = 0; i &lt; 10; i++){
    p[i] = new pic_map(s_ize[i]*ratio, path[i], rot[i]);
  }

  rectMode(CENTER);
}

void draw()
{
  test_set();
}

void test_set(){
  background(0);
  for (int i = 0; i &lt; 24; i++) {
      int h = i%10;
      p[h].draw_it(x[i]*ratio, y[i]*ratio);
    }
}
</code></pre>

<p>Pic map:</p>

<pre><code>class pic_map{

  PImage[] img;
  float size;

  float[] rotate_box;

  float[] rotation = {1,1,1};

  //Scale
  int scale = 0;
  int top = 50;
  int low = 0;

  pic_map(float siz, String[] path, float[] rot) {

    rotate_box = new float[rot.length];
    rotate_box = rot;

    size = siz;

    img = new PImage[path.length];
    for(int i = 0; i &lt; path.length; i++){
      img[i] = loadImage(path[i]);
    }

    rotation = new float[path.length];

    imageMode(CENTER);
  }

  void rotate_it(int index, float rot){
    rotate_box[index] = rot;
  }


  void scale_set(int s, int t, int l){
    scale = s;
    top = t;
    low = l;
  }

  void draw_it(float x, float y){

    size = size + scale % (top-low);

    for(int i = 0; i &lt; img.length; i++){
      rotation[i] = (rotation[i] + rotate_box[i]) % 100;
      pushMatrix();
      translate(x, y);
      rotate(PI*(rotation[i]/100 * 2));
      image(img[i], 0, 0, size+low, size+low);
      popMatrix();

    }
  }
}
</code></pre>
]]></description>
   </item>
   <item>
      <title>Functions doesn't exist</title>
      <link>https://forum.processing.org/two/discussion/23158/functions-doesn-t-exist</link>
      <pubDate>Wed, 21 Jun 2017 15:37:27 +0000</pubDate>
      <dc:creator>Maxcom123</dc:creator>
      <guid isPermaLink="false">23158@/two/discussions</guid>
      <description><![CDATA[<p>When I write the following code in Android mode, it instantly tells me: "The function "fullScreen()" does not exist".</p>

<p>void setup() {
  fullScreen();
}</p>

<p>When I do this in Java mode, it works.
Any help?</p>
]]></description>
   </item>
   <item>
      <title>Canvas size does not fill Android Emulator screen</title>
      <link>https://forum.processing.org/two/discussion/22948/canvas-size-does-not-fill-android-emulator-screen</link>
      <pubDate>Mon, 05 Jun 2017 23:17:52 +0000</pubDate>
      <dc:creator>mapk</dc:creator>
      <guid isPermaLink="false">22948@/two/discussions</guid>
      <description><![CDATA[<p>I'm using Android Studio and am aware that the <code>size()</code> method doesn't work, so I tried removing it altogether, but my canvas is super small within the emulator. Anyone know how to force it to be fullscreen?</p>

<pre><code>public class Sketch extends PApplet {

    public void setup() {
        background(52,74,85);
        noLoop();
    }

    public void draw() {
        ellipse(width/2, height/2, 100, 100);
    }
}
</code></pre>

<p>IMAGE:
<img src="https://cldup.com/r8GdGJbUhp.png" alt="" /></p>
]]></description>
   </item>
   <item>
      <title>Cannot override the final method from PApplet error</title>
      <link>https://forum.processing.org/two/discussion/21292/cannot-override-the-final-method-from-papplet-error</link>
      <pubDate>Thu, 09 Mar 2017 18:32:31 +0000</pubDate>
      <dc:creator>mmk</dc:creator>
      <guid isPermaLink="false">21292@/two/discussions</guid>
      <description><![CDATA[<p>I am getting the above said issue. The code is given below:</p>

<p>boolean sketchFullScreen()
   {
    return true;
    //return false;
   }
   void screen
   {
   size(displayWidth, displayHeight, P3D); 
   }</p>

<p>Please suggest a solution to solve the issue.</p>
]]></description>
   </item>
   <item>
      <title>Fullscreen issue</title>
      <link>https://forum.processing.org/two/discussion/21254/fullscreen-issue</link>
      <pubDate>Wed, 08 Mar 2017 17:10:04 +0000</pubDate>
      <dc:creator>mariamalz</dc:creator>
      <guid isPermaLink="false">21254@/two/discussions</guid>
      <description><![CDATA[<p>import ddf.minim.*;</p>

<p>Minim minim;
AudioPlayer player;</p>

<p>PFont font;
char letter ;
String words = "";
String words2 = "";
String words3 = "";
String words4 = "";
String words5 = "";
String words6 = "";
String words7 = "";
PImage img;
boolean showTitleScreen = true;
boolean type;
boolean check;
boolean renaissance;
boolean jeopardy;
boolean necessary;
boolean exercise;
boolean conscience;
boolean mannequin;
boolean february;
boolean gameover;</p>

<p>void setup () {
 fullScreen();
 // size(1366, 768);
  pixelDensity(2);
   img = loadImage("menu.jpg");</p>

<p>Hi guys! This is the code for a game I made but i'm having trouble making it a fullscreen sketch. The image doesn't resize to accommodate the screen.</p>
]]></description>
   </item>
   <item>
      <title>fullScreen(), size() crashing</title>
      <link>https://forum.processing.org/two/discussion/20933/fullscreen-size-crashing</link>
      <pubDate>Tue, 21 Feb 2017 20:00:01 +0000</pubDate>
      <dc:creator>Kubak_cz</dc:creator>
      <guid isPermaLink="false">20933@/two/discussions</guid>
      <description><![CDATA[<p>Hello everybody. I try to make app for android, but if I add fullScreen() or size() it crashed. 
With size(100,100), size(50,50), size(500,250) it works fine, but with size(500,500) or size(displayWidth, displayHeight)</p>

<pre><code>void setup() {
  fullScreen();
  orientation(LANDSCAPE);
}   

void draw() {
  background(0);
  rect(width/2,height/2,36,36);
}
</code></pre>
]]></description>
   </item>
   <item>
      <title>fullscreen() does not fill my screen</title>
      <link>https://forum.processing.org/two/discussion/20559/fullscreen-does-not-fill-my-screen</link>
      <pubDate>Mon, 30 Jan 2017 20:16:22 +0000</pubDate>
      <dc:creator>fxmech</dc:creator>
      <guid isPermaLink="false">20559@/two/discussions</guid>
      <description><![CDATA[<p>I am running windows 10 and have my toolbar at the bottom of the screen... When I use the fullscreen() function,  the Y axis fills up to where the toolbar is, but the x axis leaves an unfilled gap at the left side of the screen...  I am not sure but I think its basically keeping the aspect ratio of my screen and shrinking it to allow for the toolbar...  Is there a way to change the aspect ratio so that I can keep the toolbar and still fill the rest of the screen with a processing sketch?</p>
]]></description>
   </item>
   <item>
      <title>Fullscreen sketch</title>
      <link>https://forum.processing.org/two/discussion/20411/fullscreen-sketch</link>
      <pubDate>Sun, 22 Jan 2017 14:19:20 +0000</pubDate>
      <dc:creator>schotsl</dc:creator>
      <guid isPermaLink="false">20411@/two/discussions</guid>
      <description><![CDATA[<p>Hello, I wrote this code in which you have a traingle that points towards you mouse around a circle, if you press your left mouse it will shoot a bullet and al of that works fine but when I replace</p>

<p><code>size(400, 400);</code></p>

<p>with</p>

<p><code>fullScreen();</code></p>

<p>the bullets disapear straight after I shoot them and I cant figure out why. Here's the whole code with 400 x 400 resolution</p>

<pre><code>float angle, rotation, speed, canShootCounter;

int basesize = 250;
int speedfactor = 1;
int version = 3;

int x, y, i;

Player player = new Player();

PVector location;
ArrayList&lt;Bullet&gt; bullets;
boolean canShoot = true;


void setup() {
  size(400, 400);
  bullets = new ArrayList&lt;Bullet&gt;();
  player = new Player();
}

void draw() {
  player.update();
  background(255);
  ellipseMode(CENTER);
  ellipse(width/2, height/2, basesize, basesize);

   x = (int)(width/2+165*cos(atan2( mouseY - height/2, mouseX - width/2)));
   y = (int)(height/2+165*sin(atan2( mouseY - height/2, mouseX - width/2)));

  pushMatrix();
  translate(x, y);
  rotate(atan2( mouseY - height/2, mouseX - width/2)-PI/2);
  triangle(-30, -10, 0, +50, +30, -10);
  popMatrix();

  for (i = bullets.size()-1; i &gt;= 0; i--) {
    Bullet bullet = bullets.get(i);
    bullet.update();
  }
}

class Player {
  Player() {
    location = new PVector(x, y);
  } 
  void update() {
    if (mousePressed == true) {
      if (canShoot == true) {
        bullets.add( new Bullet());
        canShoot = false;
        canShootCounter = 0;
      }
    }
    if (canShoot == false) {
      canShootCounter ++;
      if (canShootCounter == 10){
        canShoot = true;
      }
    }
  }
}

class Bullet {
  Bullet() {
    location= new PVector(x, y);
    rotation = atan2( mouseY - height/2, mouseX - width/2 );
    speed = 5;
  } 
  void update() {
    location.x = location.x + cos(rotation)*speed;
    location.y = location.y + sin(rotation)*speed;
    ellipse(location.x, location.y, 10, 10);

    if (location.x &gt; 0 &amp;&amp; location.x &lt; width &amp;&amp; location.y &gt; 0 &amp;&amp; location.x &lt; height) {
    }
    else {
      bullets.remove(i);
    }
  }
}
</code></pre>

<p>I hope someone can help. :)</p>
]]></description>
   </item>
   <item>
      <title>How to draw a rectangle at the center of the screen using fullScreen() function?</title>
      <link>https://forum.processing.org/two/discussion/20371/how-to-draw-a-rectangle-at-the-center-of-the-screen-using-fullscreen-function</link>
      <pubDate>Fri, 20 Jan 2017 10:54:41 +0000</pubDate>
      <dc:creator>kevo1414</dc:creator>
      <guid isPermaLink="false">20371@/two/discussions</guid>
      <description><![CDATA[<p>I have no idea why variables x and y gives me value 50.</p>

<pre><code>// GLOBAL VARIABLES
float x = width / 2;
float y = height / 2;

float rectWidth = 50;
float rectHeight = 75;


void setup(){
  fullScreen();

  println(width + " WIDTH");
  println(height + " HEIGHT");
  println(x + " X");
  println(y + " Y");
}

void draw(){
  background(0);
  fill(255);
  rect(x, y, rectWidth, rectHeight);
}
</code></pre>

<p>In console I get this:</p>

<pre><code>1366 WIDTH
768 HEIGHT
50.0 X
50.0 Y
</code></pre>
]]></description>
   </item>
   <item>
      <title>fullScreen doesn't work properly</title>
      <link>https://forum.processing.org/two/discussion/20268/fullscreen-doesn-t-work-properly</link>
      <pubDate>Sun, 15 Jan 2017 00:26:21 +0000</pubDate>
      <dc:creator>rossig7</dc:creator>
      <guid isPermaLink="false">20268@/two/discussions</guid>
      <description><![CDATA[<p>Hi everyone, I've installed Android Mode 3.0.2 through the IDE.
It doesn't work when I work with images with parallax and alpha channel, but it does if I draw an ellipse.
I am trying the sketch in the device.</p>

<p>I noticed I need to put fullScreen between settings, because otherwise it crashes from the begining.</p>

<p>1- As soon as I change the orientation it crashes, no messages, it stops working.</p>

<pre><code>void settings(){
  fullScreen();
}
</code></pre>

<p>2- With this, it doesn't even start.</p>

<pre><code>void settings(){
  fullScreen(P2D);
}
</code></pre>

<p>It throws the following errors:
            _KetaiSensor: start()...
            Ignoring &lt;#text&gt; tag.
                FATAL EXCEPTION: GLThread 2841
                Process: processing.test.aceleforce, PID: 22321
                java.lang.ArrayIndexOutOfBoundsException: length=480000; index=480000
                    at processing.opengl.Texture.convertToRGBA(Unknown Source)
                    at processing.opengl.Texture.set(Unknown Source)
                    at processing.opengl.Texture.set(Unknown Source)
                    at processing.opengl.PGraphicsOpenGL.initCache(Unknown Source)
                    at processing.opengl.PGraphicsOpenGL.getTexture(Unknown Source)
                    at processing.opengl.PGraphicsOpenGL$TexCache.getTexture(Unknown Source)
                    at processing.opengl.PGraphicsOpenGL.flushPolys(Unknown Source)
                    at processing.opengl.PGraphicsOpenGL.flush(Unknown Source)
                    at processing.opengl.PGraphicsOpenGL.endDraw(Unknown Source)
                    at processing.core.PApplet.handleDraw(Unknown Source)
                    at processing.opengl.PGLES$AndroidRenderer.onDrawFrame(Unknown Source)
                    at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1523)
                    at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
                _</p>

<p>I put Fullscreen in the manifest file. 
I appreciate any ideas, thanks!.</p>

<p>PD:Which is the faster way to render images with parallax?</p>
]]></description>
   </item>
   <item>
      <title>Android mode doesn't recognize orientation and fullScreen functions</title>
      <link>https://forum.processing.org/two/discussion/19817/android-mode-doesn-t-recognize-orientation-and-fullscreen-functions</link>
      <pubDate>Mon, 19 Dec 2016 00:02:09 +0000</pubDate>
      <dc:creator>Rophi</dc:creator>
      <guid isPermaLink="false">19817@/two/discussions</guid>
      <description><![CDATA[<p>I made my code in normal java mode first and now I'm migrating to Android mode, but for some reason it can't recognise the orientation and fullScreen functions saying "it does not exist"</p>
]]></description>
   </item>
   <item>
      <title>Fullscreen resolution</title>
      <link>https://forum.processing.org/two/discussion/19855/fullscreen-resolution</link>
      <pubDate>Tue, 20 Dec 2016 21:26:14 +0000</pubDate>
      <dc:creator>K4su</dc:creator>
      <guid isPermaLink="false">19855@/two/discussions</guid>
      <description><![CDATA[<p>Hello, I have just installed the AndroidMode and wanted to try porting some programs I made in Java mode. There are a few that process all pixels on screen, which is why I don't use fullscreen resolution on my Desktop. Is there a way I can set a lower resolution on my phone but still using fullscreen? Passing numbers smaller than 'displayWidth' and 'displayHeight' to the size() method will draw a smaller canvas :/</p>

<p>This example program runs at 2FPS on my Samsung Galaxy S7:</p>

<p><a rel="nofollow" href="http://pastebin.com/fL3bLDid">http://pastebin.com/fL3bLDid</a></p>
]]></description>
   </item>
   </channel>
</rss>