aboutsummaryrefslogtreecommitdiffstats
path: root/src/demos/com/jogamp/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-12-24 19:11:01 +0100
committerSven Gothel <[email protected]>2023-12-24 19:11:01 +0100
commitb5e6a852451f2a78a1783ca8fbd704005fbafd07 (patch)
tree91286005d754b2a03fec2b5fcef383fd5da29ec9 /src/demos/com/jogamp/opengl
parentfdedf6cff64efc1d7ab554c2bf084392a099ef0f (diff)
GraphUI MediaPlayer Widget: Issue playStream(..) and setTextureUnit(..) by caller, reducing specification
Diffstat (limited to 'src/demos/com/jogamp/opengl')
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid00.java4
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid01.java6
2 files changed, 7 insertions, 3 deletions
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid00.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid00.java
index 508879631..bc0608b28 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid00.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid00.java
@@ -212,6 +212,7 @@ public class UIMediaGrid00 {
}
// mPlayer.setTextureMinMagFilter( new int[] { GL.GL_NEAREST, GL.GL_NEAREST } );
mPlayer.setTextureMinMagFilter( new int[] { GL.GL_LINEAR, GL.GL_LINEAR } );
+ mPlayer.setTextureUnit(1);
final List<Shape> customCtrls = new ArrayList<Shape>();
{
@@ -246,7 +247,8 @@ public class UIMediaGrid00 {
});
customCtrls.add(button);
}
- grid.addShape( new MediaPlayer(options.renderModes, scene, mPlayer, medium, aid, 16f/9f, false, zoomSize, customCtrls) );
+ grid.addShape( new MediaPlayer(options.renderModes, scene, mPlayer, medium, 16f/9f, false, zoomSize, customCtrls) );
+ mPlayer.playStream(medium, GLMediaPlayer.STREAM_ID_AUTO, aid, GLMediaPlayer.TEXTURE_COUNT_DEFAULT);
}
}
private static boolean printNativeInfoOnce = true;
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid01.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid01.java
index 339b09e4d..81d0aa549 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid01.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid01.java
@@ -246,7 +246,7 @@ public class UIMediaGrid01 {
if( GLMediaPlayer.State.Paused == mPlayer.getState() ) {
mPlayer.resume();
} else if(GLMediaPlayer.State.Uninitialized == mPlayer.getState()) {
- mPlayer.playStream(mPlayer.getUri(), GLMediaPlayer.STREAM_ID_AUTO, aid, MediaPlayer.TexCount);
+ mPlayer.playStream(mPlayer.getUri(), GLMediaPlayer.STREAM_ID_AUTO, aid, GLMediaPlayer.TEXTURE_COUNT_DEFAULT);
} else if( e.isShiftDown() ) {
mPlayer.stop();
} else {
@@ -289,6 +289,7 @@ public class UIMediaGrid01 {
}
// mPlayer.setTextureMinMagFilter( new int[] { GL.GL_NEAREST, GL.GL_NEAREST } );
mPlayer.setTextureMinMagFilter( new int[] { GL.GL_LINEAR, GL.GL_LINEAR } );
+ mPlayer.setTextureUnit(1);
final List<Shape> customCtrls = new ArrayList<Shape>();
if( true ) {
@@ -323,7 +324,8 @@ public class UIMediaGrid01 {
});
customCtrls.add(button);
}
- grid.addShape( new MediaPlayer(options.renderModes, scene, mPlayer, medium, aid, defRatio, letterBox, zoomSize, customCtrls) );
+ grid.addShape( new MediaPlayer(options.renderModes, scene, mPlayer, medium, defRatio, letterBox, zoomSize, customCtrls) );
+ mPlayer.playStream(medium, GLMediaPlayer.STREAM_ID_AUTO, aid, GLMediaPlayer.TEXTURE_COUNT_DEFAULT);
}
}
private static boolean printNativeInfoOnce = true;