New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In P2D/P3D the background is cleared to black on each frame #3559

Closed
hamoid opened this Issue Aug 9, 2015 · 16 comments

Comments

Projects
None yet
4 participants
@hamoid
Contributor

hamoid commented Aug 9, 2015

void setup() {
  size(600, 600, P2D);
}
void draw() {
  // no background() call here, but background is cleared to black anyway.
  float r = height * 0.4;
  float a = frameCount * 0.1;
  ellipse(width/2 + r*cos(a), height/2 + r*sin(a), 50, 50);
}

I'm assuming that for consistency, it should behave the same way in JAVA2D and P2D/P3D.

// ArchLinux 64bit, Processing 3 beta 1, i3 window manager, Intel HD 4600

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Aug 9, 2015

Member

This is working fine here, I'm guessing it depends on your graphics drivers and chipset.

screen shot 2015-08-09 at 7 39 54 am

@JakubValtar is this a regression from the flickering patch?

Member

benfry commented Aug 9, 2015

This is working fine here, I'm guessing it depends on your graphics drivers and chipset.

screen shot 2015-08-09 at 7 39 54 am

@JakubValtar is this a regression from the flickering patch?

@JakubValtar

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar Aug 9, 2015

Contributor

Works fine here on Win 8.1, Intel HD 4600. Will investigate.

Contributor

JakubValtar commented Aug 9, 2015

Works fine here on Win 8.1, Intel HD 4600. Will investigate.

@JakubValtar

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar Aug 9, 2015

Contributor

@hamoid Btw, do you have any other window manager to try? It seems that there are lots of problems with i3.

Contributor

JakubValtar commented Aug 9, 2015

@hamoid Btw, do you have any other window manager to try? It seems that there are lots of problems with i3.

@codeanticode

This comment has been minimized.

Show comment
Hide comment
@codeanticode

codeanticode Aug 13, 2015

Member

@hamoid could you try your code with a processing build after commit eeb9dec and let us know if the issue is still present?

Member

codeanticode commented Aug 13, 2015

@hamoid could you try your code with a processing build after commit eeb9dec and let us know if the issue is still present?

@hamoid

This comment has been minimized.

Show comment
Hide comment
@hamoid

hamoid Aug 13, 2015

Contributor

It currently complains that EditorException and ExamplesFrame are
unknown. I did pull and clean. Are some classes missing maybe?

Contributor

hamoid commented Aug 13, 2015

It currently complains that EditorException and ExamplesFrame are
unknown. I did pull and clean. Are some classes missing maybe?

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Aug 13, 2015

Member

That sounds like something didn't complete when you did the pull. I just tried a fresh clone and it's working fine:

% git clone --depth=1 https://github.com/processing/processing.git
Cloning into 'processing'...
remote: Counting objects: 1172, done.
remote: Compressing objects: 100% (743/743), done.
remote: Total 1172 (delta 398), reused 787 (delta 323), pack-reused 0
Receiving objects: 100% (1172/1172), 45.75 MiB | 9.16 MiB/s, done.
Resolving deltas: 100% (398/398), done.
Checking connectivity... done.
fry@fivek:~/Desktop
% cd processing/
fry@fivek:~/Desktop/processing
% cd build/
fry@fivek:~/Desktop/processing/build
% ant run
Buildfile: /Users/fry/Desktop/processing/build/build.xml

run:

revision-check:

macosx-check-os:

subprojects-build:

methods-check:

methods-build:

compile:
    [mkdir] Created dir: /Users/fry/Desktop/processing/core/methods/bin
    [javac] Compiling 1 source file to /Users/fry/Desktop/processing/core/methods/bin

dist:
      [jar] Building jar: /Users/fry/Desktop/processing/core/methods/methods.jar

compile:
  [methods] No changes to PApplet API.
    [mkdir] Created dir: /Users/fry/Desktop/processing/core/bin
    [javac] Compiling 52 source files to /Users/fry/Desktop/processing/core/bin
     [copy] Copying 1 file to /Users/fry/Desktop/processing/core/bin/japplemenubar
     [copy] Copying 23 files to /Users/fry/Desktop/processing/core/bin

build:
      [jar] Building jar: /Users/fry/Desktop/processing/core/library/core.jar

compile:
    [mkdir] Created dir: /Users/fry/Desktop/processing/app/bin
    [javac] Compiling 92 source files to /Users/fry/Desktop/processing/app/bin

build:
      [jar] Building jar: /Users/fry/Desktop/processing/app/pde.jar

compile:
    [mkdir] Created dir: /Users/fry/Desktop/processing/java/libraries/dxf/bin
    [javac] Compiling 1 source file to /Users/fry/Desktop/processing/java/libraries/dxf/bin

build:
      [jar] Building jar: /Users/fry/Desktop/processing/java/libraries/dxf/library/dxf.jar

compile:
    [mkdir] Created dir: /Users/fry/Desktop/processing/java/libraries/net/bin
    [javac] Compiling 2 source files to /Users/fry/Desktop/processing/java/libraries/net/bin

build:
      [jar] Building jar: /Users/fry/Desktop/processing/java/libraries/net/library/net.jar

compile:
    [mkdir] Created dir: /Users/fry/Desktop/processing/java/libraries/pdf/bin
    [javac] Compiling 1 source file to /Users/fry/Desktop/processing/java/libraries/pdf/bin

build:
      [jar] Building jar: /Users/fry/Desktop/processing/java/libraries/pdf/library/pdf.jar

compile:
    [mkdir] Created dir: /Users/fry/Desktop/processing/java/libraries/serial/bin
    [javac] Compiling 1 source file to /Users/fry/Desktop/processing/java/libraries/serial/bin

build:
      [jar] Building jar: /Users/fry/Desktop/processing/java/libraries/serial/library/serial.jar

compile:
    [mkdir] Created dir: /Users/fry/Desktop/processing/java/libraries/svg/bin
    [javac] Compiling 2 source files to /Users/fry/Desktop/processing/java/libraries/svg/bin

build:
      [jar] Building jar: /Users/fry/Desktop/processing/java/libraries/svg/library/svg.jar

compile:
    [mkdir] Created dir: /Users/fry/Desktop/processing/build/shared/tools/MovieMaker/bin
    [javac] Compiling 14 source files to /Users/fry/Desktop/processing/build/shared/tools/MovieMaker/bin

build:
      [jar] Building jar: /Users/fry/Desktop/processing/build/shared/tools/MovieMaker/tool/MovieMaker.jar
    [mkdir] Created dir: /Users/fry/Desktop/processing/java/generated/processing/mode/java/preproc

preproc:
    [antlr] ANTLR Parser Generator   Version 2.7.7 (2006-11-01)   1989-2005
    [antlr] /Users/fry/Desktop/processing/java/src/processing/mode/java/preproc/java15.g:941: warning:Syntactic predicate superfluous for single alternative
    [antlr] /Users/fry/Desktop/processing/java/src/processing/mode/java/preproc/java15.g:1397: warning:empty alternative makes no sense in (...)* or (...)+
    [antlr] ANTLR Parser Generator   Version 2.7.7 (2006-11-01)   1989-2005
    [antlr] /Users/fry/Desktop/processing/java/generated/processing/mode/java/preproc/expandedpde.g:1155: warning:empty alternative makes no sense in (...)* or (...)+
    [antlr] /Users/fry/Desktop/processing/java/generated/processing/mode/java/preproc/expandedpde.g:804: warning:Syntactic predicate superfluous for single alternative

compile:
    [mkdir] Created dir: /Users/fry/Desktop/processing/java/bin
    [javac] Compiling 65 source files to /Users/fry/Desktop/processing/java/bin

build:
      [jar] Building jar: /Users/fry/Desktop/processing/java/mode/JavaMode.jar

macosx-build:
    [mkdir] Created dir: /Users/fry/Desktop/processing/build/macosx/work
[bundleapp] Creating app bundle: Processing
   [delete] Deleting: /Users/fry/Desktop/processing/build/macosx/work/Processing.app/Contents/PlugIns/jdk1.8.0_51.jdk/Contents/MacOS/libjli.dylib
     [copy] Copying 111 files to /Users/fry/Desktop/processing/build/macosx/work/Processing.app/Contents/Java
     [copy] Copying 11 files to /Users/fry/Desktop/processing/build/macosx/work/Processing.app/Contents/PlugIns/jdk1.8.0_51.jdk/Contents/Home/jre/lib/fonts

version-clear:

version-write:

assemble:
     [copy] Copying 66 files to /Users/fry/Desktop/processing/build/macosx/work/Processing.app/Contents/Java/tools
     [copy] Copying 445 files to /Users/fry/Desktop/processing/build/macosx/work/Processing.app/Contents/Java/modes/java
     [copy] Warning: /Users/fry/Desktop/processing-docs/content/examples does not exist.
      [get] Getting: http://download.processing.org/reference.zip
      [get] To: /Users/fry/Desktop/processing/java/reference.zip
    [unzip] Expanding: /Users/fry/Desktop/processing/java/reference.zip into /Users/fry/Desktop/processing/build/macosx/work/Processing.app/Contents/Java/modes/java
     [move] Moving 1 file to /Users/fry/Desktop/processing/build/macosx/work/Processing.app/Contents/Java/modes/java/application/launch4j/bin
     [move] Moving 1 file to /Users/fry/Desktop/processing/build/macosx/work/Processing.app/Contents/Java/modes/java/application/launch4j/bin

macosx-run:

BUILD SUCCESSFUL
Total time: 9 seconds
Member

benfry commented Aug 13, 2015

That sounds like something didn't complete when you did the pull. I just tried a fresh clone and it's working fine:

% git clone --depth=1 https://github.com/processing/processing.git
Cloning into 'processing'...
remote: Counting objects: 1172, done.
remote: Compressing objects: 100% (743/743), done.
remote: Total 1172 (delta 398), reused 787 (delta 323), pack-reused 0
Receiving objects: 100% (1172/1172), 45.75 MiB | 9.16 MiB/s, done.
Resolving deltas: 100% (398/398), done.
Checking connectivity... done.
fry@fivek:~/Desktop
% cd processing/
fry@fivek:~/Desktop/processing
% cd build/
fry@fivek:~/Desktop/processing/build
% ant run
Buildfile: /Users/fry/Desktop/processing/build/build.xml

run:

revision-check:

macosx-check-os:

subprojects-build:

methods-check:

methods-build:

compile:
    [mkdir] Created dir: /Users/fry/Desktop/processing/core/methods/bin
    [javac] Compiling 1 source file to /Users/fry/Desktop/processing/core/methods/bin

dist:
      [jar] Building jar: /Users/fry/Desktop/processing/core/methods/methods.jar

compile:
  [methods] No changes to PApplet API.
    [mkdir] Created dir: /Users/fry/Desktop/processing/core/bin
    [javac] Compiling 52 source files to /Users/fry/Desktop/processing/core/bin
     [copy] Copying 1 file to /Users/fry/Desktop/processing/core/bin/japplemenubar
     [copy] Copying 23 files to /Users/fry/Desktop/processing/core/bin

build:
      [jar] Building jar: /Users/fry/Desktop/processing/core/library/core.jar

compile:
    [mkdir] Created dir: /Users/fry/Desktop/processing/app/bin
    [javac] Compiling 92 source files to /Users/fry/Desktop/processing/app/bin

build:
      [jar] Building jar: /Users/fry/Desktop/processing/app/pde.jar

compile:
    [mkdir] Created dir: /Users/fry/Desktop/processing/java/libraries/dxf/bin
    [javac] Compiling 1 source file to /Users/fry/Desktop/processing/java/libraries/dxf/bin

build:
      [jar] Building jar: /Users/fry/Desktop/processing/java/libraries/dxf/library/dxf.jar

compile:
    [mkdir] Created dir: /Users/fry/Desktop/processing/java/libraries/net/bin
    [javac] Compiling 2 source files to /Users/fry/Desktop/processing/java/libraries/net/bin

build:
      [jar] Building jar: /Users/fry/Desktop/processing/java/libraries/net/library/net.jar

compile:
    [mkdir] Created dir: /Users/fry/Desktop/processing/java/libraries/pdf/bin
    [javac] Compiling 1 source file to /Users/fry/Desktop/processing/java/libraries/pdf/bin

build:
      [jar] Building jar: /Users/fry/Desktop/processing/java/libraries/pdf/library/pdf.jar

compile:
    [mkdir] Created dir: /Users/fry/Desktop/processing/java/libraries/serial/bin
    [javac] Compiling 1 source file to /Users/fry/Desktop/processing/java/libraries/serial/bin

build:
      [jar] Building jar: /Users/fry/Desktop/processing/java/libraries/serial/library/serial.jar

compile:
    [mkdir] Created dir: /Users/fry/Desktop/processing/java/libraries/svg/bin
    [javac] Compiling 2 source files to /Users/fry/Desktop/processing/java/libraries/svg/bin

build:
      [jar] Building jar: /Users/fry/Desktop/processing/java/libraries/svg/library/svg.jar

compile:
    [mkdir] Created dir: /Users/fry/Desktop/processing/build/shared/tools/MovieMaker/bin
    [javac] Compiling 14 source files to /Users/fry/Desktop/processing/build/shared/tools/MovieMaker/bin

build:
      [jar] Building jar: /Users/fry/Desktop/processing/build/shared/tools/MovieMaker/tool/MovieMaker.jar
    [mkdir] Created dir: /Users/fry/Desktop/processing/java/generated/processing/mode/java/preproc

preproc:
    [antlr] ANTLR Parser Generator   Version 2.7.7 (2006-11-01)   1989-2005
    [antlr] /Users/fry/Desktop/processing/java/src/processing/mode/java/preproc/java15.g:941: warning:Syntactic predicate superfluous for single alternative
    [antlr] /Users/fry/Desktop/processing/java/src/processing/mode/java/preproc/java15.g:1397: warning:empty alternative makes no sense in (...)* or (...)+
    [antlr] ANTLR Parser Generator   Version 2.7.7 (2006-11-01)   1989-2005
    [antlr] /Users/fry/Desktop/processing/java/generated/processing/mode/java/preproc/expandedpde.g:1155: warning:empty alternative makes no sense in (...)* or (...)+
    [antlr] /Users/fry/Desktop/processing/java/generated/processing/mode/java/preproc/expandedpde.g:804: warning:Syntactic predicate superfluous for single alternative

compile:
    [mkdir] Created dir: /Users/fry/Desktop/processing/java/bin
    [javac] Compiling 65 source files to /Users/fry/Desktop/processing/java/bin

build:
      [jar] Building jar: /Users/fry/Desktop/processing/java/mode/JavaMode.jar

macosx-build:
    [mkdir] Created dir: /Users/fry/Desktop/processing/build/macosx/work
[bundleapp] Creating app bundle: Processing
   [delete] Deleting: /Users/fry/Desktop/processing/build/macosx/work/Processing.app/Contents/PlugIns/jdk1.8.0_51.jdk/Contents/MacOS/libjli.dylib
     [copy] Copying 111 files to /Users/fry/Desktop/processing/build/macosx/work/Processing.app/Contents/Java
     [copy] Copying 11 files to /Users/fry/Desktop/processing/build/macosx/work/Processing.app/Contents/PlugIns/jdk1.8.0_51.jdk/Contents/Home/jre/lib/fonts

version-clear:

version-write:

assemble:
     [copy] Copying 66 files to /Users/fry/Desktop/processing/build/macosx/work/Processing.app/Contents/Java/tools
     [copy] Copying 445 files to /Users/fry/Desktop/processing/build/macosx/work/Processing.app/Contents/Java/modes/java
     [copy] Warning: /Users/fry/Desktop/processing-docs/content/examples does not exist.
      [get] Getting: http://download.processing.org/reference.zip
      [get] To: /Users/fry/Desktop/processing/java/reference.zip
    [unzip] Expanding: /Users/fry/Desktop/processing/java/reference.zip into /Users/fry/Desktop/processing/build/macosx/work/Processing.app/Contents/Java/modes/java
     [move] Moving 1 file to /Users/fry/Desktop/processing/build/macosx/work/Processing.app/Contents/Java/modes/java/application/launch4j/bin
     [move] Moving 1 file to /Users/fry/Desktop/processing/build/macosx/work/Processing.app/Contents/Java/modes/java/application/launch4j/bin

macosx-run:

BUILD SUCCESSFUL
Total time: 9 seconds

@benfry benfry changed the title from In P2D/P3D the background is cleared to black on each frame #b1 to In P2D/P3D the background is cleared to black on each frame Aug 14, 2015

@hamoid

This comment has been minimized.

Show comment
Hide comment
@hamoid

hamoid Aug 15, 2015

Contributor

Latest version from source works as expected 👍 Background not cleared to black on draw.

Contributor

hamoid commented Aug 15, 2015

Latest version from source works as expected 👍 Background not cleared to black on draw.

@codeanticode

This comment has been minimized.

Show comment
Hide comment
@codeanticode

codeanticode Aug 15, 2015

Member

so things work after 2082d77?

Member

codeanticode commented Aug 15, 2015

so things work after 2082d77?

@hamoid

This comment has been minimized.

Show comment
Hide comment
@hamoid

hamoid Aug 15, 2015

Contributor

@codeanticode I pulled the latest changes, compiled, and then it worked as expected. I did not download that specific revision. Is that good enough? More specifically, I'm on ee133fe, one newer than 2082d77.

Contributor

hamoid commented Aug 15, 2015

@codeanticode I pulled the latest changes, compiled, and then it worked as expected. I did not download that specific revision. Is that good enough? More specifically, I'm on ee133fe, one newer than 2082d77.

@JakubValtar

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar Aug 15, 2015

Contributor

@codeanticode I think this was caused & solved by save to pixels hack. We are not going to use it so maybe we can close this since things are back to normal.

@hamoid Thanks for your help!

Contributor

JakubValtar commented Aug 15, 2015

@codeanticode I think this was caused & solved by save to pixels hack. We are not going to use it so maybe we can close this since things are back to normal.

@hamoid Thanks for your help!

@codeanticode

This comment has been minimized.

Show comment
Hide comment
@codeanticode

codeanticode Sep 4, 2015

Member

@hamoid @JakubValtar could you check if this commit 5d464d8 fixes the background issues, without introducing any side effects?

Member

codeanticode commented Sep 4, 2015

@hamoid @JakubValtar could you check if this commit 5d464d8 fixes the background issues, without introducing any side effects?

@hamoid

This comment has been minimized.

Show comment
Hide comment
@hamoid

hamoid Sep 4, 2015

Contributor
Contributor

hamoid commented Sep 4, 2015

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Sep 4, 2015

Member

@codeanticode is this clear to close?

Member

benfry commented Sep 4, 2015

@codeanticode is this clear to close?

@codeanticode

This comment has been minimized.

Show comment
Hide comment
@codeanticode

codeanticode Sep 4, 2015

Member

Let's check with @JakubValtar: do you see any issues after the commit referenced above?

Member

codeanticode commented Sep 4, 2015

Let's check with @JakubValtar: do you see any issues after the commit referenced above?

@JakubValtar

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar Sep 4, 2015

Contributor

@codeanticode It is not cleared to black and for the record I never had this issue. Only thing I noticed is that when I resize the window it looks like the texture coords are clamped to previous values. When I call background()everything is fine. I think there is a bug when you copy previous frame for accumulation purposes.

clamp

Contributor

JakubValtar commented Sep 4, 2015

@codeanticode It is not cleared to black and for the record I never had this issue. Only thing I noticed is that when I resize the window it looks like the texture coords are clamped to previous values. When I call background()everything is fine. I think there is a bug when you copy previous frame for accumulation purposes.

clamp

@codeanticode codeanticode self-assigned this Sep 7, 2015

@codeanticode

This comment has been minimized.

Show comment
Hide comment
@codeanticode
Member

codeanticode commented Sep 8, 2015

fixed with 3b87681, abe7b52 and ea13eda

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment