glsurfaceview

Creating a proper Android Splash/Loading screen

I have an application that uses OpenGL on a GLSurfaceView. The problem is that the initial load takes quite a while processing textures and getting things ready. What i want to do is have a simple PNG displayed (with a slight animation) while the GLSurfaceView is getting ready. As soon as it's ready to render, i would like to tear down ...

Android OpenGL glDrawElements works on 2.1, but not 1.6

I have a very simple GLRenderer subclass that draws a bunch of polygons on the screen. On my Nexus One with 2.1 installed, I see exactly what I expect. On my G1 with 1.6 installed, I only get the glClearColor displayed. I can alter the color, and see that my onDrawFrame function is at least partially functioning. I can't fathom a good e...

How to retain the state of a activity that has a GLSurfaceView

My problem is our game can switch into menu and setting mode instantly but it will need 4-6 seconds to load texture, init GL render mode eventually I just used 6 simple textures to create 6 sprites in game. Please help me answer two questions: 1. How can I preload our assets in android os to start our game quicker? 2. In order to use a ...

detect where on the screen onTouchevent happened

Hey Guys, I've got an onTouchEvent boolean on a Surfaceview, I've got openGL objects drawn on the view and I'm wondering is there anyway to detect where on the screen the onTouch happened? e.g (x,y) co-ordinates. ...

android view or surfaceView, which should i use?

Ive been trying to make a scrollable/zoomable app and everything has gone great except for drawing bitmaps. It is a very large image (6656 by 4096) that i have split into tiles. There is a rectangle array that the bitmaps are drawn to, and it detects what rectangle is in the top left corner so it can draw the bitmaps that will cover the ...

Android. GLSurfaceView doesn't become invisible

I have an activity with GLSurfaseView as content. I must do that view invisible on Back button pressed. I hold onKey method and, how it seems to me, make all as need. Code is here: public boolean onKey(View v, int keyCode, KeyEvent event) { return super.onKeyDown(keyCode, event); } @Override public boolean onKeyDown(int...

Button and GLSurfaceView

I have a GLSurfaceView where I show some animations using OpenGL. I now want to add a button to this view. How is this accomplished? Can it be done without involving the xml layout? ...

How can I sense if the user is holding down their finger on the screen without moving it?

I am currently using pure OpenGL to paint buttons in my own little way. I can detect if a button is pushed with onTouchEvent, but I want to know if the user is holding the button down, or if the user is no longer touching the screen. ...

VideoView in ViewFlipper is transparent when video is playing

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 GLSurfa...

Android GLSurfaceView with drawable background

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? ...

GlSurfaceView is completly black when reloaded

Hi all 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...

Android OpenGL half screen problem

I have follow an example of an opengl application and I don't know why is this thing happening... I have a GLSurfaceView with it's corresponding renderer drawing a triangle. But, instead of getting the whole view on screen, I have just the upper half, and it's also duplicated as you can see on the picure. I'm using a Nexus One the xml...

GLSurfaceView textured rect as button clicks

I just want to ask a simple question related the GLSurfaceView and drawn objects on it. I am drawing a rect and bind a texture to it. It works great. Then, the textured rect I am drawing is on a GLSurfaceView. I am drawing a "button"-like object for which I should know whether the user clicked on the button or not. I imagined that like...