Android :: SW - 2D API - Vs HW - OpenGL - Rendering

Apr 27, 2009

I'm trying to compare the difference in speed between software and hardware graphics rendering. I have 2 apps right now - one written with only java/android 2D APIs, and one written with openGL calls...

Android :: SW - 2D API - vs HW - openGL - rendering


Android :: OpenGL Application Rendering Using Software?

Oct 27, 2009

From the adb log of my G1's boot time, it shows "requestGPU returned -1", among other stuff. Does this mean that my OpenGL app is being rendered using software? BTW, I see the same messages on Hero as well.

------------------------------------------ log begin ------------------------------------------

I/SurfaceFlinger( 81): SurfaceFlinger is starting I/SurfaceFlinger( 81): SurfaceFlinger's main thread ready to run. Initializing graphics H/W... D/SurfaceFlinger( 81): pid 81 requesting gpu core (owner = -1) W/SurfaceFlinger( 81): couldn't grant gpu core to pid 81 D/EGL ( 81): requestGPU returned -1 E/libEGL ( 81): h/w accelerated eglGetDisplay() failed (EGL_SUCCESS) I/SurfaceFlinger( 81): EGL informations: I/SurfaceFlinger( 81): # of configs : 6 I/SurfaceFlinger( 81): vendor : Android I/SurfaceFlinger( 81): version : 1.31 Android META-EGL I/SurfaceFlinger( 81): extensions: I/SurfaceFlinger( 81): Client API: OpenGL ES I/EGLDisplaySurface( 81): using (fd=19) I/EGLDisplaySurface( 81): .......

View 2 Replies View Related

Android :: Testing OpenGL Rendering In Java Outside?

Aug 30, 2009

I would like to write OpenGL classes and test them in java outside of an Android device or emulator, and then use these in the Android.

Has anybody done this?: If so, are there JOGL implementations that are directly compatible?

I tried doing this on Windows using JOGL and writing wrappers, etc, but it turned out to be a real mess. I finally gave up when I didn't know how to get a GLU instance for a frustrum call.

View 4 Replies View Related

Android : OpenGL App - Created Rendering Class Which Implements GLSurfaceView.Renderer

Jul 16, 2009

I've created a simple OpenGL app and created a rendering class which implements GLSurfaceView.Renderer. All it does is draw 100 triangles (NUM_OBJECTS = 100) on the screen and move them about, bouncing off the edges. The projection is glOrtho2D and there is no z-buffer. I'm running this on a G1 with continuous redraw enabled.

Here is the onDrawFrame method:

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

View 23 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 :: Svg Files Rendering ?

Nov 10, 2010

I wrote a program in Android for setting different kinds of images as my background image, but it is not working with svg files. I am not getting any errors, it is not displaying any image and I'm getting a blank screen in my emulator when using svg files. Can any one suggest how to read and display svg files in Android with some code? Or should I convert xml code?

View 1 Replies View Related

Android :: What Is Rendering Lifecycle?

Sep 10, 2010

There's a decent amount of information out there on the Activity lifecycle. But I'm surprised how difficult it is to find a comprehensive description of the rendering lifecycle. By that I mean the order and rules by which a tree of nested activities, views, and drawables get to be sized and drawn to the screen, and the points at which a developer can modify rendering behavior.

View 1 Replies View Related

Android :: Measuring A View Before Rendering It

May 13, 2010

I need to find out how big a view will be after attaching it to its parent.I have overridden this method: Do you think there is a way to get this information before rendering the view itself? Basically I need to know the actually size before attaching it and not attach the view at all if it would take more certain amount of space. Code...

View 2 Replies View Related

Android :: Content Rendering For WebView

Jul 15, 2009

Can anyone help me to understand how WebView decided which content it can render and which it can't? For example I am inside a webview select a link and if the link sends an XML file I want my application to handle to data instead of WebView, Is this possible?

View 4 Replies View Related

Android :: ImageView With Drawable Not Always Rendering

Jun 22, 2010

I have an ImageView object that I'm setting the android:src="@drawable/some_xml_file" instead of a standard png and it seems to not always render the drawable, as you can see in the first row here (it also happens intermittently in other rows as well):

I've tried setting the src & the background property but they both have the same effect. the source code from my list view row item is this:

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

Then my res/drawable/action_box.xml is this:

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

View 1 Replies View Related

Android :: Video Rendering Performance ?

Apr 14, 2010

I need to render video on android. I got sw decoder which decodes stream to YUV or RGB with very reasonable cpu usage, but so far haven't found a nice way how to render frames.

I have tried 3 methods so far: 1) using opengl from native code: * create a texture of type GL_TEXTURE_2D * set coordinates to fill full opengl rendering area * to render a frame update the texture with glTexSubImage2D or glTexImage2D function (more or less the same method that is used in vlc media player)

With this method the performance is most terrible.. VGA rendering @5..7FPS uses up 100% of nexus one cpu!

2) rendering with canvas function Canvas.drawBitmap(int[] colors, int offset, int stride, int x, int y, int width, int height, boolean hasAlpha, Paint paint)Was hoping to use this via JNI. First i just made a simple perfo test: * colors array was initialized in java code * then I just called mSurfaceHolder.lockCanvas(); canvas.drawBitmap(colors, ... ); mSurfaceHolder.unlockCanvasAndPost(canvas); in sequence

Perfo is better than with opengl - VGA@30FPS uses up 40% of nexus one- s cpu...

3) Rendering with canvas function Canvas.drawBitmap(Bitmap bitmap, float left, float top, Paint paint), while updating bitmap in native code * in java code i do:

CODE:.......

To get native pointer to memory (need to link to native android library libskia.so to get these functions) * copy or decode the video frame to this memory

With this method i get only 10% cpu usage when doing VGA@30fps... but lets face it - its a hack which may break in future. Am I missing something or there really isn't any better way to render video? for example some opengl extension function etc..?

View 2 Replies View Related

Android :: Simple 2D Tile Not Rendering ?

Mar 16, 2010

I'm putting together a simple test made up of two tutorials available online for OpenGL ES on Android. This is really just so that I can learn about the basics of OpenGL ES to better understand how I have to design my program.

Right now, when it tries to render, the mouse movement effect works, but I get no square drawn on the screen.

Here are the two source files I'm dealing with:

CODE:.......

The second one is the tile object itself:

CODE:........

View 1 Replies View Related

Android : Png Image Not Rendering Correct / How To Fix?

Jun 15, 2010

When trying to process this png image, webkit displays it blurry.

View 2 Replies View Related

Android NDK - Multithreading Slowing Down Rendering?

Mar 26, 2014

I have an Android app with a C++ library which uses pthreads to break down rendering tasks. This is for devices running Android 4+.

Lets say I have a 100 x 100 array of elements into which I repetitively do CPU-intensive processing. Currently I'm breaking the array up into four 25 x 100 element chunks and handing it off to four Posix threads (from a pool of stalled, pre-created threads). This gives an almost 4x speed increase on iOS and desktop Mac but slower results than single-threading under Android.

So the same code is used successfully to speed up the app on iOS or desktop Mac but in Android it often makes it even slower. I have done some tests on it and only quite big junks of data speed up when using multi threading. If the whole process (all threads) takes around 2 seconds or more it will speed up in multi threading mode but if it is less (say only takes about 400ms) it will be either the same speed or slower than just calling the rendering function normally. Which could point to thread switching being really slow. The bigger the processing tasks, the more they profit from multithreading. My tasks are usually not as big, but not fast enough in single threading mode.

I have also noticed that on ARM builds the speed difference between slower multi threading and the faster single threading is quite significant (almost twice as fast in multi threading rather than single threading) whereas on x86 builds the multi and single threaded versions will run at about the same speed as single threading on ARM builds. So x86 builds do not get slower on multithreading but also not faster.

View 1 Replies View Related

Android :: Screen Sizes And Activity Rendering

Jul 1, 2010

I'm currently developing my first android app, and my first game. I've been developing on a netbook with a CliqXT (HVGA). Things are going well, it renders perfectly on the smaller screen. I knew I'd have some issues when rendering on larger screens, but the issues I'm having are not what I was expecting and I'm kind of stuck.

So basically the game consists of a main SurfaceView which I'm rendering the tiled game world on to. I followed this tutorial to get started, and my structure is still pretty similar except that it calculates the boundries based on the player location:

http://www.droidnova.com/create-a-scrollable-map-with-cells-part-i,654.html

The game also has various buildings the player can enter. Upon entering it launches another activity for that particular building. The building activities are just normal Views with Android UI stuff defined in XML (Buttons, TextViews, etc).

What I expected to happen:

So I expected the the building UIs to render correctly on the larger screen. I specified all dimensions in "dp" and fonts in "sp" in hopes that they'd scale correctly. I expected the actual game tilemap to render generally correctly, but maybe be really tiny due to the higher resolution / dpi. I'm using a very similar function to the tutorial linked above (calculateLoopBorders(), my version is pasted below) to calculate how many tiles to render based on screen height and width (getHeight() and getWidth()).

What is actually happening:

The whole game is just being rendered as if it's HVGA. The tilemap, and the building UIs are just scaled down to the smaller screen size, leaving black borders around the left, right, and bottom (see images).

View 2 Replies View Related

Android :: A Good Droid Rendering Engine?

Sep 9, 2010

What is a rendering engine? Is there any for Android?

View 1 Replies View Related

Android :: Rendering Scaled Bitmap With High Fps

Apr 15, 2010

I'm in the following situation: I have a large bitmap (~1280x1024) that I'd like to display on screen, scaled down in a view that fits the phone's screen (~480x320). This bitmap is frequently updated (couple of tiles per frame at 15 FPS). I first wanted to implement the rendering with a SurfaceView but figured out that all the scaling would be done in software due to limitations in the Android SDK. The second solution would be to load and render textures in an OpenGL context. Would that accelerate the resizing? If yes, isn't the cost of loading textures going to offset what I'll win on the scaling side?

View 2 Replies View Related

General :: Android UI Rendering In Real-time?

Jun 10, 2013

I was wondering why Android keeps lagging a bit. I mean, quadcore should be fast enough to stop that from happening right? So I started Googling.

I got this article: [URL] .....

Basically it says this: Android's UI rendering thread does not work in real-time (the priority is not set at that), unlike iOS'. It's just about the one thing that's still better about iOS in my opinion.

How to make this thread render in real-time?

View 1 Replies View Related

Android :: How To Compute Screen Size Before Rendering Objects?

Jun 15, 2009

I want to render 3d object on the screen. Before that I would like to compute the screen so that the rendered object can be given relative position. How that can be done?

View 2 Replies View Related

Android :: OnPageFinished Not Firing Correctly When Rendering Web Page

Sep 13, 2010

For some reason the onPageFinished is firing before the WebView has finished loading -

I can't figure out why...

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

View 3 Replies View Related

General :: Force Different Rendering Resolution In Android Apps?

Apr 14, 2013

Is it possible to force specific apps to render themselves in smaller resolution than the native (device's) one and telling the device to rescale them? I'm talking specifically about old Gameloft games that don't work on new devices anymore due to no xhdpi support.

I managed to run Modern Combat 2 on LG Nexus 4 (mako) but it has severe bugs with touch area and aiming that make the game unplayable.

I wouldn't mind playing this game in lower resolution rescaled to fit the entire screen as long as it would actually work (MC2 has smoother gameplay than any other game in the series + smaller maps = better multiplayer experience when there is not much time to play).

View 1 Replies View Related

Android :: How To Contribute To Project On Supporting - Rendering Non-English Language ?

Aug 15, 2010

I have just started with Android development and bought a handset(HTC Hero) for test and usage purposes. The sad part is that it doesn't display one of the scripts (Devanagari to be precise). Hence, I would like to contribute to the Android project to help render it. However, since I have just started I have no ideas of where to look for and begin with !

To be very precise, I would like to contribute for proper rendering of Nepali Language (Devanagari Script) for the Android OS. For ex. I would like to be able to see the following in an Android device rendered properly......................

View 2 Replies View Related

HTC EVO 4G : Google Not Rendering Properly

Jun 28, 2010

This seems to be a strange issue to have on a Google device but Google.com is not rendering properly in the default browser. I Have cleared the cache to no avail. I don't know why ShootMe only got part of the screen but you can see that there is no Google logo and everything is off to the right.

View 5 Replies View Related

General :: Widget Or Something To Toggle GPU Rendering On And Off?

Jul 17, 2012

So is there a widget for "force GPU rendering" toggling on and off cause i am tired of going into settings to toggle that and i still need to toggle that quite often?

ASUS Transformer Pad TF300T

View 1 Replies View Related

Sony Ericsson Xperia X10 :: Webbrowser Rendering - Pink Box

Jul 8, 2010

For about a month or so I bought an SonyEricsson X10 Mini. I was very satisfied with it, untill I discovered an major problem with the included webbrowser. As some webpages run smooth and well, most pages shows up as an pink box with an error message from the browser itself. The message is about the rendering of the page, and that some lines in the html-code have an error. Now most of the webpages on the web do have some minor errors, but it shouldn't prevent the browser to display the page. (for instance, browsing this forum with Internet Explorer it says in the downleft-corner "Finished, but with errors on the page", if I translate directly from Norwegian)

The box even appears at Sony Ericssons Update page for Wisepilot Navigation system. I got an message from the app, telling me to upgrade to a newer version. Clicking the upgrade-button opens the webbrowser, and this time I can only see raw HTML-code as the document. So what is it with my phone. I know more people have the same problem, as I work for an telecom-store that sells this phone here in Norway. Another customer called me, telling me about the same problem.

Does anybody know what that could be wrong with it? I have tried to Factory-reset it many times, even do the "Forced restart" method to ensure a clean start-up.

View 4 Replies View Related

General :: Google Plus - Force GPU Rendering Makes No Difference?

Oct 12, 2012

Is it just me and my device, or is the Google Plus app rubbish for everyone? Jitters and lags just when scrolling down the feed. I'm using a Samsung Galaxy S3, and the problem persists across ROMs, and enabling/disabling "Force GPU rendering" makes no difference.

GT-I9300

View 2 Replies View Related

Android :: Rendering Microsoft Surface Identity Tags In Java For Android

Mar 2, 2010

I want to write an application for Android devices that interacts with the surface and I need to be able to have the Android device display Microsoft Surface Identity Tags. I was able to create a class to draw the Byte Tags using the Byte Tag documentation but all I could find for the Identity Tags was this MSDN documentation and it doesn't include any information about how to draw them. Can anyone point me to some documentation on how to generate Identity Tags programmatically?

View 2 Replies View Related

General :: Force GPU Rendering Option Unnecessary In Jelly Bean?

Dec 20, 2013

Any specific reason for "force gpu rendering" to be enabled in the settings on most of these jellybean Roms?

I was reading that this is an old hack for ICS and under, and with jellybean this disables important CPU optimizations and is unnecessary.

View 1 Replies View Related

Android :: Rendering HTML In Android Activity Offline

Nov 1, 2010

I'm working on an RSS reader app for Android. I have it to where I snag the RSS feed and parse the messages. When the user touches a title, I pass off the contents of the post to another activity, which displays the contents of the post in a standard text layout. However, the posts come back with images that are in the form of an <img> tag, which is expected since that's what it is in the post. However, with the text layout, it of course prints out the html, which I don't want. Really, I want to render that HTML in something like a WebView.

Going to the original post in a WebView is out of the question, as the page takes too long to load on a mobile browser and is slow. How can I render my custom HTML snippet in a WebView? If WebViews don't allow that, then what other options do I have for rendering the post's HTML without parsing out all <img> (and other) tags and try to download/display them individually? I'd rather not reinvent a browser control if I can help it.

View 1 Replies View Related







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