know the architec

by lokesh lokesh » Sun, 08 Mar 2009 10:06:50 GMT


Sponsored Links
 hi guys to know the
architec< http://architecdetail.blogspot.com/> ;
   * know the architec *

--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



Other Threads

1. Who recovers the memory of allocateDirect of java nio buffers? (A helpful note)

While programming in OpenGL on Android one will be using the native
nio buffers from the core java package. In many of the opengl samples
you will see that these native buffers are being allocated. But you
will not see that memory anywhere being "un" allocated. So a question
begs to be asked:

Who recovers the memory of allocateDirect of java nio buffers?

I did some research on the topic. Here is the summary.

The java.nio package is there to allocate memory space outside of the
java heap that can be directly used by such systems as OpenGL or file
i/o etc.

The nio buffers are actually java objects that eventually point to the
native buffer. These objects are garbage collected. When they are
garbage collected they go ahead and delete the native memory. Java
programs doesn't have to do anything special to unallocate or free the
memory.

However the "gc" won't get fired unless there is memory needed in the
java heap. This means you can run out of native memory and gc may not
realize it.

One implementation in the references below points to an approach where
an outof memory exception will trigger a "gc" and tries it again.

Importantly for the sake of simple OpenGL under ordinary circumstances
one can allocate the native buffers and not worry about releasing
explicitly as that is done by the gc.

You can read more details of the research at the following url

http://www.satyakomatineni.com/akc/display?url=DisplayNoteIMPURL&reportId=3184&ownerUserId=satya

--~--~---------~--~----~------------~-------~--~----~

2. Here is an approach to draw a regular polygon using Android OpenGL.

If you are new to OpenGL and also happen to be experimenting with
OpenGL and Android here is an article that I cooked up that explains
how to draw any regular polygon at any origin on the scene.

The design approach is simple enough: start by defining a regular
polygon with the help of a radius, number of sides and its origin.
Then calculate the vertices for each side of the polygon. Use
GL_TRIANGLES to draw multiple triangles to make up the polygon. Then
have the RegularPolygon provide these vertices and necessary indecies
as an array to the drawing class.

You can see the full article and source code at

http://www.knowledgefolders.com/akc/display?url=DisplayNoteIMPURL&reportId=3189&ownerUserId=satya

--~--~---------~--~----~------------~-------~--~----~

3. Adding a view to a viewgroup

4. Android on Meizu M8

5. beginner Help!

6. SurfaceView detaining focus

7. Connect to a SQL Database