Android :: GlBufferData Crash When Try To Copy Data To Vertex Buffer
Mar 16, 2010
I have experienced some trouble using VBOs, since the method glBufferData crashes when I try to copy data to the vertex buffer. Below is the smallest snippet of code that I found to generate the crash:
int numVert = 32; GL11 gl11 = (GL11)gl; testArray = new int[numVert * 3]; testBuffer = IntBuffer.wrap(testArray); gl11.glGenBuffers(1, testID, 0); gl11.glBindBuffer(GL11.GL_ARRAY_BUFFER, testID[0]); final int siz = testBuffer.capacity() * Integer.SIZE; gl11.glBufferData(GL11.GL_ARRAY_BUFFER, siz, testBuffer, GL11.GL_STATIC_DRAW); gl11.glBindBuffer(GL11.GL_ARRAY_BUFFER, 0);
testArray, testBuffer and testID are members of the class containing this code, declared as follows:
int[] testArray; IntBuffer testBuffer; int[] testID = {0};
I tried this code in several OpenGL applications which don't show any problem otherwise. The crash occurs specifically at the glBufferData() method call. If numVert is set to zero, then the crash doesn't occur.
View 4 Replies
Aug 4, 2009
Have some tryed to pas databuffer on android by jni?
View 6 Replies
View Related
Sep 24, 2009
I am working on a packet switched network. I want to capture the audio data from mic into a buffer at a desired sample rate.How can I capture the audio data from mic into a buffer instead of a file? Also how can I control the audio capture rate as per the desired sample rate?
View 2 Replies
View Related
Apr 1, 2010
I'm using this kind of code for my TCP/IP connection:
sock = new Socket(host, port);
sock.setKeepAlive(true);
din = new DataInputStream(sock.getInputStream());
dout = new DataOutputStream(sock.getOutputStream());
Then, in separate thread I'm checking din.available() bytes to see if there are some incoming packets to read. The problem is, that if a packet bigger than 2048 bytes arrives, the din.available() returns 2048 anyway. Just like there was a 2048 internal buffer. I can't read those 2048 bytes when I know it's not the full packet my application is waiting for. If I don't read it however - it'll all stuck at 2048 bytes and never receive more. Can I enlarge the buffer size of DataInputStream somehow? Socket receive buffer is 16384 as returned by sock.getReceiveBufferSize() so it's not the socket limiting me to 2048 bytes. If there is no way to increase the DataInputStream buffer size - I guess the only way is to declare my own buffer and read everything from DataInputStream to that buffer?
View 4 Replies
View Related
Apr 14, 2010
Is it possible to copy a file located on the sdcard to a package's internal filesytem located at /data/data/packagename/files/ folder?
View 3 Replies
View Related
Nov 24, 2010
How can I get crash data (stack traces at least) from my Android application? At least when working on my own device being retrieved by cable, but ideally from any instance of my application running on the wild so that I can improve it and make it more solid.
View 7 Replies
View Related
Sep 6, 2010
My app has large vertex arrays that are pre-computed before I even build the app for distribution. I'd like to store these in assets (recognizing the size limits of asset files) and read them in with minimal computation. Can I store them in binary, and just read them into an NIO buffer, and then wrap it for GL, or do I have to go through the whole compute intensive (?) process of reading it in, making a byte array, and converting that to an integer (in this case) array?
View 5 Replies
View Related
May 18, 2010
Working through some OpenGL-ES tutorials, using the Android emulator. I've gotten up to texture mapping and am having some trouble mapping to a cube. Is it possible to map a texture to all faces of a cube that has 8 vertices and 12 triangles for the 6 faces as described below?
// Use half as we are going for a 0,0,0 centre.
width /= 2;
height /= 2;
depth /= 2;
float vertices[] = { -width, -height, depth, // 0
width, -height, depth, // 1
width, height, depth, // 2......................
View 1 Replies
View Related
Jun 11, 2010
Currently I want to develop one Activity to allow the user to see the screens/activites of all running tasks , then the user can select one of them to switch it to foreground. As I known, HTC Sence seems already to have this implementation for Home screen, to display the thumbnail of all Home panels in one screen. Does anybody know how to access screen stack in Android?
View 1 Replies
View Related
Mar 20, 2010
Has anyone turned off copy protection on their app recently? We're finding that Motorola Backflip users can't see our paid apps, so we'd like to turn off copy protection as it doesn't seem to prevent pirating. But, we're worried that existing users will lose their saved preferences. According to bug 2047, the issue was fixed in November 2009, but according to some discussions, it actually still exists. It'd be great to hear positive or negative examples from anyone who's tried this recently. We're also thinking of putting out a dummy app to test things out and will report back if we do.
View 2 Replies
View Related
Feb 20, 2010
In my app, I access my sqlite database at the following hard-coded location in my code: /data/data/ com.mydomain.appname/databases/database.db
If I turn ON copy protection in the Market Place, will my app still have access to this location?
Or will I have to change it to something like: /data-private/data/ com.mydomain.appname/databases/database.db
(or something like this)
Since I have a Dev phone only, I have no way of testing to see if my app still functions normally after turning on copy protection.
View 2 Replies
View Related
May 1, 2009
My question is how to copy a file from sdcard to /data/misc/wifi directory? I am working on a configuration tool for wiki supporting wpa enterprise. The configured file wpa_supplicant.conf must be put in / data/misc/wifi in order to work. So how can I move the file from sdcard to there? Is there any function calls to request a superuser access?
View 7 Replies
View Related
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
Aug 31, 2009
I tried to copy my wiped data from my phone, so i have to read raw data with dd command. I have root and BusyBox v1.14.2 installed, but when i type: dd if=/dev/block/mtdblock5 of=/sdcard/testfile or even just dd if=/dev/block/mtdblock5 I get: dd: /dev/block/mtdblock5: Input/output error Why can't I copy the data?
View 3 Replies
View Related
Oct 11, 2010
How do i efficiently copy a row data from one table to another table, where both of them are the same structure. i could go the much harder way of retrieving initial values from the row in the first table and then inserting to the second table. But i feel there is a more efficient way this can be done.
View 1 Replies
View Related
Aug 11, 2010
How can I copy my data from xyz.xml in my assets dir to my sqllite db during development in android platform
View 1 Replies
View Related
Apr 20, 2009
I need to run several emulator instances to test my application. When i try to run instances using emulator -data <path> option, the emulator crashes.
I got a MS Visual Studio window informing that emulator throws a "unhandled win32 exception".
The exception message in the debugger (MS Visual Studio 2008) is: "Unhandled exception at 0x77c4706c in emulator.exe: 0xC0000005: Access violation reading location 0x03216848"
The emulator runs normally without "-data" option.
View 2 Replies
View Related
Apr 12, 2014
There is an app called PPDigital, it stores DRM free PDF files in a folder
Android/data/com.lht.privateerpress/files/
On my Asus Transformer TF101
I don't see that folder using "ES File Explorer" or "file manager" or when plugging into my PC via USB. I tried rooting my tablet and still haven't had any luck.
On my Samsung Galaxy S4
I see the folder but only 2 of the dozen PDFs that are in it, sadly they are the 2 I care the least about, both via "my files" and a USB connection to my PC.
View 1 Replies
View Related
Feb 11, 2009
I have the following problem: I'd like to see the system log of two days ago and I cannot. I see only 3 last hours. How can I configure the system log size, location, severity?
View 6 Replies
View Related
Mar 21, 2009
Is it possible to generate an EGL Config with an alpha buffer on the G1? When I request a non-zero number of bits for the alpha buffer I can get a R5G5B5A1 or R8G8B8A8 visual, but neither of them renders correctly to the screen. I assume that's because the G1 only supports R5G6B5 visuals. It does surprise me that I can even get those visuals though. It's fairly obvious looking at the 32bpp visual artifacts that the frame buffer is indeed laid out with 32bpp, but display hardware is treating it as 16bpp, resulting in the left and right halves of my scene rendering in alternate scan lines, with distorted colors. So does anyone know if there is any way to get an alpha buffer on the G1? I've tried using FBO's but they don't seem to be implemented either. Or I'm using them incorrectly. If I call glGenFrameBuffersOES on a GL11ExtensionPack reference I get an UnsupportedOperationException. I am getting my GL11ExtensionPack reference by casting the return value from my EGLContext.getGL() call.
View 2 Replies
View Related
May 24, 2009
Since Google groups doesn't let you add posts to threads more than 60 days old, and I want to leave a solution to the problem I encountered a while back, I'm posting this message with the same title in hopes that anyone running into the problem I had will find this message as well. I was having trouble getting my G1 to render an RGBA_8888 OpenGL context to the screen. Everything was twice the size it should be because the 8888 pixels were being interpreted as two 565 pixels. The colors were obviously wrong as well. I had missed a critical function call. You must configure the Surface that is being used by EGL using the SurfaceHolder method setFormat. The pixel format needs to be TRANSLUCENT, or more specifically you can use RGBA_8888.
View 2 Replies
View Related
Jul 23, 2010
How can I empty the logcat buffer in Android? I use adb logcat from command line and pipe the output to a file, since the DDMS has a very limited buffer. At the moment, when I restart my app (after fixing bugs etc) the logcat buffer has data from the previous launch as well. Even uninstalling the app does not clear the buffer. The only way I've found so far to clear the buffer, is reboot. This is effective, but would like to know if there's an easier way.
View 1 Replies
View Related
Oct 5, 2010
I like to listen to internet radio stations due to the variety of music i can listen to and also due to the lack of full Flash support yet for 2.1
my 3G & HSDPA signal is excellent almost anywhere....at home, at work and on the road and out and about. i'm with T-mobile (UK) for the past 5 years and i'm very happy with their service. and the signal.
but sometimes the internet radio still buffers sometimes even with an almost excellent signal. why is this? any explanation?
View 6 Replies
View Related
Oct 19, 2010
I've pretty much fed up with the stock Youtube app on my Moto Droid, and was wondering if there are any alternate apps or fixes out there. Between it flipping a nut if I try to seek further into the video and the fact that it won't allow me to buffer the video at all is what tweaks me the most. Whats the point of trying to watch anything over 3G if I'm only gunna get 3 seconds of video followed by 3 seconds of buffering through the whole thing?
View 1 Replies
View Related
Jan 30, 2010
Is there a way to change how big the logcat buffer is? or how much is buffered back? Especially when using DDMS.
View 3 Replies
View Related
Jun 17, 2009
This may be impossible but is there any way that I can get a smaller buffer size for AudioTrack than what is provided by getMinBufferSize method?
This is how I am instantiating AudioTrack right now: SR = 44100; bufSize = AudioTrack.getMinBufferSize(SR, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT); audioTrack = new AudioTrack(AudioManager.STREAM_MUSIC, SR, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT, bufSize, AudioTrack.MODE_STREAM);
With sample rate of 44100, getMinBufferSize always returns 4800. If I try to make the buffer size smaller than 4800 then I get the following error message: E/AudioTrack( 318): Invalid buffer size: minFrameCount 1200, frameCount 600 E/AudioTrack-JNI( 318): Error initializing AudioTrack E/AudioTrack-Java( 318): [ android.media.AudioTrack ] Error code -20 when initializing AudioTrack. D/AndroidRuntime( 318): Shutting down VM W/dalvikvm( 318): threadid=3: thread exiting with uncaught exception (group=0x4000fe70) E/AndroidRuntime( 318): Uncaught handler: thread main exiting due to uncaught exception I/CheckinService( 59): From server: Intent { action=android.server.checkin.FOTA_CANCEL } E/AndroidRuntime( 318): java.lang.RuntimeException: Unable to start activity Does anyone has any ideas how to over come this problem?
View 2 Replies
View Related
Apr 29, 2010
I'm currently learning OpenGL ES programming on Android (2.1). I started with the obligatory rotating cube. It's rotating fine but I can't get the depth buffer to work. The polygons are always displayed in the order the GL commands render them. I do this during initialization of GL:
CODE:...........
On surface-change I do this:
CODE:............
When I enable backface culling then everything looks correct. But backface culling is only a speed-optimization so it should also work with only the depth buffer or not? So what is missing here?
View 2 Replies
View Related
Nov 19, 2010
I'm currently trying to create a buffer for my application which needs to be big!I mean at least 1MB but most likely to be 4MB.Now definitely bad idea to actually allocate this much on a byte array in memory.So the options are put all the data in a file. So question is where do I place this temp file?
Option 1: Store to sdcard. Might be slow and not such a good idea for continuous read/writes?
Option 2: Store to in the apps cache.I read somewhere this is fast for read/ writes. But also read before issues cleaning up the cache after use? I guess I should as if I be able to create a file in cache and discard it when I don't need it? Any tips/look outs from using this methods would be greatly appreciated!
View 7 Replies
View Related
Nov 3, 2009
How can we display a buffer on screen?
Currently I create a bitmap using Bitmap's CreateBitmap() and render it on screen using canvas' drawBitmap().
Is there any other way of doing this in Java layer?
View 8 Replies
View Related
Nov 16, 2010
Is there a method to read the frame buffer of the current screen? I searched some data about the frame buffer. Some one used the glReadPixels method, but the information was not enough. Does anyone know how to read the current frame buffer in detail?
View 4 Replies
View Related