glsurfaceview

Text only thing visible after pausing GLSurfaceView on Galaxy S3 - Text blur when moved. No button backgrounds

空扰寡人 提交于 2019-12-06 17:47:26
I'm getting some STRANGE behavior on a Galaxy S3 (none of my other test devices (not S3s) bug out like the following). Scenario: I'm taking YUV data via JNI from an RTSP stream processed by libffmpeg. I take these values and feed them into C++ code using openGL so they may be mapped to a texture. (Basically, display the video from an RTSP stream in openGL). Issues: I've been trying to add an overlay to the video (with normal Android widgets/views/xml) and I noticed on the Galaxy S3 (nowhere else) the backgrounds to buttons (whether they're an R.color, R.drawable, etc.) are all missing. **The

passing instructions from UI thread to Rendering thread (GLSurfaceView)

这一生的挚爱 提交于 2019-12-06 11:54:12
问题 The Setup : A RelativeLayout with a GLSurfaceView and a Button as shown in the image.. The Problem: Lets say I have other triangle models (The one in the picture being the initial model)... I wish to change the models cyclically on click of the button. Since button is on the UI thread and glSurfaceView runs on a separate thread, I don't exactly know how to pass the info/instruction to it. I know there is this thing called Handler in Android which might be useful in this case... But I need

SurfaceView or TextureView combination

岁酱吖の 提交于 2019-12-06 05:51:12
I am trying to apply real-time effects to camera preview and show in multiple views , how can I do? (just like the camera2 ) ( snapshot ) I know 2 approaches to show real-time effects on camera preivew if no ScrollView involved on the left side. Use GLSurfaceView and setRenderer . Bind SurfaceTexture as GLES external texture, and use GLSL(OpenGL Shading Language) to apply effects. Use TextureView . It is more complex because need to setup EGLContext/EGLSurface and do thread management. However, I don't know how to make ScrollView with real-time effect items overlay GLES composition. Should I

VideoView in ViewFlipper is transparent when video is playing

南楼画角 提交于 2019-12-06 03:46:43
I've got an Activity with two views set up in a ViewFlipper. One of the views is a layout with a GLSurfaceView and a few other widgets, the other just has a layout with a TextView and a VideoView. When I click on something in the GLSurfaceView, the ViewFlipper swaps so the video can play. In this screenshot, you can see the plain GLSurfaceView rendering a map on the left. On the right is what it looks like after the ViewFlipper has flipped and the video starts playing. The empty transparent area where the GLSurfaceView shows through is where the video is supposed to be. I can hear it playing

Android GLSurfaceView with drawable background

谁说我不能喝 提交于 2019-12-06 02:58:35
问题 I have a GLSurfaceView with a drawable as background, however only the background is visible when rendered without surfaceView.setZOrderOnTop(true) I need to avoid using setZOrderOnTop(true) because there are static TextView's being used on top of the GLSurfaceView. Any suggestions for getting this to work? 回答1: GLSurfaceView cannot really have a background. The way a surface view works is by cutting a hole through your Activity's window and showing another surface behind. Setting

How to pass data between activities using static variables on a public class?

谁说胖子不能爱 提交于 2019-12-06 00:33:40
I'm trying to use static variables on a public class for passing them between activities. I'm having a rare problem doing that. I'm giving values to the static variables on a activity. This activity calls a GLSurfaceView and listen for screen orientation changes. If i give values to the static variables on the GLSurfaceView, then, all works fine, the values are stored and i can retrieve them when the onCreate method is called again after a screen orientation change. The problem is when i store values on the static variables outside the GLSurfaceView class, inside the onTouchListener methods of

Rendering camera into multiple surfaces - on and off screen

末鹿安然 提交于 2019-12-05 20:43:44
I want to render the camera output into a view and once in a while save the camera output frame to a file, with the constraint being - the saved frame should be the same resolution as the camera is configured, while the view is smaller than the camera output (maintaining the aspect ratio). Based on the ContinuousCaptureActivity example in grafika , I thought the best approach would be to send the camera to a SurfaceTexture and generally rendering the output and downscaling it into a SurfaceView , and when needed, render the full frame into a different Surface that has no view, in order to

Android: how to display admob ads on GLSurfaceView

房东的猫 提交于 2019-12-05 20:27:53
I am currently able to get the admob ads on ui view (in separate test project ), but i want to display this ad in GLSurfaceView . I tried to load the ad in onCreate( ) method of activity and in present method of my screen (where all rendering is done) i called MyGameActivity.mAdView.bringToFront(); //thought it will bring the ad in front of all the game objects. now on running the project i can see the message in logcat window Recieved ad url "big url" but i cant see the ad on screen. In my game there is only one activity and many game screens. please help me figure out how to display ads on

Image effects with rotation and pinch to zoom using GLSurfaceView Android

江枫思渺然 提交于 2019-12-05 05:33:10
I was developing an application to apply effects/rotation/pinch to zoom in-out functionality on image. I have downloaded demo application from https://github.com/Grishu/ImageEffects . It works well, now my problems/questions are as below: Apply multiple effects on images with progress change value (e.g. First apply brightness effect and result of this apply another effect say "contrast".) - problem: in code effect always apply on original image. So change in code to apply effect on final image like, if(isApplyEffectOnOriginalImage){//call first time only mEffect.apply(mTextures[0], mImageWidth

Android: How do I resize the GLSurfaceView so I can add buttons around the outside?

守給你的承諾、 提交于 2019-12-04 18:46:40
I have a 3d model viewer, but I want to modify it, so hear are some questions/issues: (OpenGL ES 2.0) 1. Is it possible to change the GLSurfaceView dimensions (height and width) to something like 600 x 800 and centered on the device (tablet) screen? I want to use the unused area to line buttons around the outside. 2. Is it possible to resize glSurfaceView in XML? 3. Is there a way to set an XML layout on top of the screen? 4. Is it possible to set a background color under the rendering so that it's not all black? For reference as to what I'm trying to achieve, search "STL Viewer" on the