Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - ScienceHill

Pages: [1]
Support / Will serialization decrease the faces of a .obj file?
« on: December 13, 2017, 11:14:36 pm »
Hello. Suppose I have an .obj file which has 10,000 faces (polygons). After I serialized it with the jPCT-AE Mesh Serializer at here: , I got a .ser file. And I can render it on my Android phone. I just wonder whether the number of faces of this .ser file is also 10,000? In other words, will the number of faces of the .obj model decrease after serialization? Thanks in advance.

Support / How can I get a bitmap from fb.getpixel()?
« on: November 29, 2017, 06:41:28 am »
Hello. Currently I am trying to take a screenshot use fb.getpixel() function. And here is my code:
int[] my_pixels = fb.getPixels();
Bitmap bitmap = Bitmap.createBitmap(fb.getWidth(), fb.getHeight(), Bitmap.Config.ARGB_4444);
But I just got a black image. And I also tried this:
int[] tmpPixels = fb.getPixels();
for (int i = 0; i < tmpPixels.length; i++){
   int tmpInt = ((tmpPixels & 0xf8) >> 3);
   tmpInt += ((tmpPixels & 0xfc00) >> 5);
   tmpInt += ((tmpPixels & 0xf80000) >> 11);
  tmpPixels = tmpInt;
Bitmap lastImage = Bitmap.createBitmap(tmpPixels, fb.getWidth(), fb.getHeight(), Bitmap.Config.RGB_565);
But it still did not work. I know that the fb.getPixels() function return an int array. And it contains R, G and B channels value. But how can I actually use it? Any answer is appreciated and thanks in advance.

Pages: [1]