Android :: GLSurfaceView On App Widget?
Mar 31, 2010currently GLSurfaceView is not supported in app widget .can we make changes to framework to make it support? is there any limitation? if possible what framework change is required?
View 12 Repliescurrently GLSurfaceView is not supported in app widget .can we make changes to framework to make it support? is there any limitation? if possible what framework change is required?
View 12 Repliesi want to start programming in OpenGL on Android, but Eclipse can't find the GLSurfaceView. I'm using the 1.5 SDK. Do I have to set specific entries in the build path?
View 2 Replies View RelatedFollowing the samples and examples, I've successfully been able to load a model on screen and rotate it with the DPAD keys and overriding the onKeyDown method of the GLSurfaceView. Trying to use a letter though, causes a small box to appear at the bottom accepting the text that is being typed. What I'm not entirely clear on, is since I don't have a listener defined in the main Activity, why those key letter key presses are being intercepted by some other inherent listener(?). I setup an OnKeyListener for the view to call my own method and that does work... but I'm wondering if there is perhaps a better way to handle it.
View 3 Replies View RelatedI am a lazybones using GLSurfaceView and loving it. But now that my code is running too darn fast (heh), I would like to slow it down via setting eglSwapInterval to 2 or something. Just to be nice to the battery. But, being a lazybones, I can find no way of doing this when using GLSurfaceView. (and hacking an early return from onDrawFrame() was very unsatisfying).
View 2 Replies View RelatedWe are developing an application that uses a GLSurfaceView to display 3D objects. We regularly get the "Application Not Responding" dialog. Inspection of the dumped threads reveals something that looks suspiciously like a deadlock. I have added the three thread dumps involved below. The first thread is the main application event thread, and it is waiting on a join with a GLThread.
The second thread is a brand new GLThread that is waiting for a semaphore lock presumably so it knows it has exclusive access to the graphics hardware. The third thread is probably a previous GLThread (the one the main thread is waiting for to finish), that is waiting to be notified. The strange thing is that the main application thread has just done a "mDone=true; notify();" prior to calling "wait()", so the third thread should have been awaken? .........................
Look at this: http://nhenze.net/?p=172
They show that it is possible to put an GLSurfaceview on top on a SurfaceView. I hope it would be useful.
I'm using GLSurfaceView to create a simple OpenGL drawing application. Since the elements drawn in each frame must remain on screen in order to be composed into the whole drawing, I don't use gl.glClear(GL10.GL_COLOR_BUFFER_BIT) at the beginning of each frame. But not clearing the color buffer leads to substantial flickering. Is there any way to eliminate flickering while still not clearing the screen at the beginning of each frame?
View 7 Replies View RelatedI am able to get a GLSurfaceView to have a transparent background with:
CODE:............
when I set the Activity's window background to transparent and the GLSurfaceView is the contentView of the Activity.
But, let's say my GLSurfaceview is parented by a ViewGroup and I want GLSurfaceView bg to be transparent to see the Viewgroup's background - I am not able to do so with the code above. Is this a limitation or am I missing something?
I have an application that uses GLSurfaceView to draw OpenGL ES graphics. This is all working (mostly) how I would expect.
Now, I would like to implement a screenshot feature. For normal views, it seems that the standard practice is to create a new Canvas with a Bitmap and then draw to that Canvas using View.onDraw(Canvas).
I've tried using SurfaceView.draw(Canvas) in a similar fashion, but it always results in a blank (black) image.
I've also tried using the drawing cache with the exact same result.
how to draw text on GLSurfaceView in Android?
View 5 Replies View RelatedHow can one use a GLSurfaceView similar to a ViewGroup, in the sense of adding Views(CustomViews) over it? Is there any means to make the GLSurfaceView be the canvas on which the view draws its contents?
View 5 Replies View RelatedI'd like to display some 3d object on top of the normal 2d ui layout screen. The 2d ui screen has background image, and GLSurfaceView is child of the content layout. I tried the same technique of the Translucent GLSurfaceView in ApiDemos sample, but GLSurfaceView clears all and shows black background. Code...
View 2 Replies View RelatedI want to create a simple Map based application in android ,where i can display my current position.Instead of overlaying a simple Image on the MapView to represent the position, i want to overlay the GLSurfaceView on the MapView. But i don't know how to achieve this. Is there any way to do that?. Please anybody knows the solution help me.
View 1 Replies View RelatedI am trying to merge two examples from the ApiDemos so one overlay over the other. 1. CameraPreview.java 2. TranslucentGLSurfaceViewActivity.java I guess GLSurfaceView is not really necessary, I saw demos that uses a GL layer as a Camera PreviewCallback, but since I am such a noob at OpenGL, I am kind of lost. Can someone points me toward the light (figuratively speaking)?
View 1 Replies View RelatedI 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?
View 2 Replies View RelatedI started an Android OpenGL application and I have the following classes: class A extends Activity class B extends GlSurfaceView implements Renderer When class A's onCreate is called, it creates an object of type class B and calls: How should I use my custom class that extends glSurfaceView in my XML file/Activity? Code...
View 2 Replies View RelatedI would like to use GLSurfaceView for my new cool application. But I am still hestitating because Android 1.1 and Android 1.0 do not have GLSurfaceView class. And another question, If I don't use GLSurfaceView, how can I use OpenGL with SurfaceView class?
View 2 Replies View RelatedI want to load a bitmap on a GLSurfaceView.. I do it like this: Code...
But the bitmap repeats itself on the surface and is also inverted.. why is this.. How do i make it appear only once...kindly help!
Is there anyone who knows how to overlay a GLSurfaceview on a Surfaceview? The Surfaceview is used for the camera preview..
View 4 Replies View RelatedI am currently porting a 3D app on Android. This app consists of a 3D view (embedded in a GLSurfaceView) and of menu screens (for settings, search , etc.).
My main activity is the one containing the GLSurfaceView. It's always the root of it's task. The problem is that my GLSurface gets destroyed whenever I launch another activity and all the GL objects (VBOs, textures) that I created in the GL context get deleted/invalidated along. So whenever my users go in the menu, the 3D scene has to be fully reloaded. Wouldn't there be a way to prevent the surface's destruction ?
as there's a GLSurfaceView in use, no other views receive any KeyEvents. MotionEvents however, are still working as expected. Is there a way to prevent GLSurfaceView from swallowing all KeyEvents?
View 4 Replies View Relatedwhat puzzle me so much is that i can't destroy a GLSurfaceView while i don't want to exit the activity.
the fact is when i destroy a GLSurfaceView which had show in the screen (that means it has binded to the activity's SurfaceHolder), the activity exits without any prompting. Perhaps ,the Context which provided in the Construction of GLSurfaceView joins the two things together. so my conclusion is that a GLSurfaceView can only be destroyed when exit the activity. is there anyway to destroy a GLSurfaceView without exit activity? is there someone can provide a clue?
Having a little trouble working out how to have a context menu working in my GLSurfaceView view. There doesn't seem to be a "onCreateOptionsMenu" or "onOptionsItemSelected" to override. I do notice a "setOnCreateContextMenuListener" but I don't know how to use it.
View 5 Replies View RelatedThe Emulator draws line widths VERY incorrectly in OpenGL (GLSurfaceView). See http://www.flickr.com/photos/53002505@N03 for a comparison of the lines drawn correctly (in JOGL) and incorrectly in the emulator. The code also draws correctly on a real device (G1) - looks just like the JOGL screen shot. I believe this is a bug. However, I'm not an OpenGL GURU. Hence I have posted a concise version of the code to demonstrate this problem at at http://gist.github.com/523955 and http://gist.github.com/523961. I hope I am proven wrong about a bug in the emulator, and can find a way to use the emulator for what I want to do.
View 5 Replies View RelatedI have an application that receives information from a database, and is used to visualize 2D bitmaps onto a GLSurfaceView. The information received will determine the x-position of the bitmap, and which bitmap image to use (there are 4 different bitmaps in my res folder to choose from).
Below are the three classes that are being used. The Activity sets the Shapes objects that need to be drawn by passing an ArrayList to the GLLayer class. This ArrayList is passed to the instance of ShapeStorage class via another setList method. This class is responsible for drawing when they are received.
The problem that I'm having is the following. Suppose I receive one object (let's say that it's a square at it's located at x=1). Some time goes by, and I receive another shape (this time, it's a triangle, and it's located at x=-1). However, when this new shape appears on the screen, the old bitmap's appearance changes to a triangle, and the new one becomes a square. In other words, the objects themselves are at the correct position that they are supposed to be at, but the bitmap being associated with them has changed. Does anyone know what the possible cause of this can be? I'm still a newbie to OpenGL-ES, and while this code looks very convoluted, it just involves setting a bunch of various properties for the View. code...
In a nutshell, I use regular views for all my application except for on that uses a GLSurfaceView.
The UI flow works well. I can navigate form one to the over except whith the GLSurfaceView
When I open the first time the GLSurfaceView everything works fine, but when I switch to another view and come back (pause menu) my view is completly black...
I tried several things and the closest I got from fixing it is to recreate the GLSurfaceView completly (but that takes too much time ...)
What I want is be able to do this:
CODE:........
what I'm doing wrong or point me to a tutorial that explain how to swap form GLViews to regular views
I have a SurfaceView and a GLSurfaceView inside a FrameLayout. The first SurfaceView is used for camera preview, and the GlSurfaceView is for drawing 3D objects that are supposed to be on top of the camera preview.
So natually, I compose the xml like this:
CODE:...........
Unfortunetly, this doesn't work. 3D objects can not be seen. I found later that it only works when the order of the 2 views is reversed, which means:
CODE:..........
The reversed ui works fine, for a while... Everything is OK when the app has a fresh start. But when I press home to go back to the desktop and then click on the icon again to resume the app, 3D objects are gone. Then I reverse the ui again, like before, no 3D objects. But when I press home and then resume the app, they appeared!
My conclusions are: The order of the 2 surface view are wrong in the fresh start, but when the app is resumed from another task, they are set back to their normal order.
An example in APIDemos, called "SurfaceViewOverlay" show that you can have Android UI (buttons, textview, etc.) hovering over a GLSurfaceView.
Should I use a textview this way to display real-time UI (like Score) in OpenGL game? Will it hurt game performance? Currently I'm using a sprited text for my OpenGL game UI.
I've tried using this but I don't notice any performance drop. But I ask because I'm worry about the slower phones. I'm using G1 for testing btw.
I won't beat around the bush here... I'm trying to put my GLSurfaceView (called ShapeSurfaceView) into a relative layout. Before trying to use a layout, everything has been working fine simply instantiating the view and calling setContentView(mShapeSurfaceView). Since I got this error I researched how to create the layout completing in the Java and that is working quite nicely... it's just a ton of code to setup the layout, view and rules for the view. I'd really rather have the XML method working.
Here's the main XML, I've added no other views yet...
The java from onCreate, nothing special...
setContentView(R.layout.main); mShapeSurfaceView = (ShapeSurfaceView)findViewById(R.id.glview);
Here is the logcat error. My previous logcat error was mentioning the class constructor missing the AttributeSet parameter so I added that to the constructor for the ShapeSurfaceView yet still ended up with this. code...
Can it be done? If it can, is it much of a performance hit, and is there an example anywhere?
View 4 Replies View Related