Android :: OpenGL ES 1.1 Vs 2.0 For 2D Graphics - With Rotated Sprites

Mar 14, 2010

I am having trouble finding information related to which i should choose, OpenGL ES 1.1 or 2.0 for 2D graphics.

OpenGL ES 1.1 on Android is a bit limited to my knowledge, and based purely on sprite count the only useful renderer is draw_texture() (as far as i know). However, that does not have rotation and rotation is very important to me.

Now with the NDK adding support for OpenGL ES 2.0, i am trying to figure out if there is anything that preforms as well as draw_texture(), but can handle rotation.

Anyone have any information on if 2.0?

Android :: OpenGL ES 1.1 vs 2.0 for 2D Graphics - with rotated sprites


Android :: Curved Graphics In OpenGL ES

Aug 18, 2009

I was disappointed to discover that OpenGL ES, the flavor of OpenGL implemented in Adroid, doesn't appear to support the usual techniques for drawing graphics involving curves. I'd be happy with either OpenGL's low-level Bezier evaluators, or the more advanced NURBS approach, but AFAICS neither is supported - only straight-line graphics are possible. Does anyone know, am I missing something basic here? Is there a way to generate curves of any sort in Android's OpenGL implementation? I am still fairly new to Android development, so that's certainly possible. Note that I'm not talking about functions related to Canvas - I know about drawOval, for example - but I specifically need 3D.

View 2 Replies View Related

Android :: Training Session / Course For Droid Graphics API - OpenGL ES?

Sep 25, 2010

Can anyone please recommend a training session/course for Android graphics API/OpenGL ES?

View 1 Replies View Related

Android : Is OpenGL Faster Than Canvas / Drawable Method For Graphics?

Nov 6, 2009

Or does it merely provide more options for graphics?

View 2 Replies View Related

Games :: Best Game/graphics Demo To Show Off Android Graphics Engine

Mar 31, 2009

I want to show off how good opengl es can display on my G1. Does anyone know a game with good 3D graphics that I should install for this?

View 13 Replies View Related

Android :: Animated Sprites For Games?

May 25, 2009

How do I add animated sprites to a custom view? I have used AnimationDrawable object to execute the animation. The animation works if I add the xml resource to the background of my custom view. But I want to know how to draw the animationdrawable directly on a canvas. Please help me with examples..

View 5 Replies View Related

Android :: Get Droid Browser To Interpret Sprites Better?

Oct 19, 2010

I'm developing a mobile web application and I have a home screen with a number of icons on it, so I tried to use a sprite to serve all the images in one swoop.

I noticed, however, that the iphone4 scaled the images in my sprite fairly well (they looked a little dithered), but on my HTC Evo the sprite rendered images look really blocky. I switched to standard images (background:(/image_url/) w/o background-position) and the image looked much better - see this , where the left image is served using the single image, and the ones to the right of it are served from the sprite (but are the same images in the sprite).

Is there a way to get the Android browser to interpret the sprites better?

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

Android :: Rotated Image In ImageView

May 9, 2010

I want to show an arrow that indicates the direction towards a goal, using the orientation sensor and current GPS position. Everything works well, except that I want to rotate the arrow image in my ImageView.

View 2 Replies View Related

Android :: Put Rotated Text On An Imageview

Nov 24, 2010

I need to put some text over an imageview.

CODE:..........

But this doesnt displays the text only the picture. And also I have to rotated this text. Is this even possible with TextView?

View 1 Replies View Related

Android :: Camera Preview 90 Degree Rotated

Jun 8, 2009

When camera is launched in portrait mode, the viewfinder screen is 90 degrees rotated and stretched out. I read couple of places that this is a known bug with sdk1 but i am still finding this problem with cupcake. Has anyone having any idea is this issue is fixed in cupcake or in donut? any clues how to move ahead. setOrientation and changing the preview size didn't help. Even I read somewhere Surface flinger class needs change: http://groups.google.com/group/android-framework/browse_thread/thread...

View 3 Replies View Related

Android :: Display UI Elements About 180 Degrees Rotated

Oct 5, 2010

I would like to display some UI Elements on a android xml layout file. I try to make an application, where two players can sit at each end of the mobile device, and play against each other.

So need to show some Button 180 degrees rotateted.

Is this possible? I tried android:gravity, but this did not work.

View 3 Replies View Related

Android :: Camera Preview Rotated And Stretched

Jun 11, 2009

I am using the code from ApiDemo Camera Preview and it runs fine on my Gphone but the preview is rotated and stretched.

View 8 Replies View Related

Android :: What Happens To Thread As On Destroy Is Called When Device Is Rotated

Jun 15, 2010

I would like to know as to what will happen to the thread which has been created by an activity and the device is rotated. I have observed that the onDestroy method is called when this happens. Will the thread be killed too?If the thread is not killed, how can I reassociate the thread with the activity as a new instance of the activity is created on rotation.

View 1 Replies View Related

Android :: Crash When Activity Starts Up And Screen Gets Rotated?

Jun 26, 2009

I am getting a crash intermittently when my Activity starts up either initially or when the screen gets rotated I get several log messages which I have been unable to get any insight from: timeout expired mFreezeDisplay=1 mFreezeCount=0 App freeze timeout expired Force clearing freeze then lots of: Lock_layer timed out (is the CPU pegged?) Key dispatching timed out then I get ANR annotation: keyDispatchingTimedOut the trace has alot of sending signal 3 to alot of PIDs

View 2 Replies View Related

Android :: Removing / Destroying Objects When Screen Is Rotated

Jan 25, 2010

I am finding that performance degrades after one or more screen rotations, and I presume that this is likely to be because an App's main Activity is destroyed and recreated each time the screen is rotated and that my app must be leaking memory when that happens.I have read that, contrary to what one might expect, not all the objects created by an app's main Activity (or in classes called by that Activity) are destroyed when the activity is destroyed. Specifically, I think I have read (although I can't now find where) that if the View uses a large bitmap member object then the Activity's onDestroy() method should be over-ridden and the bitmap should be explicitly recycled.Are there other objects that need to be destroyed or removed when the Activity is destroyed? What about Listeners? Is there a comprehensive tutorial or guide on this subject?

View 1 Replies View Related

Android :: Rotated Map View - Get The Touches Back To Where They Belong

Feb 24, 2010

I am using the MapsDemo example for a mapping application where I rotate the map in direction of travel. This works well even without the canvas smoothing in the example.

However, I haven't yet managed to adjust the dispatchTouchEvent code to counter the map rotation effect for the user touches (right now when the map is rotated 90 degrees a user's horizontal sweep will move the map vertically etc). The sample code only offers the teaser:

CODE:..........

And while I am at it - Is it still possible to position the zoom controls separately, so that they do NOT rotate when the map rotates? I read that the getZoomControls() is deprecated.

View 2 Replies View Related

Android :: Don't Want Activity To Be Destroyed/created When Phone Is Rotated.

Apr 18, 2010

I have tried to freeze orientation: setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

But thought screen stays in portrait orientation, the activity is still recreated.

View 1 Replies View Related

Android :: Clicking A Rotated ListView Gives Wrong Coordinates

Aug 25, 2010

I have a ListView that can have one or more clickable items. When I apply a rotate animation the coordinates that are clicked correspond to the original position of the ListView items. For example a list with one item in portrait mode rotated 180 degrees will have the item upside down on the bottom of the screen, but the item gets the click event when I click the top of the screen. 180 degrees is just an example I want to be able to move an arbitrary angle.

I've looked through all the listView properties but none seem to have any effect on the clickable coordinates. I would assume willChangeTransformationMatrix would do the trick but it doesn't, neither does invalidate or invalidateViews. Is there a property I'm overlooking or how would I go about moving the coordinates to the right place?

sample code- list items highlight correctly when clicked, rotate with dpad_center, after rotated items highlight when original position is clicked. I've tried animating the animation, animationSet, and layoutAnimationController all same result.

CODE:...............

View 1 Replies View Related

Android :: Bitmaps Loaded From Gallery Are Rotated In ImageView

Sep 5, 2010

When I load an image frome the media gallery into a Bitmap, everything works fine, except that pictures that were shot with the camera while holding the phone vertically, are rotated so that I always get a horizontal picture even though it appears vertical in the gallery. how can I load it correctly?

View 3 Replies View Related

Android :: Image Resource Aren't Rotated In Landscape

Sep 30, 2010

This one surely is a simple one but I haven't made sense of is yet. I'm working on an app in opengl es on android. everything goes well except when I load the textures. I manage to open load and create all the textures without any problem, but the image displays itself rotated of 90. it looks as if the application does not consider that its is in landscape when opening the image...I solved the problem by turning all my textures of 90 degrees but I would sure like to figure this one out Because it is the only thing that is not rotated, the top bar is rotated, the touch coordinated are rotated,
the h and w of the surface are good,

Here are some code snippets that I think are relevant:

CODE:...........

View 1 Replies View Related

Android :: Button Click Lost On Widget When Screen Rotated

Nov 22, 2010

I have a very simple widget application which consists of a linear layout with a background and an image button. In the AppWidgetProvider on Update method, I register the click of the button to broadcast an intent. When the widget first loads, everything runs fine and the click is captured. The problem occurs when the screen is rotated, and the click is never captured again even if the screen is rotated back. What do I have to do to re-register the click when the screen rotates? below is some segments of code I am using.
AppWidgetProvider
@Override
public void on Receive(Context context, Intent intent)
{super.on Receive(context, intent);
if(intent.getAction().equals("test.CLICK"))
{Closemouthed(context);}}
@Override
public void on Update(Context context, AppWidgetManager appWidgetManager,int[] appWidgetIds)final int N = appWidgetIds.length;
// Perform this loop procedure for each App Widget that belongs to this provider for (int i=0; i<N; i++) {
int appWidgetId = appWidgetIds[i]; RemoteViews views=new RemoteViews(context.getPackageName(), R.layout.widget);
Intent click intent=new Intent("test.CLICK");
Pending Intent pendingIntentClick=Pending Intent.getBroadcast(context, 0, click intent, Pending Intent.FLAG_UPDATE_CURRENT);
views.setOnClickPendingIntent(R.id.change_mode, pendingIntentClick);
SetInitialLayout(context);
appWidgetManager.updateAppWidget(appWidgetId, views);}
super.on Update(context, appWidgetManager, appWidgetIds);}
Manifest
<receiver android:name=".Widget" android:label="@string/widget_name">
<intent-filter>
<action android:name="android.appwidget.action.ACTION_APPWIDGET_CONFIGURE" />
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<action android:name="test.CLICK" />
</intent-filter>
<meta-data android:name="android.appwidget.provider" android:resource="@xml/widget_mode_switcher" />
</receiver

View 3 Replies View Related

Android :: Drawings Of View.onDraw Not Shown When Canvas Rotated

Mar 7, 2010

I have create a subclass of View and overwritten onDraw() - see some test code below. It draws a line consisting of some points. Before the line is drawn the canvas is rotated and restore after the drawing. The angle by which the canvas is rotated increases by 5 degrees every time onDraw() is called. The view is invalidated about once a second causing the view to be redrawn. Due to the rotated canvas the line drawn looks like a clock hand rotating counter-clockwise. This works - but not always. Sometimes the line is not drawn for one or more seconds, although I know from the log statement that onDraw() was called. Sometimes means: The line may be not shown after 8 seconds, then again after 35 seconds and so on. If the canvas is not rotated the problem does not occur. This also happens when I use a SurfaceView instead of a View. It does not only occur in the simulator but also on my G1 - both using Android 1.6.

CODE:.............

View 2 Replies View Related

Android :: Rotated Screens Compared To Accelerometer On Dell Streak

Sep 16, 2010

I have update our game to be able to handle devices with rotated screens (http://android-developers.blogspot.com/2010/09/one-screen- turn-deserves-another.html#links). I used a Motorola Flipout as a reference device and that one works great. The problem is that when the update with that fix came out I started to get reports that our game had stopped working for Dell Streak.

Do anyone know if there are special problems with screen rotation related to accelerometer output on Dell Streak?

And do anyone know what Dell Streak returns on the android.view.Display.getRotation() function call?

View 2 Replies View Related

Android :: Droid Widget ImageButton Loses Image When Screen Rotated / Fix It?

Apr 16, 2010

I have a widget on my home screen with several ImageButtons which have default background images. Through the configuration activity, I can change the image on any of the ImageButtons. The problem is that when the screen is rotated, the image on the ImageButton disapears and it changes back to the default image.

I don't know why this happens or how to fix it

View 1 Replies View Related

HTC Incredible :: Phone Does Not Switch To Landscape When Rotated Horizonally?

May 10, 2010

Not sure if this is a problem or if it has always been like this-I was out on Friday night and had my phone laying flat horizontally-I tried to get it into landscape mode by rotating-it wouldn't work. The only way I could get it to flip into landscape mode was to hold it vertically. Is there something wrong with my phone or am I imagining things?

View 4 Replies View Related

Motorola Droid X :: Uploading Pictures To Facebook - Rotated

Nov 16, 2010

When I upload a landscape-oriented picture to facebook, it shows up fine. However, when I upload a portrait-oriented picture to facebook, it's always sideways. Anyone else have this happening?

I just hate having to log on to the full facebook site when I'm on the go just to rotate a stupid picture. It's annoying.

I've tried rotating the picture prior to uploading, but it doesn't fix the issue. And the pictures show up right-side-up in the gallery, but once they upload it's wrong.

View 22 Replies View Related

Android :: Graphics

Feb 26, 2010

I have rectangle white box. on cliking the rectangle I will draw a toolbar beneath the box and also call relayout to accomodate the toolbar ( size+100) ( i used surfaceview and in secondary thread i draw the toolbar) on click again on rectangle box it will disappear the toolbar and also has to resize the layout to original size (ie size-100) this is where I get stuck. I can disappear the toolbar however I cant call relayout either from secondary thread (says cant call from secondary thread). So I created a while loop in onlayout( this is where i create a thread to draw the toolbar) if i call requestlayout after while loop ends it doesnt do anything it doesnt call onmeasure etc.

View 4 Replies View Related

Android :: 2d Graphics

Jan 14, 2010

I created a 2d game in java that runs as an applet, and i am now trying to translate this over to the android. As the android doesnt used paint() methods, i am thinking that i will have to import images of the game instead of drawing it, but i cannot find out how to do this. Anybody know how to add images to the folder and call them in the app? Also, how can i call a screen repaint() in the android?

View 2 Replies View Related







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