Android :: In Opengl - Relation Between Pixels And Gl.gltranslatef - Floatx,y,z?

Sep 25, 2010

I am trying to learn opengl stuff on Android. In the gl.gltranslatef(x,y,z) call, I am shifting my texture by some units in the +ve x direction. But I am unable to find the number of pixels does 1 unit of x belong to?

Here is what I am doing:
I call gl.glviewport(0,0,width,height); // This will set my rectangle with 0,0 as lowerleft corner and then extend it to accommodate width and height.

Then
I call to gl.glfrustrum(-5,5,-7,7,3,7); // I am little confused how this call is using the dimensions I set in gl.glviewport.

How will -5 to 5 units from left to right in the above call, translate to pixels on the screen of android?

I mean if width = 320 and height = 533 pixels, then what will be the number of pixels occupied on the screen due to the gl.glfrustrum call?

I am experimenting in the gl.gltranslatef call by specifying xshift as 5.0, but it does not translate the bitmap at the right or left corner of the screen, when I increase it to 6, part of it is still visible on the screen.

I am searching for the maximum number of units (in terms of X) which will represent extreme corners of my android phone screen.

Android :: In opengl - relation between pixels and gl.gltranslatef - floatx,y,z?


Android :: Relationship Between Pixels And Scaled Pixels?

Jan 4, 2010

I used the layout editor in eclipse to mock up my ui layout and then I created the code to populate it dynamically and things are showing up as different sizes. The XML I use to add the star images looks like this:

<ImageView
android:src="@drawable/star_gold"
android:layout_height="22sp"
android:layout_width="22sp"
android:adjustViewBounds="true"
android:layout_marginLeft="2sp"
android:layout_marginRight="2sp" />...............

View 4 Replies View Related

Android :: Relation Between MediaRecorder And AudioRecord?

Apr 1, 2010

the location where the audioflinger, surfaceflinger and cameraservice talk to MediaRecorder's APIs? Is there any relation between MediaRecorder and AudioRecord?

View 6 Replies View Related

Android :: Service Binding Relation

Apr 30, 2010

Can one service be bound to n activities?

View 1 Replies View Related

Android :: Res And Src Folder Relation In Eclipse

Jun 3, 2010

What is the importance of "res" and "src" folders in eclipse-android while creating android project.

View 2 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 :: Preference Activity And AppWidgetId Relation

Jul 4, 2010

i'm using PreferenceActivity class to configure my widget. PreferenceActivity class automatically saves user preferences, so in widget update service i can call context.getSharedPreferences() and i obtain user preferences.Problem is follow: if you have many widget of same type, how PreferenceActivity class saves prefs? how i can load appWidgetId specific prefs from sharedPreferences?

View 7 Replies View Related

Android :: Application Relation To Data Usage

May 30, 2010

This is my first post and Its for sure not going to be my last

I was just wondering a few things

1. I'm getting the Nexus One and putting the SIM Card from my other Rogers phone into it... will there be any problems/pitfalls i should look out for?

2. As far as applications go, if I don't have a data plan, will i be paying out the rear end to use apps such as facebook, last.fm etc?

3. Is there an app that lets you text/call for free?

4. Do you have to have a data plan to download apps when not in range of WiFi (if so how much does it cost to browse the store and download an app?)

5. Does it cost anything to use the GPS (Do you need a GPS plan?)

6. Is there an app that lets you track Text messaging usage, call time, data usage etc?

View 1 Replies View Related

Android :: Detailed Relation Between Contacts And Raw_contacts?

Mar 8, 2010

Any one can help interpret the relation between the table "contacts" and "raw_contacts"?Is it one-to-one or one-to-many relation?I am puzzled because the SDK seems indicate it is one-to-many relation but after I checkout all data from the database table,I found it is one-to-one relation. And is there any detailed relation diagram describing android database tables?

View 8 Replies View Related

Android :: Apps In Relation To Different Screen Sizes - Resolutions

Jun 1, 2010

I am a current iPhone 3gs user migrating over to Android this Friday and getting the Evo 4g. Now, all iPhone/iPod touch screen sizes are the same and all the hardware specs are the same for the most part, but with Android you all kinds of resolutions, screen sizes, processors, etc etc...

Are all apps made for Android stretched to accomodate bigger screen sizes? For instance, I have played with my friend's Droid on Verizon and the screen is 3.7" at a resolution of 854x480 and he has showed me games on it like Gameloft's NOVA which is a full 3D first person shooter. So his phone essentially has a bigger resolution slightly than the HTC EVO 4G but smaller screen size (3.7" vs. 4.3"). So would the same game be stretched to fit my phone?

I'm wondering with different apps, are there any conflicts in relation to different spec phones?

View 3 Replies View Related

HTC Hero :: Relation To Slugs Sticky?

Aug 4, 2010

Im on 3 and as of yet there is no update to 2.1 so im on 1.5 ..now this maybe the most stupid question ever but in the sticky slug posted it says coustom ROM'S and all of them are 2.1 does that mean i have to have 2.1 update to be able to use one of these ROM'S, if not what are your recommendations for a custom ROM ie what one from the list is best and why . what will they do/ what do they do , will it improve this already good phone and in which ways , also if i am able to put one onto the phone how do i do it.

View 10 Replies View Related

Android :: Google Checkout - Manage Customer Relation - Checkout Also Putting Multiple Holds On Txns

Feb 20, 2009

I know there is a Google Checkout API, but that seems it is more for creating a shopping cart, and interfacing payment methods w/ Google Checkout. Is there any management tool that allows one to 'easily' communicate with the customers? Automate a thank you message, or something?

In addition we have already had one customer call to say he had multiple $1.00 charges for our $0.99 app.

I purchased our $0.99 app and sure enough, I have the following holds on my account 02/20/2009 5399 GOOGLE $1.00 02/20/2009 5399 GOOGLE $1.00 02/20/2009 5399 GOOGLE $0.99

This does not seem right, especially if someone is buying more expensive applications, or using a one time use card.

View 4 Replies View Related

Android :: Screen Size In Pixels

Aug 21, 2010

What is the max x, y size of a Android screen in pixels? Is there a standard set by the OS or does it mostly just depend upon the phone hardware.

View 1 Replies View Related

Android :: High Resolution (pixels) Devices

Sep 7, 2010

I want to publish an application that specifically runs only on 800x480 or higher screens. I don't want users with 480x320, 320x240 etc devices to get it from Android Market. How do I configure it? Market Filters seems to have the answer but I still don't get it.

View 4 Replies View Related

Android :: Scrolling ListView Manually By Pixels

Jul 14, 2010

I want to make use of the trackball or d-pad to scroll my ListView smoothly. Without implementing anything, by default the list scrolls by one item, which is not appropriate for my app, since list items have different heights and I just want to scroll it by a fixed amount.

Is there anything to call to let's say, emulate a 10 pixel drag down?

View 3 Replies View Related

Android : Using Bitmap Data To Copy Pixels To A New One

Jan 29, 2010

In ActionScript development, there are two classes, Bitmap, and BitmapData. Bitmap uses information from BitmapData to create a Bitmap. Is there an equivalent to BitmapData in the android API? I did some digging and BitmapFactory seems to be the closest, however, I'm facing problems with it.

I tried Bitmap bitmap = BitmapFactory.decode Resource(getResources(), R.drawable.buster);

As that was what I was seeing in most of the examples I came across, but it is telling me that the method getResources is undefined. I'm not really sure what is causing this as in another tutorial I did, getResources didn't cause any problems.

I'm not looking to simply draw a bitmap to the screen, I want to copy a section of the bitmap and place it on a new bitmap. In ActionScript, the method is bitmapData.copyPixels(), and I'm looking for a similar method in the Android API. The closest thing I could find was copyPixelsToBuffer(), but I'm not really sure if that does what I think it does.

View 2 Replies View Related

Android : Make Certain Pixels Of An DrawableBitmap Transparent?

Jan 4, 2010

How can I make certain pixels of an DrawableBitmap transparent?

View 3 Replies View Related

Android :: Use Device Independent Pixels Dip And Sip In Droid?

Nov 20, 2010

Cn anyone suggest me how to use device independent pixels(dip),sip and convert px to dip with a sample code..

View 1 Replies View Related

Android :: Get Screen Resolution / Pixels As Integer Values

May 25, 2010

How can I quickly access the screen resolution (width, height) as integer values? I've tried this one, but it always shows zero on my emulator:

DisplayMetrics dm = new DisplayMetrics();
int width = dm.widthPixels / 2;

In my case I want to dynamically create a table with tableRows, each containing two cols. This cols all shall fill half of the screen in width.

View 1 Replies View Related

Android :: Make Whiteboard App (some Pixels Black And Let Others White)?

Aug 31, 2010

I want to make a Whiteboard app, but i don't know how to make only some pixels black and let the others white.

View 2 Replies View Related

Android :: Image Transparency - Section Which You Could Measure In Pixels?

Oct 17, 2009

Anyone know if you can make part (i.e. a section which you could measure in pixels) of an image transparent? What graphics features would I need to look at?

View 4 Replies View Related

Android :: Animate Scroll Of Mapview (by Pixels, Not Lat Long)?

Nov 17, 2010

I need to scroll a MapView programatically to make sure something is in view. I know how many pixels it needs to scroll in each direction. I see methods (in MapController) to animate it to a particular GeoPoint, and to scroll it by pixels without animation. But nothing to do it by pixels, with an animation.

What is an easy way to do this?

View 1 Replies View Related

Android :: Make Application's Canvas In Terms Of Pixels?

Mar 13, 2010

I've determined an estimate of the size of my Android emulator's screen in pixels, although I think its resolution can be changed to other numbers. Quite frankly though that doesn't eliminate the general problem of not knowing how many pixels on each axis I have to work with on my Android applications in general.The main problem I'm trying to solve is this: How do I make sure I don't use a faulty resolution on Android applications if I want to keep things' sizes constant (so that if the application screen shrinks, for instances, objects will still show up just as big - there just won't be as many of them being shown) if I wish to do this with a single universal resolution for each program? Failing that, how do I make sure everything's alright if I try to do everything the same way with maybe a few different pre-set resolutions?

Mainly it seems like a relevant question that must be answered before I can come across a complete answer for the general problem is how big can I always make my application in pixels, NOT regarding if and when a user resizes the application's screen to something smaller than the maximum size permitted by the phone and its operating system.I really want to try to keep this simple. If I were doing this for a modern desktop, for instance, I know that if I design the application with a 800x600 canvas, the user can still shrink the application to the point they're not doing themselves any favors, but at least I can basically count on it working right and not being too big for the monitor or something. Is there such a magic resolution for Android, assuming that I'm designing for API levels 3+ (Android 1.5+)?

View 1 Replies View Related

Android :: Simplest Way To Draw Pixels Lines / Circles On A View?

Aug 14, 2010

What is the simplest way to draw pixels, lines and circles on a View?I want to move a cross cursor around, so nothing particularly intensive.I thought I could extend SurfaceView and add it to an XML and it would just work, but it just appears black, however, when I look at the layout view of localmap.xml in eclipse, the graphics appear as expected. Any ideas? My onDraw is never called on the emulator, and even calling invalidate on the class makes no difference. I shall keep trying but can anyone see anything I've missed? or is there a better way entirely? Code...

View 1 Replies View Related

Android :: Default Measuring Units Pixels / Density Independent

Aug 13, 2009

in xml file we can define measuring units along with the values. If I want to set some property through code it only takes "int" value. What is the default unit for this int? px(pixels) or dp(density independent pixels) ?

View 7 Replies View Related

Android : Keep Transparent Pixels Intact While Applying A Color Filter?

Feb 7, 2009

I'm trying to make an image darker, but the image has some pixels transparent. I want to keep those pixels intact. I tried DARKEN and couple other filters, but they seem to alter transparent pixels as well.

Do you know if there is a way to keep transparent pixels intact while applying a color filter?

View 6 Replies View Related

Android :: Use DrawBitmap With Display Independent Pixels On Droid / Need Suitable Alternative

Nov 10, 2010

Can I use DrawBitmap with display independent pixels on android?

If not, is there a suitable alternative?

View 1 Replies View Related

HTC Incredible :: Line Of Pixels On Screen

Jun 16, 2010

I got my incredible yesterday, it's all going well, except that I noticed this line of pixels, not really any color in particular, but when you move the phone and look closely, they are very slightly distorted, and it makes them stick out slightly. I've noticed this problem on TVs before but I never understood it. I'm thinking it may be the invisible shield I had the person at the store install for me? I'm hoping it's not the screen...but here's a picture. I understand it may be hard to see, but if you move away from the picture you can sort of see what I'm talking about.

View 1 Replies View Related

HTC Droid Eris : Dust And Dead Pixels

Dec 24, 2009

I have had my Eris for about three weeks now and noticed three dead pixels at the top where the signal is meter is. They are pretty much hidden all the time unless the phone is on a black screen. I've also noticed a few dust particles sitting in the lower right hand corner of the screen. Anyone else getting dead pixels or dust under their screen? Small issues, but irritating knowing they're there.

Will Verizon swap it out for a new handset? When i first upgraded I got the Motorola droid, but returned it for the eris. Will that be an issue if they swap out the phone, as I've already exchanged it once?

View 13 Replies View Related







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