glsurfaceview

How to save bitmap from GLSurfaceView (Only bitmap, not whole texture)

你。 提交于 2019-11-28 09:28:15
I am using this code to give multiple effect on bitmap that is on GlSurfaceView. apply-effects-on-image-using-effects Now, I want to save the bitmap. They have given the code to save the bitmap but with that, whole GlSurfaceView is going to be saved as bitmap image. Instead I want to save only bitmap area to save as Image. There is method that takes pixels and make bitmap from that and also make image. e.g.: public Bitmap takeScreenshot(GL10 mGL) { final int mWidth = mEffectView.getWidth(); final int mHeight = mEffectView.getHeight(); IntBuffer ib = IntBuffer.allocate(mWidth * mHeight);

GLSurfaceView displaying black on Nexus 7 with Android 4.2

家住魔仙堡 提交于 2019-11-28 07:56:17
问题 I have an OpenGL ES2.0 app that is working on devices running various Android versions from 2.2 up to 4.1. However I have been told that when running it on a Nexus 7 with Android 4.2 the 3D graphics in the App are all black. The Action Bar and dialogs work fine though. I have tried it on an emulated Nexus 7 with Intel Atom processor, HAX and GPU enabled running 4.2.2 and that works OK. I would have preferred to run the ARM image but that doesn't seem to include Open GL ES2.0 Does anyone have

Android draw on camera preview

一曲冷凌霜 提交于 2019-11-28 04:25:55
I'm making a virtual reality application where the camera should detect faces, locate them and show their location on the camera preview. I know of 3 ways to do it, I'd like to use GLSurfaceView to be as fast as possible ( according to this post ), but currently I'm trying to draw on the same SurfaceView where the camera is using for its preview. My callback to draw on it would be onFaceDetection like so: public class MyActivity extends Activity implements SurfaceHolder.Callback, Camera.FaceDetectionListener { Camera camera; SurfaceView svPreview; SurfaceHolder previewHolder; TextView tvInfo;

Android GLSurfaceView transparent background without setZOrderonTop

浪尽此生 提交于 2019-11-27 23:35:55
问题 Sorry for my English. My work is based on https://github.com/harism/android_page_curl/ After many hours of research, I have found a few solutions, but not for all the issues what I have in my application. I've some trouble with a GLSurfaceView. I've got a background with a relativeLayout, a GLSurfaceView, and an overlay on top. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/background" android:layout_width="match_parent" android:background="@layout

Android draw on camera preview

陌路散爱 提交于 2019-11-27 05:21:01
问题 I'm making a virtual reality application where the camera should detect faces, locate them and show their location on the camera preview. I know of 3 ways to do it, I'd like to use GLSurfaceView to be as fast as possible (according to this post), but currently I'm trying to draw on the same SurfaceView where the camera is using for its preview. My callback to draw on it would be onFaceDetection like so: public class MyActivity extends Activity implements SurfaceHolder.Callback, Camera

GLSurfaceView framerate issues on Nexus 5

烂漫一生 提交于 2019-11-27 02:28:24
问题 I have an example application (full source) that encodes camera frames with MediaCodec while displaying them on a GLSurfaceView. Systrace confirms 30 drawing calls are made each second: However, a screenrecord recording (.mp4, YouTube) shows the apparent framerate to be considerably lower. In a nutshell, my encoding & display loop does the following: Makes a MediaCodec Surface input EGL Context current Draws a camera frame to the MediaCodec EGL surface Makes the GLSurfaceView EGL Context

Applying Effects on Video being Played

[亡魂溺海] 提交于 2019-11-27 00:58:18
I am new to the world of Open Gl and I have googled a lot but i am unable to find a way to implement Effects on a video being played. After some research i have finally found a class that can be used to play video on a GLSurfaceView. And i know from Google documentation and that we can apply effects on a video. By following this post i was able to successfully apply effects on bitmaps. Now i want to do that for my video so any help or pointers is appreciated. Here is the VideoSurfaceView that i am using to Render Video that is being played package me.crossle.demo.surfacetexture; import java.io

Capture screen of GLSurfaceView to bitmap

坚强是说给别人听的谎言 提交于 2019-11-26 09:19:26
问题 I need to be able to capture an image of a GLSurfaceView at certain moment in time. I have the following code: relative.setDrawingCacheEnabled(true); screenshot = Bitmap.createBitmap(relative.getDrawingCache()); relative.setDrawingCacheEnabled(false); Log.v(TAG, \"Screenshot height: \" + screenshot.getHeight()); image.setImageBitmap(screenshot); The GLSurfaceView is contained within a RelativeLayout , but I have also tries it straight using the GLSurfaceView to try and capture the image. With

Applying Effects on Video being Played

放肆的年华 提交于 2019-11-26 08:13:01
问题 I am new to the world of Open Gl and I have googled a lot but i am unable to find a way to implement Effects on a video being played. After some research i have finally found a class that can be used to play video on a GLSurfaceView. And i know from Google documentation and that we can apply effects on a video. By following this post i was able to successfully apply effects on bitmaps. Now i want to do that for my video so any help or pointers is appreciated. Here is the VideoSurfaceView that