glsurfaceview

Implementing GLSurfaceView.Renderer Issues

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Code derived from the tutorial I am beginning some OpenGL-ES 2.0 for the Android system. I took the following code from: http://developer.android.com/training/graphics/opengl/environment.html#renderer public class MyRenderer implements GLSurfaceView.Renderer { public void onSurfaceCreated(GL10 unused, EGLConfig config) { GLES20.glClearColor(0.5f, 0.5f, 0.5f, 1.0f); } public void onDrawFrame(GL10 unused) { GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT); } public void onSurfaceChanged(GL10 unused, int width, int height) { GLES20.glViewport(0, 0,

surfaceview + glsurfaceview + framelayout

匿名 (未验证) 提交于 2019-12-03 02:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm new at java and OpenGL. I'm trying to get a camera preview screen with the ability to display 3d objects simultaneously. Having gone through the samples at the api demos, I thought combining the code for the the examples at the api demo would suffice. But somehow its not working. The forces me to shut down upon startup and the error is mentioned as null pointer exception. Could someone share with me where did I go wrong and how to proceed from there. How I did the combination for the code is as shown below: myoverview.xml <?xml version=

TextureView vs. GLSurfaceView or How to use GLSurfaceView with EGL14

匿名 (未验证) 提交于 2019-12-03 02:16:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am getting confused with EGL. My GLSurfaceView creates an EGLContext. Now I create a shared context. Now I need to use a EGLExtension. The Method I have to use is called (>=API18): EGLExt . eglPresentationTimeANDROID ( android . opengl . EGLDisplay display , android . opengl . EGLSurface surface , long time ); The Problem is, that the GLSurfaceView does only creates javax.microedition.khronos.egl.EGLContext s. Which tells me, NOT to use GLSurfaceView. So I tried TextureView, which is slightly similar, with the difference that you

Android ― GLSurfaceView EGL_BAD_ALLOC

匿名 (未验证) 提交于 2019-12-03 01:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: My program switches between two Activities that each inflate a derived GLSurfaceView that uses VBOs. After switching back and forth between the two Activities a few times, the program crashes and throws the following exception. Each time there is a context switch the VBO buffers are deleted, onStop() is called, and a new instance of the next Activity's GLSurfaceView is inflated. I refactored the program to run on only one GLSurfaceView and Activity , and the program seems to run without incident. Only polygons and colors are used, no

Android GLSurfaceView transparent background without setZOrderonTop

匿名 (未验证) 提交于 2019-12-03 01:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: 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. When I init my view : setEGLConfigChooser(8,8,8,8,16,0); setRenderer(renderer); getHolder().setFormat(PixelFormat.TRANSLUCENT); setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY); setZOrderMediaOverlay(true); In my

Android OpenGL demo “No config chosen”

匿名 (未验证) 提交于 2019-12-03 01:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm having a real problem with the Google's OpenGL demo for Android . I set it up in Eclipse but can't get it to execute. It builds with no problems, but then stops at "java.lang.IllegalArgumentException: No config chosen" right before it opens. I've been up and down Google searches and Stack threads with no solution. I did find what I thought was a lead here: OpenGL ES 2.0 Support for Android? It uses a command gLSurfaceView.setEGLConfigChooser(8 , 8, 8, 8, 16, 0); but alas, I'm new to OpenGL on android and don't know where to put

Android学习之OpenGL ES概述基础

匿名 (未验证) 提交于 2019-12-03 00:21:02
最近写一个有关视频的项目,需要用到GLSurfaceView,先自己琢磨琢磨。 在Android平台上使用OpenGL ES主要有两种方式:NDK和SDK。通过NativeActivity,应用在native(c/c++)中管理整个activity的声明周期,以及绘制过程。由于爱native代码中,可以访问OpenGL ES的代码,因此,可以认为NativeActivity提供了一个OpenGL ES的运行环境。同时,Android提供了两个可以运行在OpenGL ES的类:GLSurfaceView和TextureView。由于真正的OpenGL ES仍然运行在native在层,因此在performance上,使用SDK并不比NDK差。而避免了JNI,客观上对于APP开发者来说使用SDK要比NDK容易。而GLSurfaceView和GLSurfaceView.Renderer是使用OpenGL ES的基础: GLSurfaceView: 这个是我们使用OpenGL ES来进行绘制和操作的view,它和SurfaceView在功能上相似。 GLSurfaceView.Renderer: 这个接口定义了在GLSurfaceView上绘制的方法,我们必须将它实例化attach到GLSurfaceView。 onSurfaceCreated()

Using GLSurfaceView class with android xml layouts

回眸只為那壹抹淺笑 提交于 2019-12-02 23:17:44
I want to make use of the android xml layouts. I have put a glSurfaceView in a frame layout to use in conjunction with a linear layout like so... <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1"> <android.opengl.GLSurfaceView android:id="@+id/surfaceviewclass" android:layout_width="match_parent" android:layout_height="match_parent"/> </FrameLayout> <LinearLayout android:id="@+id/gamecontrolslayout" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="5" android:background="@drawable/backdrop

How do I use Android’s “Surface” classes?

旧时模样 提交于 2019-12-02 17:38:36
Is there a detailed explanation of Surface, SurfaceHolder, EGLSurface, SurfaceView, GLSurfaceView, SurfaceTexture, and TextureView? In particular: What’s the difference between SurfaceView and TextureView? Do I need to use GLSurfaceView to use OpenGL ES? How do Surface and EGLSurface interact? What does SurfaceTexture do? Why does the stuff I draw on a SurfaceView have to go above or below everything else? What is SurfaceFlinger? How does composition of the status and navigation bars work? While we’re at it, what’s the right way to structure a game loop on Android? The answers to these and

GLSurfaceView not appearing over MapView

你离开我真会死。 提交于 2019-12-02 12:12:47
问题 My goal is to use OpenGL ES 2.0 with Google Maps. I would like to create an app that follows the user as they are traveling from point A to point B. I realize that this can be done using Google Maps addPolyline to draw a line, but I want to use OpenGL instead in order to show overlap of paths. I'm currently receiving an error which is due to incorrectly setting up the GLSurfaceView. My code in the GoogleMapsTracker class is as follows: private MapView mapView; private GoogleMap map; private