Cannot Load 16 Bit Data In Android OpenGL ES 3.0?
Feb 18, 2014
This is the code i have implemented for loading 16 bit data:
GLES30.glTexImage2D(GLES30.GL_TEXTURE_2D, 0,
GLES30.GL_RGB16I, ImageWidth, ImageHeight, 0,
GLES30.GL_RGB_INTEGER, GLES30.GL_SHORT, pixelBuffer);
I have succesfully created Image Texture using GL_UNSIGNED BYTE with 8 bit data. But failed when using GL_SHORT using 16 bit data.
View 1 Replies
Nov 2, 2009
I'm basically using the same method of loading bitmaps in OpenGL that the SpriteMethodTest example uses and have been unable to get rid of an annoying outline that appears around all of my images.
For example, If I were to load an image of a white circle on a white background, I would expect to see nothing. Instead, I would see my circle because its edge would be gray. In SpriteMethodTest, I replaced the background image with white and was able to see that the edges of the android images flying around also don't seem to be rendered correctly.
Does anyone know how to load images in OpenGL without having a thin outline appear around the images?
View 4 Replies
View Related
Nov 24, 2010
I have written a TestSuite to find out how to calculate the rotation angles from the data you get in SensorEventListener.onSensorChanged(). I really hope you can complete my solution to help people who will have the same problems like me. Here is the code, i think you will understand it after reading it. Feel free to change it, the main idea was to implement several methods to send the orientation angles to the opengl view or any other target which would need it. method 1 to 4 are working, they are directly sending the rotationMatrix to the OpenGl view. method 6 works now too, but i have no explanation why the rotation has to be done y x z.. all other methods are not working or buggy and i hope someone knows to get them working. i think the best method would be method 5 if it would work, because it would be the easiest to understand but i'm not sure how efficient it is. the complete code isn't optimized so i recommend to not use it as it is in your project. Code...
View 1 Replies
View Related
Sep 23, 2009
I have an instance of Bitmap that I want to load into the WebView. How can I do this? I do not want to call webview.loadUrl() as the image is already loaded from the file into memory . I am trying to optimize my code. I can see webview.loadData() however, seems like I have to encode Bitmap into UTF-8?? I have two questions: 1) How can I use webview.loadData() from a Bitmap instance?
View 3 Replies
View Related
Oct 30, 2010
What's the easiest way to populate a SQLLite table with data off a URL?
I'm writing a Delphi web app that will generate a file on a server for my Android app to download.
In Delphi, I'll probably save it as a .csv file and use bulk import to import into MS SQL Server.
What's the easiest / best practice way to do this in Android? How would I download the file from the URL and then load it into SQLLite?
View 1 Replies
View Related
Mar 14, 2010
I think i'm getting senile because I was convinced that to give a name to your application, you had to fill this part of the manifest: <application android:icon="@drawable/icon" android:label="MyApplicationName"> However for a reason I don't understand, my application gets the name of my first activity, in which I load data, henceforce, It is called "Loading"...(defined as follows in the manifest) <activity android:name="AccueilSplash" android:label="Loading">
View 2 Replies
View Related
Nov 12, 2010
i am fetching XML from the web, parsing it and display it on the screen. The problem which i am getting is that the activity tries to load the data from web each time the activity is called.(Actually, my mobile app requires frequent trips to the server) So i am in search of the below solution: On Re-launch of an activity, the data from web should not be loaded again. (But it should load data from the cache or local database that we have created while calling the web-xml for the first time). creating a class that i can use to transparently make application faster by selectively caching items in memory. And thus, making users very happy and This class can even apply individual refresh times to each cached item.
So, i think i need to store the data in Cache , or in local database or something like that. Is there any way/technique to implement such thing ? so that it need not to load from web every-time on Re-launch of an activity. [Note: I want to do to make client happy by decreasing the loading time and running the application efficiently and optimizing application's loading time]
View 6 Replies
View Related
Nov 2, 2010
I want to insert some tables by default to our sqllite db .in my app i want to display different items according to different categories .and in application user also add items and new categories,for that purpose i want to add some data to db by default.How we add data to sqlite by default .Please give me some suggestions.its urgent.
View 2 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
Apr 11, 2010
I have a widget that supposed to call an Activity of the main app when the user clicks on widget body. My setup works for a single widget instance but for a second instance of the same widget the PendingIntent gets reused and as result the vital information that I'm sending as extra gets overwritten for the 1st instance. So I figured that I should pass widget ID as Intent data however as soon as I add Intent#setData I would see in the log that 2 separate Intents are appropriately fired but the Activity fails to pick it up so basically Activity will not come up and nothing happens (no error or warning ether)
View 1 Replies
View Related
Nov 15, 2010
I have set up a Button that will link to Google Checkout, however, I need to POST a whole lot of required data (not GET) so I can't use the usual Intent method.
CODE:......................
How do I post data to a URL by pressing a button and then load the result into a web browser? In this case it will be the Google Checkout webpage.
View 1 Replies
View Related
Oct 2, 2009
How to load data in expandable List Adapter through Scroll .
Means I want to add data as per Scrolling in Run time.
View 1 Replies
View Related
Nov 26, 2009
My app is made of two activities, A and B. I'm considering this sequence of steps: Activity A is started. A launches B [A is paused, B is running]. B launches a map intent [A and B are both paused now]. Now the user is using the maps application and the system decides it needs more memory. Can the system kill only one of my activities for memory, or will it always kill all activities in a "process" in this situation?
Both activities share some static data like:
class Data {
public static String mName;
public void save() {
// write to file: mName;...................
View 1 Replies
View Related
Sep 10, 2010
I would like advice from those with 2.2 on Orange. I've had my Desire for 2 months now and love it-apart from one thing-the damned Internet connection. Quite often, with a strong 3G+ (HSDPA) signal, my internet connection fails to load data. Then, a few minutes later, in the same location, it works perfectly. I know for a fact that this is not a network only problem. The reason I know this is because I previously used the exact same SIM in my iphone for 6 months in the very same locations and it always worked perfectly.
Therefore, my strong suspicion is that the problem is a result of the combination of the Orange branding on a Desire and the network itself. I'm sure I read of a couple of posters here who had the very same problems and when they moved to 2.2 the problem disappeared. Can anyone confirm? I've been waiting patiently for the Orange update to 2.2 but am getting fed up and I'm concerned that the Orange bloatware may still cause an issue after this. Hence, I'm considering a debrand and update myself.
View 3 Replies
View Related
Jul 17, 2010
Anybody else get delayed data problems, unlock phone and then signal drop's then goes up a little, hard to get a webpage to load, just something with data connection, and the phone can't stay at a reliable signal bar just keeps jumping all over the place?
View 1 Replies
View Related
Oct 22, 2010
I have been assigned the task to use an android tablet to run a single app in an enterprise setting. Ideally, when one switches on the tablet this app should be loaded perhaps during startup and the user need not step out of this app. The app logic itself is rather easy but I am wondering if it is at all possible to load a single app during load and not allowing the user to step out of it.
View 2 Replies
View Related
Sep 4, 2010
Is it possible to load a layout XML at runtime and load into activity?
In my app, I have various types of data like Person, Company, City, etc; The requirement is to dynamically load the layout, find views by tags (property names like Person.name, Person.address) and then fill in data. For example, if user has selected an object of type Company, we want to load a company.xml layout, inflate it and then associate various properties (company name, company slogan, city, address, revenue) to tagged views. One possibility I see here is - each view in the layout will be associated with property-name as tag and then appropriate data will be loaded in appropriate views.
What should be the best design you would recommend?
View 1 Replies
View Related
Mar 4, 2010
I'm making an Android Java app game (although this question applies to all languages really) and hope to release the first version soon. I'm nervous about how I save data in my game. My problem is that, if in a later update, I decide to store more data or store the same data in a different way, I need to be careful I don't lose or corrupt data for users that upgrade (i.e. I want users to be able to use data created by an old version in the new version, like their high scores from before).For example, say I want to save high scores in version 1.
View 3 Replies
View Related
Jan 27, 2009
I am working on developing a 3d game. I have loaded ms3d model in my project and all texture and everything is working fine. I m not loading any joints.But I am facing two major problems which indeed are related to one thing. 1: I have got FPS problem in my game.Its too low even on G1. 2: When I have touch event to control the game it affects the FPSmore. So plz let me know how to optimize it more because the same game with same code of opengl es is wokring at 45 FPS on Iphone So why its running slow on G1.What is opengl es benchmark for G1 ? Wat can be comparison btwn Iphone and G1 related to hardware acceleration?
View 3 Replies
View Related
Oct 11, 2009
Been working with OpenGL a little more recently, and have been noticing pretty bad performance on my G1. Were there any major changes to OpenGL in 1.6 that would change the performance (or made my code incorrect?) on device? As a test, I grabbed the SpriteMethodTest out of Apps-For-Android, and gave it a spin. I had run it a few months ago and noticed pretty decent performance. With a low number of sprites (10-100), every method (Verts, Hardware VBO's, and DrawTex) had easily over 30fps, with drawTex beating out the others. I fired it up on my G1 (recently updated to 1.6), and all 3 methods are giving me performance of around 10-12fps with all methods of OpenGL at 10 sprites. Just for fun, installed the exact same APK on my girlfriends phone, which has yet to be updated to 1.6, and hers shows what I expected to start with, 30-60fps depending on method. So the question is, did anything change in terms of OpenGL, that would make the example code in SpriteMethodTest less than optimal?
View 3 Replies
View Related
Nov 16, 2010
I want ask some questions about Opengl es 2.0?
View 3 Replies
View Related
Aug 24, 2010
What is the correct way to save images in png format, if I want to use it in my Android OpenGL ES application as texture?
View 1 Replies
View Related
Aug 19, 2009
I'm developing a new game and have been having inconsistencies between the device and emulator. The biggest one for me right now is that the elements I draw with an orthographic projection work correctly on the device, but are 1/2 the size on the emulator. I've checked and rechecked the code 100 times and I'm positive I've done it right but am confused as to why I'm seeing that result. I suppose I could go forward doing ALL testing on a device - and I may have to, seeing that the emulator's frame rate is horribly slow - but I was hoping that I could do some of the work on it at least.
View 15 Replies
View Related
Oct 25, 2010
I am currently trying to develop a game for android in OpenGL ES and I am testing it on my Nexus One. But I have run into some performance problems,and I would like to ask somebody about it,could you help?I currently have a very basic scene - background made of 25 tiles(256x256 texture each), and then a number of textured cubes(128x128 texture for each side of a cube ). However,when I try to display approx. more than 10 cubes, the performance becomes so sluggish that I can't even rotate the scene smoothly. I can't imagine how can I add more objects(player,enemies, all that kind of stuff) when it runs so slowly with 35 objects in total. I mean - games like Raging Thunder 2 probably display hundreds of objects at once(plus they do lots of computations behind the scenes) and they run super- smooth on my nexus one. What am I doing wrong? Could somebody help me please?
View 13 Replies
View Related
Aug 25, 2010
I am learning Android development, specifically to eventually do OpengL 2.0 ES on it. So far I have read that the NDK supports Opengl 2.0 ES. However, is there also a Java API for it? If there is a Java API for it, which one is recommended? I know both C++ and Java, so it is not a big deal if I have to use the NDK, but I would prefer to work only in Java if possible and without a big performance hit.
View 1 Replies
View Related
May 27, 2009
I am rendering this PNG with no transparency just fine: http://n4te.com/temp/test.png However if I try to render this PNG (with transparency) with the exact same code, I just get a white box: http://n4te.com/temp/ball.png
I am loading the PNG into a texture like this: Bitmap bitmap = BitmapFactory.decodeStream(input); int[] temp = new int[1]; gl.glGenTextures(1, temp, 0); textureID = temp[0]; gl.glBindTexture(GL10.GL_TEXTURE_2D, textureID); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_NEAREST); // GL_LINEAR for quality. gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S, GL10.GL_CLAMP_TO_EDGE); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T, GL10.GL_CLAMP_TO_EDGE); GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0); bitmap.recycle();
I am using this blending: gl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA); How is it possible to render a PNG with transparency in OpenGL ES?
View 7 Replies
View Related
Feb 23, 2010
I'm porting over some software from the iPhone, and the fact that I need to use ByteBuffers for my data structures in order to use OpenGL is killing me. My render loop takes 3ms to actually do the work and render screen, but I do need to perform a ByteBuffer clear / repopulate to update a dynamic texture. The bytebuffer clear, followed by the put() and position(0) to prepare for texture uploading takes about 100ms. This is WAY too slow. Is there a way around using ByteBuffers other than going the NDK route? The texture is 512x256 RGBA. should the ByteBuffer .clear() .put() and .position() be taking 100ms?
View 11 Replies
View Related
May 10, 2010
glReadPixels is too slow, so I need another way. Without testing object by object, Is there any other way?
View 7 Replies
View Related
Feb 5, 2010
I'm having problems with gluUnProject. I saw other discussions on this message base regarding this function and they did not solve my problem. When I use GLU.gluUnProject I get values that are close, but not quite right. I'm manually keeping track of my model matrix and I replicate the projection matrix manually. (I have also tried setting the projection matrix to identity and manually incorporating a projection matrix into my model matrix, and I ended up with the same results). I tried using the builtin GLU.gluUnProject function and I also implemented my own based on reading that source and reading the C GLU sources and both seemed to give substantially similar results. So I put together a small demo, trying to keep it as minimal as possible and still get the point across. Either this demo shows a misunderstanding I have of gluUnProject or it shows a bug in the function or opengl projections. Can someone check this over and see if I'm just doing something wrong or if there's a bug that needs to be filed? The files are here: http://www.thenewsh.com/~newsham/unproj/ In particular:
unproj.java - full source to example unproj-debug.apk - resulting apk file unproj - directory with full ant-buildable project unproj.zip - zip of directory
View 7 Replies
View Related