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
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?
View 2 Replies
View Related
Sep 25, 2010
Can anyone please recommend a training session/course for Android graphics API/OpenGL ES?
View 1 Replies
View Related
Nov 6, 2009
Or does it merely provide more options for graphics?
View 2 Replies
View Related
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
Oct 17, 2010
I'm attempting to create a 3d game using OpenGL. I have a very basic world and am now working on a character. I want to map a texture to the head which will be oval shaped. How do I do the mapping? I know how to map to flat surface. I'm wondering if the normals can be used to help but I've never done this before and when I search Google I don't have any luck. I'm planning on doing this all programmatically and not using Blender or Maya if that makes any difference.
View 1 Replies
View Related
Sep 19, 2010
Is it possible to change the default arrangement of the Android Gallery? What i meant is can we make the Gallery in a curved path, where the images will be along the curved path and the same time it has all the properties of the Android gallery(which appears to be center locked and horizontal right now..)?
View 4 Replies
View Related
Sep 16, 2010
I am trying to develop a custom gallery like application in which, i would like to place Image views along an elliptical path whose size varies with position.
View 1 Replies
View Related
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
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
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
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
May 16, 2009
I want use the methods in android.graphics to draw one board (board chess,)
View 2 Replies
View Related
Oct 27, 2010
Is there any way to add the x-graphics in the android Editbox like the of iPhone.So that by clicking on that x graphic it can clear all the values in the Editbox.Is there any way to listen weather i touch a specific part of an edit text
View 1 Replies
View Related
Sep 1, 2009
I want to do some programs using graphics can anyone send me sample programs about graphics package
View 5 Replies
View Related
Apr 26, 2009
I'd like to build an activity that is mixing layouts with 2D graphics. So for example, would like to introduce an edittext with an integer value and based on that value the size of a circle is dynamically adjusted and drawn. Any idea how to do this?
For plain graphics I am using this approach here - but how can it be expanded to cover Android layouts (buttons, editboxes, textviews, radiobuttons, etc.)?
CODE:..............
View 2 Replies
View Related
Aug 2, 2010
1. What size should graphics intended to promote your app in the Market be designed for?
2. What about the larger graphics that depict screenshots of the app in the Market?
3. What size should app icons for devices be?
View 2 Replies
View Related
Feb 2, 2010
I have doubts while doing some 2D Graphics and animation. Here is what i have done and what i want to do further: An application starts with a 2D object [ball] rotating and execising in a particular fashion, and after a particular point in time the object [ball] scrolls out of vision. After this point i want to invoke a new activity with a different UI. I m stuck up while trying to transit from this View to a new activity.
View 3 Replies
View Related
Aug 21, 2009
How can I know the length of the each character of word. Actually, I am trying some thing like this:I will show some set of lines on the screen. Later after some time, I would like to set the color to each character in the line at a frequent interval. Now I want to set the color to each and every character of the drawn string.
View 2 Replies
View Related
Sep 2, 2009
In my application, I will get a instance of android.graphics.picture which is populated by user. Then I use writeToStream to save. After save, I have to check the file size. If the size is too large, then I should delete this file.
I think this save-check-delete operation is not reasonable. I prefer to check the size of android.graphics.picture. If the size is too large, I should not save to local. But I checked android.graphics.picture, it only have getHeight and getWidth member functions.
Could I get the size of android.graphics.picture?
View 2 Replies
View Related
Dec 13, 2009
I have some transparent graphics in my game. Up through 2.0.0 they have looked fined. Since Android 2.0.1 though, some parts of the fully transparent regions of the graphics are instead slightly opaque (e.g. a circular gradient that goes to 100% transparency will have a faint halo around it).
I have tried putting my graphics in ../raw/ but that did not help (as described at http://developer.android.com/guide/topics/graphics/2d-graphics.html#d...)
I have also tried exporting the Adobe Illustrator graphics at 16-bit pngs (instead of 8bit), but that did not help either.
View 2 Replies
View Related
Oct 13, 2009
I have much experience with Java, and am quickly getting to grips with Android. But I have very little experience with graphics... most of my work has been logical, back end web development. The last time I did any proper screen drawing was in the good old days of Applets (years ago).
I can see that Android has a very complex graphical interface, but I don't know where to start. I've looked at some of the sample apps that come with the SDK, but it's slow progress.
For example, I'm trying to learn by developing a simple rolling ball. Currently I'm using onDraw(Canvas canvas), a paint object, and path.addCircle() to draw a circle, which I then update frequently. However the result is jerky, and slow - I want to see it flying around the screen! Clearly this isn't the right way to go about it.
So two questions I suppose: 1) What graphics tools would you recommend to implement my example? 2) Where can I learn more about the graphics capabilities of android?
View 3 Replies
View Related
Jun 12, 2009
When you turn on the phone, after the G1 screen, there's a black screen with the word Android in blue, and a glossy shine running across it. Can you tell me how imitate that effect? Maybe point me in the right direction, like what classes to look at?
View 2 Replies
View Related
Jun 26, 2009
Does the current API support scalable vector graphics? If so which file formats? If not, will it be added in the future? I ask because I'd like my animations to based off of SVGs - in order to better support different screen resolutions while reducing file size.
View 2 Replies
View Related
May 10, 2010
I've been working on an Android app in Eclipse, and so far, my program hasn't really grown past midget size. However I've already run into an issue with an Out of Memory error. You see, I've been using graphics comprised solely of bitmaps and PNGs in this program, and recently, when I tried to add a little bit more functionality to the program (mainly including a few more bitmaps and causing an extra sprite to be created), it started crashing in the graphics thread's constructor -> sprite's constructor. When I tracked the problem down, it turned out to be an Out of Memory error that is seemingly caused by adding too many picture files to the program and creating Drawables out of them.
This would be a problem, as I really don't have that many picture resources worked into that program...maybe 20 or so. I haven't even started to include sound yet. These images aren't all that fancy. My questions are this:
1) Are programs for the Android phone really that limited on how much memory they can employ, or is it probably something other than the 20-30 resource pictures causing that error?
2) If the memory for Android apps is so awful it can't even handle 20-30 picture resources being loaded into Drawables that exist at the same time, then how in the world are you supposed to make decent graphics and sound for that thing?
View 4 Replies
View Related
Dec 31, 2009
How can I minimize the stuttering of my graphics?I am using MANY ImageView's in my program (and JUST ImageView's). I change their positions directly, when I need to change them without using "onDraw" to redraw everything. Is it ok, If I do not overwrite onDraw? I have in average 10 objects which I added to the mainscreen-layout.These 10 objects are 5 trees and 5 flowers. The trees and flowers have 5 different states and therefore 5 different ImageViews which I all added to the layout, whose just are invisible. So I have about 50 ImageViews added to my main screen When one of these objects changes its state, I just make its ImageView invisible and the ImageView of the new state visible.Is it ok to do it like that?I realized that if I just use one ImageView for every object and change the ressource of it when its state changes, all objects, which are currently added to the mainscreen-layout, change their position to (0;0). That was the reason, I have so many ImageView's added to the mainscreen-layout.Is there a better solution for that?
View 4 Replies
View Related
Sep 10, 2010
I see a couple of threads on this topic, but none of them seem to answer the question, so, I'm giving it another go...
Very simple idea... I want to some portion of the screen to preview (and shoot) the camera and the other portions of the screen to add my own graphical elements (buttons, colorful frame around the camera preview, etc).
The example that comes with Android fills the screen. The obvious solution (that doesn't seem to be working) is to use my own SurfaceView (rather than the one they do in the example) and have it sitting in my XML. The code (beneath) doesn't crash and reports that it's firing up the camera... it just never renders on the screen.
I have no idea what I'm doing incorrectly. My guess is that it has something to do with the display thread never having the urge to redraw anything after it renders the initial screen, but I even tried adding a button and initiating the camera to render on the surface view upon button click, but that has not provoked it any further.
(most of this code is pulled directly out of the Android sample code, so, I'm sure it's correct. I'm just doing something wrong in how I pull my View in after the fact, I think).
CODE:........................
View 1 Replies
View Related
Aug 27, 2010
I'm wanting to target WVGA (480x800) and FWVGA (480x854) devices with my program. My question is: for my full screen background bitmaps which resolution should I make them?
View 3 Replies
View Related
Oct 13, 2010
I'm looking for some help optimizing some bitmap drawing code.
Here's my pseudo-code ...
View 5 Replies
View Related
Sep 17, 2010
HI took a look at the home screen widget design recently and I tried to deploy a simple widget with 4x1 portrait background provided in Widget.I tried it in HVGA emulator (screen size 320x480 or something) and on Nexus One (screen size 480x800) and the widget seems to be the same size with respect to other UI elements (search widget etc) on both devices. How is that possible when one screen is 320px wide and the other one is 480px? Is the graphics in png format being automatically resized somehow based on screen width? If so, is it better to create the home screen widget graphics to make it perfectly fit to HVGA screen with 320px or is it better to create the graphics to fit the largest screen width possible so it would shrink itself on smaller screens (based on assumption shrinking an image is always better than magnifying it)?
View 2 Replies
View Related