Android :: OpenGL Fading Background

Sep 14, 2010

I'm trying to create a particular effect where I have a bunch of particles on the screen which leave trails that slowly fade. I was hoping that I could simply use glClear with a small alpha value to do this but that doesn't seem to be working.My second idea was to draw a black face on the front of the screen but this doesn't seem to be giving me the right effect, the particles are faded but the background doesn't really fade. My next idea is to render to a texture and fade that texture but that's a lot of extra work and I'm not sure if it will solve my problem. Can anyone think of a way to do this? Am I missing something?I'm having trouble finding information about rendering to a texture on android. If anyone has some links to articles that would be great.

Android :: openGL fading background


Android :: Background Image In Opengl

Apr 18, 2010

Let me know how to set up a background image in opengl. You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

View 5 Replies View Related

Android :: 2d Background Image On 3d OpenGL Game

Feb 12, 2009

I need to draw a background of 320 x 480 (fullscreen) for a OpenGL game. What I did was to stretch the texture to 512 x 512 and mapped it to 320,480 quad and then drew the rest of the game elements. I tried changing the texture image to 256x256 and no noticeable improvement in speed. Game was horribly slow even on the real device. It is actually slower on the device than on the emulator... I think i am the first one to have such a situation.. I am drawing a max of 12 triangles only 2 for background and rest are 64 x 64 textures. on 5 quad made with 10 triangles. I have disabled Depth, Lighting already. Only blending enabled as I use transparent PNG for texture of sprites. render cycle is like this - draw the background - draw the sprites (only 5) [with 10 triangles only] - swapbuffer... Please don't advice me to use 2d canvas, bitmap etc... I need to do it in OpenGL only. don't think OpenGL ES 1.0 is so incapable that it can't give me atleast 25-30 fps with just 12 triangles which you one 256x256 texture and one 64x64 textures (used by 5 quads...

View 20 Replies View Related

Android :: How To Set Color Of ScrollView Fading Edge?

Apr 14, 2010

I have an Android scrollview with a white background. The fading edge is a white translucent gradient. I would like to change it be black instead of white. I have a ListView in the same project with a white background that has a black fading edge by default, but I can't find where (if anywhere) that was set.

View 4 Replies View Related

Android :: How To Change Fading Color In Scrollview?

Apr 21, 2009

I want to change the fading color for scrollview. One can change the fading color for listview but how about scrollview?

View 3 Replies View Related

Android :: Change Color Of Fading Edge In Listview

Aug 7, 2009

i have a listview with a very white layout. Thus I wish the fading edge was black, instead of white as it is right now. How can I change this? As far as I can see it cant be done in xml.

View 2 Replies View Related

Android :: How To Change Fading Orange Color In ExpandableListView?

Oct 29, 2010

How can I change the fading orange color in ExpandableListView while scrolling?

View 1 Replies View Related

Android :: Disable / Edit Fading That A List View Has At Its Edges?

Nov 9, 2010

Scrollable views such as the ListView have a fade out of the content along the edges where there is more content in that direction. How can I turn this fading off? I know you can change the cacheColorHint as discussed here: http://developer.android.com/resources/articles/listview-backgrounds.html but that is not what I am looking for and will not achieve what I am looking for in this case.

I want to disable the fade completely or be able to reduce the size and or transparency of it. Is this possible?

View 1 Replies View Related

Android :: OpenGL Speed Issue - Code Contribution To Other OpenGL

Feb 25, 2009

Single Threaded OpenGL game ! (check bottom, you can download and use the helper class) Lighting disabled ! Depth Buffer disabled ! Culling enabled ! Textures disabled !

Just 176 integers (x,y values only) making 88 vertexes along with 132 index numbers making "44 triangles only"

Framerates I get is

with GL_BLENDING disabled - 145 fps approx only! enabled - 110 fps approx only!

I have the screenshot of exact code in the draw function here.. just 2 damn lines ! I have hidden only the comments.. click here to see it http://prasna991.googlepages.com/drawframe.png

variable details in the 2 lines of code =========================== ipts = 176 elements (only x and y for each vertex) totallinetriangles * 3 = 176 lineindexes = 132 elements - type "short"

Here is the screenshot of output drawing and how it will look like http://prasna991.googlepages.com/screen.png

OpenGL single threaded Initialization Helper ================================ Here is my OpenGL helper class.. makes the OpenGL initialization for newbies a cakewalk http://prasna991.googlepages.com/OpenGLHelperclass.txt

I tested by rendering on the touch event only.. frame rate drops only when u touch and drag and here I have just tested by tapping and releasing gently on the emulator and on the device

Is this the device limitations ? So graphics is actually a lot lot lot slower than on iPhone ?

View 8 Replies View Related

Android :: NDK OpenGL - Mixing Java And Native - C - Calls To OpenGL API

Jul 24, 2010

I would like to be able to use the OpenGL API from both Java and C (via NDK).

In Java, there is a GL object passed, which has all GL methods on it.

In C, you just talk to the native library.

In a single onDrawFrame callback (for which Java is passed a GL), can I use methods on the GL object, and also call NDK methods which access the openGL library?

In other words, is the GL object just a wrapper for the same instance of the native library?

View 3 Replies View Related

Sprint HTC Hero :: Are My Googling Skills Fading?

Feb 3, 2010

I have a box at home that is constantly getting new O/S just for the sheer enjoyment of reimaging and playing with new electronic toys.(OK so I got insulted while watching Big Bang Theory where Sheldon was getting all excited about re-imaging his PC and installing his myriad of partitions and O/Ss and software a friend of mine said "OMG What a dork" meanwhile I sat there all giddy because I wanted to hep")but I digress.I can't find a definitive post to as which rom is better and why.

View 3 Replies View Related

Android :: How To Add A Background Theme / Background Wallpaper To My App?

Nov 18, 2010

How to add a background theme and/or background wallpaper to my app? Right now my app background is plane.

View 2 Replies View Related

Android :: FPS Using Opengl Es On G1

Jan 27, 2009

I am working on developing a 3d game. I have loaded ms3d model in my project and all texture and everything is working fine. I m not loading any joints.But I am facing two major problems which indeed are related to one thing. 1: I have got FPS problem in my game.Its too low even on G1. 2: When I have touch event to control the game it affects the FPSmore. So plz let me know how to optimize it more because the same game with same code of opengl es is wokring at 45 FPS on Iphone So why its running slow on G1.What is opengl es benchmark for G1 ? Wat can be comparison btwn Iphone and G1 related to hardware acceleration?

View 3 Replies View Related

Android :: OpenGL On 1.6

Oct 11, 2009

Been working with OpenGL a little more recently, and have been noticing pretty bad performance on my G1. Were there any major changes to OpenGL in 1.6 that would change the performance (or made my code incorrect?) on device? As a test, I grabbed the SpriteMethodTest out of Apps-For-Android, and gave it a spin. I had run it a few months ago and noticed pretty decent performance. With a low number of sprites (10-100), every method (Verts, Hardware VBO's, and DrawTex) had easily over 30fps, with drawTex beating out the others. I fired it up on my G1 (recently updated to 1.6), and all 3 methods are giving me performance of around 10-12fps with all methods of OpenGL at 10 sprites. Just for fun, installed the exact same APK on my girlfriends phone, which has yet to be updated to 1.6, and hers shows what I expected to start with, 30-60fps depending on method. So the question is, did anything change in terms of OpenGL, that would make the example code in SpriteMethodTest less than optimal?

View 3 Replies View Related

Android :: Opengl Es 2.0?

Nov 16, 2010

I want ask some questions about Opengl es 2.0?

View 3 Replies View Related

Android : How To Use Png / Jpg In OpenGL ES?

Aug 24, 2010

What is the correct way to save images in png format, if I want to use it in my Android OpenGL ES application as texture?

View 1 Replies View Related

Android :: Bad OpenGL Emulation

Aug 19, 2009

I'm developing a new game and have been having inconsistencies between the device and emulator. The biggest one for me right now is that the elements I draw with an orthographic projection work correctly on the device, but are 1/2 the size on the emulator. I've checked and rechecked the code 100 times and I'm positive I've done it right but am confused as to why I'm seeing that result. I suppose I could go forward doing ALL testing on a device - and I may have to, seeing that the emulator's frame rate is horribly slow - but I was hoping that I could do some of the work on it at least.

View 15 Replies View Related

Android :: OpenGL ES Application

Oct 25, 2010

I am currently trying to develop a game for android in OpenGL ES and I am testing it on my Nexus One. But I have run into some performance problems,and I would like to ask somebody about it,could you help?I currently have a very basic scene - background made of 25 tiles(256x256 texture each), and then a number of textured cubes(128x128 texture for each side of a cube ). However,when I try to display approx. more than 10 cubes, the performance becomes so sluggish that I can't even rotate the scene smoothly. I can't imagine how can I add more objects(player,enemies, all that kind of stuff) when it runs so slowly with 35 objects in total. I mean - games like Raging Thunder 2 probably display hundreds of objects at once(plus they do lots of computations behind the scenes) and they run super- smooth on my nexus one. What am I doing wrong? Could somebody help me please?

View 13 Replies View Related

Android :: Java API For OpenGL ES 2.0?

Aug 25, 2010

I am learning Android development, specifically to eventually do OpengL 2.0 ES on it. So far I have read that the NDK supports Opengl 2.0 ES. However, is there also a Java API for it? If there is a Java API for it, which one is recommended? I know both C++ and Java, so it is not a big deal if I have to use the NDK, but I would prefer to work only in Java if possible and without a big performance hit.

View 1 Replies View Related

Android :: PNG Transparency And OpenGL ES

May 27, 2009

I am rendering this PNG with no transparency just fine: http://n4te.com/temp/test.png However if I try to render this PNG (with transparency) with the exact same code, I just get a white box: http://n4te.com/temp/ball.png

I am loading the PNG into a texture like this: Bitmap bitmap = BitmapFactory.decodeStream(input); int[] temp = new int[1]; gl.glGenTextures(1, temp, 0); textureID = temp[0]; gl.glBindTexture(GL10.GL_TEXTURE_2D, textureID); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_NEAREST); // GL_LINEAR for quality. gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S, GL10.GL_CLAMP_TO_EDGE); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T, GL10.GL_CLAMP_TO_EDGE); GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0); bitmap.recycle();

I am using this blending: gl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA); How is it possible to render a PNG with transparency in OpenGL ES?

View 7 Replies View Related

Android :: OpenGL And Use Of ByteBuffers

Feb 23, 2010

I'm porting over some software from the iPhone, and the fact that I need to use ByteBuffers for my data structures in order to use OpenGL is killing me. My render loop takes 3ms to actually do the work and render screen, but I do need to perform a ByteBuffer clear / repopulate to update a dynamic texture. The bytebuffer clear, followed by the put() and position(0) to prepare for texture uploading takes about 100ms. This is WAY too slow. Is there a way around using ByteBuffers other than going the NDK route? The texture is 512x256 RGBA. should the ByteBuffer .clear() .put() and .position() be taking 100ms?

View 11 Replies View Related

Android :: OpenGl Drawn Something?

May 10, 2010

glReadPixels is too slow, so I need another way. Without testing object by object, Is there any other way?

View 7 Replies View Related

Android :: GluUnProject - Opengl Bug?

Feb 5, 2010

I'm having problems with gluUnProject. I saw other discussions on this message base regarding this function and they did not solve my problem. When I use GLU.gluUnProject I get values that are close, but not quite right. I'm manually keeping track of my model matrix and I replicate the projection matrix manually. (I have also tried setting the projection matrix to identity and manually incorporating a projection matrix into my model matrix, and I ended up with the same results). I tried using the builtin GLU.gluUnProject function and I also implemented my own based on reading that source and reading the C GLU sources and both seemed to give substantially similar results. So I put together a small demo, trying to keep it as minimal as possible and still get the point across. Either this demo shows a misunderstanding I have of gluUnProject or it shows a bug in the function or opengl projections. Can someone check this over and see if I'm just doing something wrong or if there's a bug that needs to be filed? The files are here: http://www.thenewsh.com/~newsham/unproj/ In particular:

unproj.java - full source to example unproj-debug.apk - resulting apk file unproj - directory with full ant-buildable project unproj.zip - zip of directory

View 7 Replies View Related

Android :: OPenGL - XML Integration

Aug 26, 2010

I'm making a media player application in android where one part of my screen has a animation which is made in OpenGL (ofcourse with Android/JAVA).....So my screen consists of 2 parts:

1) Left hand side consists of all the widgets (using xml).

2) Right hand side consists of the animation made in OpenGL.

I'm able to make the Gui (xml part) and also the animation (opengl). Can i integrate the GUI made in XML file with the animation (made using GLSurfaceview)?

View 1 Replies View Related

Android :: OpenGL ES Libraries

Jul 13, 2010

I looked around for info on this in the group but couldn't find any... so far in my OpenGL programming I've just done everything directly, but I was curious if anyone had written any "wrapper" libraries for it besides min3d. Min3d is great (or is getting there) but it's GPL'd, making it unsuitable for a commercial product (if my understanding of the license is correct).

View 5 Replies View Related

Android :: G1 Support For OpenGL ES 1.1?

Feb 2, 2009

Does anyone know whether the G1 device is capable of supporting OpenGL ES 1.1? Is this something that depends on both the graphics chip and the OS, or is it purely software? If Android/the G1 only supports OpenGL ES 1.0, are there any pieces of the 1.1 spec that are supported?

View 3 Replies View Related

Android :: OpenGL-ES 2.0 Support

Feb 5, 2009

Is there any plan to support OpenGL-ES 2.0 in Android? Is it possible to write a renderer youself based on OpenGL-ES 2.0? In that case, where to start.

View 2 Replies View Related

Android :: OpenGL Textures

Feb 17, 2010

I'm learning OpenGL on my own atm and I have a question about texturing a surface:

I can create a simple polygon like this:

CODE:......

Then I load all of that info into the approriate buffers and draw it to the screen with a call to:

CODE:..

My question:

I'm looking for a good example of how to take an image and texture it to the surface.

View 4 Replies View Related

Android :: OpenGL ES Canvas ?

Jun 13, 2010

I'm working on an OpenGL ES game using the NDK. My min SDK version is 1.6. I have created an OpenGL Es 1.0 renderer in Java and am calling a native JNI method in that renderloop.

The problem I'm having is that it seems that the resolution of the rendering context is limited. When using the emulator I'm getting a rendering canvas of 480x320, which is fine. Now; when I use my HTC Desire I am only getting a canvas of 533x320 while the native resolution of this phone is 800x480px.

View 2 Replies View Related

Android :: OpenGL ES 2.0 On Eclair

Dec 24, 2009

Eclair has supported OpenGL ES 2.0. But I can not find related JNI wrapper for OpenGL ES API. How a Java application use OpenGL ES 2.0 functions?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved