Android :: Draw Text In OpenGL ES

Aug 27, 2009

I'm currently developing a small OpenGL game for the Android platform and I wonder if there's an easy way to render text on top of the rendered frame (like a HUD with the players score etc). The text would need to use a custom font also. I've seen an example using a View as an overlay, but I don't know if I want to do that since I might want to port the game to other platforms later.

Android :: Draw text in OpenGL ES


Android :: Draw A Bitmap - Using OpenGL

Aug 30, 2010

I have a byte array of RGB values, just like the contents(without header) of a *.bmp file. What I want to do is, draw the corresponding bitmap on Android, using OpenGL.

It seems that OpenGL ES doesn't have a single API that will do, it true?

If true, how can I do this?

Actually, I can draw it in JAVA code, but it's too slow and costs too much CPU time. So I want to try drawing it with OpenGL. Is there any other advises? Or maybe OpenGL can't be the right answer?

View 2 Replies View Related

Android :: Draw Png Image And Run Opengl

Mar 14, 2009

Is it possible to draw a png image and then to run opengl operations on it with android? Is this the right forum to ask this? where can i get more information on doing such stuff?

View 2 Replies View Related

Android :: How To Draw A Different Lines In OpenGL ES

Apr 28, 2010

How to draw different types of lines like thick line, dashed line etc using opengl android?

View 6 Replies View Related

How To Draw Sphere With OpenGL ES In Android

Sep 7, 2012

How I can draw a sphere with opengl es in android?

View 1 Replies View Related

Android :: Easiest Way To Draw Texture With OpenGL ES?

Feb 6, 2010

the draw_texture function is the fastest and VBO is 2nd faster. But I don't understand how to use it(the draw_texture method or the VBO way).

View 2 Replies View Related

Android :: Fastest Way To Draw A Lot Of Points In OpenGL ES?

Dec 26, 2009

I'm making a game for android where I need to draw a lot of points that change position every frame. I use the ndk to get faster processing performance of the math/physics section of the game, so I need to use OpenGL to get the fastest performance. Right now, I make a texture every frame out of an array that holds the colors of every pixel. I am only able to get ~10 frames per second with this method. Is there anyway I could speed this up? ...

View 2 Replies View Related

Android :: Draw Translucent Bitmaps Using Canvas Without Having To Resort To OpenGL?

Mar 17, 2010

I have a Bitmap object and want to render it to a Canvas object with varying levels of translucency (i.e. make the whole bitmap partially see through). For example, I have sprites in a game (that are drawn over the top of a bitmap background) that I want to fade out from being opaque to being invisible. Can I do this without having to resort to OpenGL?

View 2 Replies View Related

Android :: OpenGL Thread Suddenly Dead? (on Draw Frame No More Called)

Mar 22, 2010

I have a problem with a suddenly dead(?) OpenGL Thread. After an indeterminate time (30 seconds to a couple of minutes) the onDrawFrame of the Renderer simply doesn't get called anymore. I get no exception, no ForceClose, no ActivityNotResponding, no nothing! I can still open the Menu, have another Handler/Runnable-cycle logging out "Alive", etc Recently I introduced some native stuff (physics-library). But I can verify that there is no native problem, as there is obviously no native crash and after the GLThread died, I can still do like: Log.d("Before native call") nativeCall(); Log.d("After native call") Maybe anyone of you experienced something similar to this?

View 4 Replies View Related

Android :: Method To Draw Bitmaps Faster On Droid Canvas / OpenGL?

Jun 15, 2010

I currently have a game written using the Android canvas. It is completely 2D, and I draw bitmaps as sprites on the canvas, and it technically works, but I have a few features that I need to add that will require drawing many more bitmaps on the screen, and there will be a lot more movement.

The app needs more power.

What is the best way to go from this method of drawing Bitmaps on a canvas to using OpenGL so I can draw them faster?

View 2 Replies View Related

Android :: Draw Text On A Bitmap

Jun 14, 2009

Can i draw text on a bitmap? I cannot find any API support this.

View 4 Replies View Related

Android :: Draw Text On GLSurfaceView

Apr 12, 2010

how to draw text on GLSurfaceView in Android?

View 5 Replies View Related

Android :: Draw Text In Rectangle?

Aug 4, 2009

I have just started looking at developing for Google Android and want to draw a rectangle with some text in it that I then want to position where i want on screen. I have got as far as drawing a rectangle on screen using a ShapeDrawable and RectShape I now want to put some text in the rectangle. How can I best do this? Should I be looking at somehow adding a textView to the RectShape? Or am i going down the the wrong avenue completely?

View 3 Replies View Related

Android :: Draw Text On Canvas?

Oct 28, 2010

i'm trying to develop a simple pie chart class for android. For now, it can take a map of labels and values and draw the pie chart. I'm yet to add the legends for the pie, which is where i need to place the texts near small rectangles on the screen corner. Any help appreciated, since i'm new to Android dev.

View 1 Replies View Related

Android :: Draw Text Using SurfaceView?

Nov 6, 2009

I want to write a graphics app using SurfaceView.

Basically my requirement is to draw some text frequently according to some time.

Is it possible to do this? can any one please provide me some source code which draws the text using SurfaceView.

View 2 Replies View Related

Android :: Draw Text As Big As Possible Inside Rectangle?

Apr 11, 2009

Is there any convenient method to draw a string (custom true type font) as big is possible inside a supplied rectangle or to calculate the font size of a paint object based on a string and some rectangle dimensions.

View 3 Replies View Related

Android :: Using StaticLayout With Canvas To Draw Text

Feb 4, 2010

I have figured out the static layout this far, but I have no idea how to make it display my text anywhere else but in the top left corner. StaticLayout layout = new StaticLayout(text, getTextPaint(), 140, android.text.Layout.Alignment.ALIGN_CENTER,(float)1.0, (float)0.0, true); layout.draw(canvas);

View 2 Replies View Related

Android :: Draw Text With Border On MapView?

Nov 12, 2009

I'm trying to draw some text onto an MapView on Android. The drawing of the text goes fine, but it's very hard to read the text because it's white with no black border (like the rest of the text that appears naturally on MapViews to denote cities, states, and countries). I can't seem to figure how to draw the text with a black border. This is the sort of code I'm using right now (this is just example code, found in one of my overlays):

@Override
public void draw(Canvas canvas, MapView mapView, boolean shadow) {
Paint textPaint = new Paint();
textPaint.setARGB(255, 255, 255, 255);
textPaint.setTextAlign(Paint.Align.CENTER);
textPaint.setTextSize(16);
textPaint.setTypeface(Typeface.DEFAULT_BOLD);
canvas.drawText("Some Text", 100, 100, textPaint);
super.draw(canvas, mapView, shadow);}

View 3 Replies View Related

Android :: Draw Rectangle And Put Some Text Inside?

Jul 24, 2010

i have an activity and in the activity i have some buttons and textviews, and i would like to draw a rectangle with text inside. i saw some examples online but the all say to create my on view , override onDraw and the set this view as my layout, but i have my layout already.

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

TextView baramzona = (TextView) findViewById(R.id.TextView01);
baramzona.setText(R.string.baram_zona_textview);
final Button pocniparking = (Button) findViewById(R.id.ButtonStart);
final TextView momentalnazona = (TextView) findViewById(R.id.TextView02);

//momentalnazona.setText("Моментално се наоѓате во зоната");
pocniparking.setText(R.string.btn_Start_Parking);
pocniparking.setEnabled(false);
}
}

View 1 Replies View Related

Android :: Draw Arabic Text After Reading From File?

Sep 26, 2010

I've figured out how to draw Arabic characters properly (connected and right to left) using string literals like this:

textView.setTypeFace(Typeface.createFromAssets(getAssets(),"DejaVuSans.ttf"));
textView.setText("uFEB3uFE92uFE98uFE94");

But for some reason I cannot get the arabic to format properly if I read anything from a file using InputStreams like this:.....................

View 1 Replies View Related

Android :: Draw RTL Text - Arabic - Onto Bitmap And Have Ordered Properly

Sep 13, 2009

I'm trying to draw Arabic text onto a Bitmap for display:

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

However, the bitmap that is generated looks like this:

When it should look like............

I believe the issue is because, unlike a TextView, the Bitmap class is not BiDi aware, so it draws the letters from left to write.

Try as I might, I can't figure out how to draw the text in the correct order.

View 2 Replies View Related

Android :: Displaying Text As Score In OpenGL Game

Nov 16, 2009

I have a the beginnings of an Open GL game running, and have gotten to the point where it would be nice to have the FPS displayed. Since I will probably want to be able to put score or other info up anyway, I started searching for how to do that. I found the SpriteTest example, It looks nice, but really complex. Is there an easier way?

View 5 Replies View Related

Android :: Text Textures With Custom Fonts OpenGL ES

Sep 10, 2010

I'm creating an opengl es application and I would like to be able to dynamically create the text of my buttons etc.

The 2 obvious reasons for that are:

-to be modular (changing the text quickly without using photoshop)

-to be able to add languages later down the line

give me the basic steps/functions to:

create textures form text load custom fonts to display text textures with the chosen custom font indicate if I can use this for loading Kanji ?

View 2 Replies View Related

How To Draw Image Or Edit Simple Lines In Text Box

Jan 8, 2013

I am wondering if there is a way to draw an image, or edit simple lines in a text box. The entire screen is a textView/ect and i would like to be able to write a sentence then draw an image and write again. By draw i think i would use the Canvas, so basically is there a way to include a canvas in a text view?

Evernote does do this, but to edit an image/draw you need to open another app "Skitch", my goal is to try and do this without any extra apps.

For example:

Hello

(canvas/editable graphical items)

World

View 3 Replies View Related

Android :: Draw Route Path Draw Function

Sep 5, 2010

In my android application I use this method in "draw" Overlay class for draw route on map. Can someone tell me if this method is good (in terms of performance) for route draw on map or I must to put code in Thread ??
I'm new to android.

public synchronized void draw(Canvas canvas, MapView mapView, boolean shadow) {
if (pointsAndTimes.isEmpty()) {
return;
}
Projection projection = mapView.getProjection();
Paint paint = new Paint();
paint.setARGB(250, 255, 0, 0);.............

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 :: How Can Programmatically Draw Text On Key Guard Screen / Lock Screen?

Oct 31, 2010

Is there a way to draw on or modify the key guard wallpaper programmatically?It looks simple enough for the home wallpaper, you can use WallpaperManager. But how about for the lock screen wallpaper?

View 1 Replies View Related

Android :: Draw Shape Within Shape Or Draw 2 Lines Around Shape

Jun 21, 2010

I want to have a elmenent with a 2 color border outline. I can do a single color outline using the element, but this only allows me to draw a single line. I tried using 2 elements within my but that didnt work either. Is there a way to either draw a shape within a shape or draw 2 lines around my shape (which has rounded corners btw).

View 3 Replies View Related

Android :: Draw On Bitmap

Nov 11, 2010

I'm trying to figure out how to draw on a bitmap in android, and keep a copy of these changed bitmaps for an undo function.

Bitmap b = ...
Paint p = new Paint();
canvas.drawBitmap(b, new Matrix(), null);
canvas.drawCircle(0,0,20,20);
//does Bitmap b have the circle drawn on it next time?

Or how do I get the bitmap after its been drawn on with the canvas(I want to preserve a stack of bitmaps with the changes applied by canvas drawing)? Maybe I'm going about this entirely wrong.

View 1 Replies View Related







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