Skip to content

Commit

Permalink
TestSharedContextVBOES2*3: Properly validateBuffers and setSyncObject…
Browse files Browse the repository at this point in the history
…s(..) in concurrent async test case.
  • Loading branch information
sgothel committed Feb 24, 2020
1 parent 0fc0b0d commit 8ccea1f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
Expand Up @@ -108,6 +108,8 @@ public void syncedOneAnimator(final boolean destroyCleanOrder) throws Interrupte
final Frame f1 = new Frame();
final Animator animator = new Animator();
final GearsES2 g1 = new GearsES2(0);
// g1.setUseMappedBuffers(useMappedBuffers);
g1.setValidateBuffers(true);
final GLCanvas c1 = createGLCanvas(f1, 0, 0, g1);
animator.add(c1);

Expand Down Expand Up @@ -244,6 +246,9 @@ public void asyncEachOneAnimator(final boolean destroyCleanOrder) throws Interru
final Frame f1 = new Frame();
final Animator a1 = new Animator();
final GearsES2 g1 = new GearsES2(0);
g1.setSyncObjects(g1); // this is master, since rendered we must use it as sync
// g1.setUseMappedBuffers(useMappedBuffers);
g1.setValidateBuffers(true);
final GLCanvas c1 = createGLCanvas(f1, 0, 0, g1);
a1.add(c1);
a1.start();
Expand Down
Expand Up @@ -98,6 +98,8 @@ public void test01SyncedOneAnimator() throws InterruptedException, InvocationTar
final Frame f1 = new Frame();
final Animator animator = new Animator();
final GearsES2 g1 = new GearsES2(0);
// g1.setUseMappedBuffers(useMappedBuffers);
g1.setValidateBuffers(true);
final GLJPanel c1 = createGLJPanel(f1, 0, 0, g1);
animator.add(c1);

Expand Down Expand Up @@ -196,6 +198,9 @@ public void test02AsyncEachAnimator() throws InterruptedException, InvocationTar
final Frame f1 = new Frame();
final Animator a1 = new Animator();
final GearsES2 g1 = new GearsES2(0);
g1.setSyncObjects(g1); // this is master, since rendered we must use it as sync
// g1.setUseMappedBuffers(useMappedBuffers);
g1.setValidateBuffers(true);
final GLJPanel c1 = createGLJPanel(f1, 0, 0, g1);
a1.add(c1);
a1.start();
Expand Down
Expand Up @@ -180,6 +180,8 @@ public void run() {
public void test01SyncedOneAnimator() throws InterruptedException {
final Animator animator = new Animator();
final GearsES2 g1 = new GearsES2(0);
// g1.setUseMappedBuffers(useMappedBuffers);
g1.setValidateBuffers(true);
final GLCanvas c1 = createGLCanvas(shell1, composite1, 0, 0, g1);
animator.add(c1);

Expand Down Expand Up @@ -208,7 +210,7 @@ public void run() {
public void run() {
if( !display.readAndDispatch() ) {
try {
Thread.sleep(10);
Thread.sleep(200);
} catch (final InterruptedException e) { }
}
} };
Expand Down Expand Up @@ -268,6 +270,9 @@ public void run() {
public void test02AsyncEachAnimator() throws InterruptedException {
final Animator a1 = new Animator();
final GearsES2 g1 = new GearsES2(0);
g1.setSyncObjects(g1); // this is master, since rendered we must use it as sync
// g1.setUseMappedBuffers(useMappedBuffers);
g1.setValidateBuffers(true);
final GLCanvas c1 = createGLCanvas(shell1, composite1, 0, 0, g1);
a1.add(c1);
display.syncExec(new Runnable() {
Expand All @@ -280,7 +285,7 @@ public void run() {
public void run() {
if( !display.readAndDispatch() ) {
try {
Thread.sleep(10);
Thread.sleep(200);
} catch (final InterruptedException e) { }
}
} };
Expand Down

0 comments on commit 8ccea1f

Please sign in to comment.