Author Topic: Overlay with NVidia Tegra II GPU  (Read 4360 times)

Offline hayden621

  • byte
  • *
  • Posts: 20
    • View Profile
Overlay with NVidia Tegra II GPU
« on: January 13, 2012, 05:23:38 am »
Hi all,

I used the Overlay class for some UI in my application. It works fine with most GPU until testing with Samsung GT-I9103(new Samsung Galaxy S II), the overlay becomes black in color. Is there anything I can do with it?

Many thanks in advance.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Overlay with NVidia Tegra II GPU
« Reply #1 on: January 13, 2012, 06:39:32 am »
Are you using OpenGL ES 2.0? If, check if your textures used for the overlay are square (like 512*512...not 256*512 for example). If you aren't using 2.0, check it anyway and if they aren't, make them square and see if that helps.

Offline hayden621

  • byte
  • *
  • Posts: 20
    • View Profile
Re: Overlay with NVidia Tegra II GPU
« Reply #2 on: January 13, 2012, 09:02:01 am »
Thanks for your reply, but those images are already in 128*128

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Overlay with NVidia Tegra II GPU
« Reply #3 on: January 13, 2012, 09:10:20 am »
Again...which OpenGL version are you using?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Overlay with NVidia Tegra II GPU
« Reply #4 on: January 13, 2012, 10:18:22 am »
Also posting the complete log may help.

Offline hayden621

  • byte
  • *
  • Posts: 20
    • View Profile
Re: Overlay with NVidia Tegra II GPU
« Reply #5 on: January 13, 2012, 12:40:04 pm »
Hi there,

We are using 1.1 and the log is as below:

Code: [Select]
01-13 19:37:10.390: I/jPCT-AE(9979): onResume
01-13 19:37:10.430: I/jPCT-AE(9979): OpenGL vendor:     NVIDIA Corporation
01-13 19:37:10.430: I/jPCT-AE(9979): OpenGL renderer:   NVIDIA AP
01-13 19:37:10.430: I/jPCT-AE(9979): OpenGL version:    OpenGL ES-CM 1.1
01-13 19:37:10.430: I/jPCT-AE(9979): OpenGL renderer initialized (using 2 texture stages)
01-13 19:37:11.860: I/jPCT-AE(9979): Visibility lists disposed!
01-13 19:37:11.860: I/jPCT-AE(9979): All texture data unloaded from gpu!
01-13 19:37:11.860: I/jPCT-AE(9979): Renderer disposed!
01-13 19:37:11.860: I/jPCT-AE(9979): Static references cleared...
01-13 19:37:11.860: I/jPCT-AE(9979): OpenGL vendor:     NVIDIA Corporation
01-13 19:37:11.860: I/jPCT-AE(9979): OpenGL renderer:   NVIDIA AP
01-13 19:37:11.860: I/jPCT-AE(9979): OpenGL version:    OpenGL ES-CM 1.1
01-13 19:37:11.860: I/jPCT-AE(9979): OpenGL renderer initialized (using 2 texture stages)
01-13 19:37:12.720: I/jPCT-AE(9979): onPause
01-13 19:37:12.760: I/jPCT-AE(9979): Visibility lists disposed!
01-13 19:37:12.760: I/jPCT-AE(9979): All texture data unloaded from gpu!
01-13 19:37:12.760: I/jPCT-AE(9979): Renderer disposed!
01-13 19:37:12.760: I/jPCT-AE(9979): Static references cleared...
01-13 19:37:12.760: I/jPCT-AE(9979): Static references cleared...
01-13 19:37:12.860: I/jPCT-AE(9979): Loading Texture...
01-13 19:37:12.870: I/jPCT-AE(9979): Loading Texture...
01-13 19:37:12.920: I/jPCT-AE(9979): Visibility lists disposed!
01-13 19:37:12.920: I/jPCT-AE(9979): Static references cleared...
01-13 19:37:12.920: I/jPCT-AE(9979): Visibility lists disposed!
01-13 19:37:12.920: I/jPCT-AE(9979): Static references cleared...
01-13 19:37:12.920: I/jPCT-AE(9979): Visibility lists disposed!
01-13 19:37:12.920: I/jPCT-AE(9979): Static references cleared...
01-13 19:37:12.960: I/jPCT-AE(9979): Loading Texture...
01-13 19:37:13.750: I/jPCT-AE(9979): Adding Lightsource: 0
01-13 19:37:13.750: I/jPCT-AE(9979): Adding Lightsource: 0
01-13 19:37:13.750: I/jPCT-AE(9979): OpenGL vendor:     NVIDIA Corporation
01-13 19:37:13.750: I/jPCT-AE(9979): OpenGL renderer:   NVIDIA AP
01-13 19:37:13.750: I/jPCT-AE(9979): OpenGL version:    OpenGL ES-CM 1.1
01-13 19:37:13.750: I/jPCT-AE(9979): OpenGL renderer initialized (using 2 texture stages)
01-13 19:37:13.750: I/jPCT-AE(9979): [ 1326454633757 ] - WARNING: No normals have been calculated for this mesh yet!
01-13 19:37:13.750: I/jPCT-AE(9979): [ 1326454633759 ] - WARNING: No normals have been calculated for this mesh yet!
01-13 19:37:13.750: I/jPCT-AE(9979): Memory usage before compacting: 6207 KB used out of 14663 KB
01-13 19:37:13.980: I/jPCT-AE(9979): Memory usage after compacting: 6066 KB used out of 14663 KB
01-13 19:37:13.980: I/jPCT-AE(9979): Saving MyRenderer!
01-13 19:37:13.990: I/jPCT-AE(9979): Remapping 4 vertex indices!
01-13 19:37:13.990: I/jPCT-AE(9979): Creating vertex cache (96 bytes)!
01-13 19:37:13.990: I/jPCT-AE(9979): Vertex indices will be accessed directly!
01-13 19:37:13.990: I/jPCT-AE(9979): Subobject of object 91/__overlay plane 14__ compiled to indexed fixed point data using 6 vertices in 5ms!
01-13 19:37:13.990: I/jPCT-AE(9979): Object 91/__overlay plane 14__ compiled to 1 subobjects in 6ms!
01-13 19:37:13.990: I/jPCT-AE(9979): Remapping 4 vertex indices!
01-13 19:37:13.990: I/jPCT-AE(9979): Creating vertex cache (96 bytes)!
01-13 19:37:13.990: I/jPCT-AE(9979): Vertex indices will be accessed directly!
01-13 19:37:13.990: I/jPCT-AE(9979): Subobject of object 92/__overlay plane 15__ compiled to indexed fixed point data using 6 vertices in 3ms!
01-13 19:37:13.990: I/jPCT-AE(9979): Object 92/__overlay plane 15__ compiled to 1 subobjects in 5ms!
01-13 19:37:14.090: I/jPCT-AE(9979): 0fps
01-13 19:37:15.100: I/jPCT-AE(9979): 42fps
01-13 19:37:15.990: I/jPCT-AE(9979): Static references cleared...
01-13 19:37:16.090: I/jPCT-AE(9979): Loading Texture...
01-13 19:37:16.120: I/jPCT-AE(9979): 41fps
01-13 19:37:16.150: I/jPCT-AE(9979): Loading Texture...
01-13 19:37:16.150: I/jPCT-AE(9979): Loading Texture...
01-13 19:37:16.200: I/jPCT-AE(9979): Loading Texture...
01-13 19:37:16.310: I/jPCT-AE(9979): Loading Texture...
01-13 19:37:16.360: I/jPCT-AE(9979): Loading Texture...
01-13 19:37:16.360: I/jPCT-AE(9979): Loading Texture...
01-13 19:37:16.420: I/jPCT-AE(9979): Loading Texture...
01-13 19:37:16.420: I/jPCT-AE(9979): Loading Texture...
01-13 19:37:16.570: I/jPCT-AE(9979): Loading Texture...
01-13 19:37:16.630: I/jPCT-AE(9979): Remapping 6 vertex indices!
01-13 19:37:16.630: I/jPCT-AE(9979): Creating vertex cache (144 bytes)!
01-13 19:37:16.630: I/jPCT-AE(9979): Vertex indices will be mapped!
01-13 19:37:16.630: I/jPCT-AE(9979): Subobject of object 96/object98 compiled to indexed fixed point data using 12 vertices in 2ms!
01-13 19:37:16.630: I/jPCT-AE(9979): Object 96/object98 compiled to 1 subobjects in 3ms!
01-13 19:37:16.640: I/jPCT-AE(9979): Remapping 6 vertex indices!
01-13 19:37:16.640: I/jPCT-AE(9979): Creating vertex cache (144 bytes)!
01-13 19:37:16.640: I/jPCT-AE(9979): Vertex indices will be mapped!
01-13 19:37:16.640: I/jPCT-AE(9979): Subobject of object 99/object101 compiled to indexed fixed point data using 12 vertices in 1ms!
01-13 19:37:16.640: I/jPCT-AE(9979): Object 99/object101 compiled to 1 subobjects in 3ms!
01-13 19:37:16.640: I/jPCT-AE(9979): Remapping 6 vertex indices!
01-13 19:37:16.640: I/jPCT-AE(9979): Creating vertex cache (144 bytes)!
01-13 19:37:16.640: I/jPCT-AE(9979): Vertex indices will be mapped!
01-13 19:37:16.640: I/jPCT-AE(9979): Subobject of object 102/object104 compiled to indexed fixed point data using 12 vertices in 2ms!
01-13 19:37:16.640: I/jPCT-AE(9979): Object 102/object104 compiled to 1 subobjects in 3ms!
01-13 19:37:16.640: I/jPCT-AE(9979): Remapping 6 vertex indices!
01-13 19:37:16.640: I/jPCT-AE(9979): Creating vertex cache (144 bytes)!
01-13 19:37:16.640: I/jPCT-AE(9979): Vertex indices will be mapped!
01-13 19:37:16.640: I/jPCT-AE(9979): Subobject of object 105/object107 compiled to indexed fixed point data using 12 vertices in 1ms!
01-13 19:37:16.640: I/jPCT-AE(9979): Object 105/object107 compiled to 1 subobjects in 1ms!
01-13 19:37:16.640: I/jPCT-AE(9979): Remapping 6 vertex indices!
01-13 19:37:16.640: I/jPCT-AE(9979): Creating vertex cache (144 bytes)!
01-13 19:37:16.640: I/jPCT-AE(9979): Vertex indices will be mapped!
01-13 19:37:16.640: I/jPCT-AE(9979): Subobject of object 108/object110 compiled to indexed fixed point data using 12 vertices in 1ms!
01-13 19:37:16.640: I/jPCT-AE(9979): Object 108/object110 compiled to 1 subobjects in 2ms!
« Last Edit: January 13, 2012, 07:42:23 pm by EgonOlsen »

Offline hayden621

  • byte
  • *
  • Posts: 20
    • View Profile
Re: Overlay with NVidia Tegra II GPU
« Reply #6 on: January 13, 2012, 12:45:00 pm »
And here is a normal log running the app from the old Galaxy SII which runs normally

or comparison, here is the log from a normal Galaxy S II
=============================================

Code: [Select]
01-13 18:43:51.430: I/jPCT-AE(31101): onResume
01-13 18:43:51.535: I/jPCT-AE(31101): OpenGL vendor:     ARM
01-13 18:43:51.535: I/jPCT-AE(31101): OpenGL renderer:   Mali-400 MP
01-13 18:43:51.535: I/jPCT-AE(31101): OpenGL version:    OpenGL ES-CM 1.1
01-13 18:43:51.535: I/jPCT-AE(31101): OpenGL renderer initialized (using 4 texture stages)
01-13 18:43:51.550: I/jPCT-AE(31101): Visibility lists disposed!
01-13 18:43:51.550: I/jPCT-AE(31101): All texture data unloaded from gpu!
01-13 18:43:51.550: I/jPCT-AE(31101): Renderer disposed!
01-13 18:43:51.550: I/jPCT-AE(31101): Static references cleared...
01-13 18:43:51.550: I/jPCT-AE(31101): OpenGL vendor:     ARM
01-13 18:43:51.550: I/jPCT-AE(31101): OpenGL renderer:   Mali-400 MP
01-13 18:43:51.550: I/jPCT-AE(31101): OpenGL version:    OpenGL ES-CM 1.1
01-13 18:43:51.550: I/jPCT-AE(31101): OpenGL renderer initialized (using 4 texture stages)
01-13 18:43:51.630: I/jPCT-AE(31101): Visibility lists disposed!
01-13 18:43:51.630: I/jPCT-AE(31101): Static references cleared...
01-13 18:43:56.950: I/jPCT-AE(31101): Loading Texture...
01-13 18:43:57.035: I/jPCT-AE(31101): Loading Texture...
01-13 18:43:57.145: I/jPCT-AE(31101): Remapping 6 vertex indices!
01-13 18:43:57.145: I/jPCT-AE(31101): Creating vertex cache (144 bytes)!
01-13 18:43:57.145: I/jPCT-AE(31101): Vertex indices will be mapped!
01-13 18:43:57.150: I/jPCT-AE(31101): Subobject of object 187/object189 compiled to indexed fixed point data using 12 vertices in 1ms!
01-13 18:43:57.150: I/jPCT-AE(31101): Object 187/object189 compiled to 1 subobjects in 1ms!
01-13 18:43:57.150: I/jPCT-AE(31101): Remapping 6 vertex indices!
01-13 18:43:57.150: I/jPCT-AE(31101): Creating vertex cache (144 bytes)!
01-13 18:43:57.150: I/jPCT-AE(31101): Vertex indices will be mapped!
01-13 18:43:57.150: I/jPCT-AE(31101): Subobject of object 190/object192 compiled to indexed fixed point data using 12 vertices in 0ms!
01-13 18:43:57.150: I/jPCT-AE(31101): Object 190/object192 compiled to 1 subobjects in 1ms!
01-13 18:43:58.720: I/jPCT-AE(31101): onPause
01-13 18:43:58.800: I/jPCT-AE(31101): Visibility lists disposed!
01-13 18:43:58.805: I/jPCT-AE(31101): All texture data unloaded from gpu!
01-13 18:43:58.805: I/jPCT-AE(31101): Renderer disposed!
01-13 18:43:58.805: I/jPCT-AE(31101): Static references cleared...
01-13 18:43:58.805: I/jPCT-AE(31101): Static references cleared...
01-13 18:43:59.115: I/jPCT-AE(31101): onResume
01-13 18:43:59.120: I/jPCT-AE(31101): onPause
01-13 18:43:59.305: I/jPCT-AE(31101): onResume
01-13 18:43:59.570: I/jPCT-AE(31101): Adding Lightsource: 0
01-13 18:43:59.570: I/jPCT-AE(31101): OpenGL vendor:     ARM
01-13 18:43:59.570: I/jPCT-AE(31101): OpenGL renderer:   Mali-400 MP
01-13 18:43:59.570: I/jPCT-AE(31101): OpenGL version:    OpenGL ES-CM 1.1
01-13 18:43:59.570: I/jPCT-AE(31101): OpenGL renderer initialized (using 4 texture stages)
01-13 18:43:59.570: I/jPCT-AE(31101): Memory usage before compacting: 20102 KB used out of 27463 KB
01-13 18:43:59.920: I/jPCT-AE(31101): Memory usage after compacting: 17297 KB used out of 27463 KB
01-13 18:43:59.920: I/jPCT-AE(31101): Saving ButterflyViewRenderer!
01-13 18:45:13.160: I/jPCT-AE(31101): onPause
01-13 18:45:13.240: I/jPCT-AE(31101): Visibility lists disposed!
01-13 18:45:13.240: I/jPCT-AE(31101): All texture data unloaded from gpu!
01-13 18:45:13.240: I/jPCT-AE(31101): Renderer disposed!
01-13 18:45:13.240: I/jPCT-AE(31101): Static references cleared...
01-13 18:45:13.240: I/jPCT-AE(31101): Static references cleared...
« Last Edit: January 13, 2012, 07:42:38 pm by EgonOlsen »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Overlay with NVidia Tegra II GPU
« Reply #7 on: January 13, 2012, 07:55:34 pm »
Note: I edited your posts to wrap the logs in code-tags....

This log confuses me...it looks like a complete mess to me...this part for example:

Code: [Select]
01-13 19:37:12.720: I/jPCT-AE(9979): onPause
01-13 19:37:12.760: I/jPCT-AE(9979): Visibility lists disposed!
01-13 19:37:12.760: I/jPCT-AE(9979): All texture data unloaded from gpu!
01-13 19:37:12.760: I/jPCT-AE(9979): Renderer disposed!
01-13 19:37:12.760: I/jPCT-AE(9979): Static references cleared...
01-13 19:37:12.760: I/jPCT-AE(9979): Static references cleared...
01-13 19:37:12.860: I/jPCT-AE(9979): Loading Texture...
01-13 19:37:12.870: I/jPCT-AE(9979): Loading Texture...
01-13 19:37:12.920: I/jPCT-AE(9979): Visibility lists disposed!
01-13 19:37:12.920: I/jPCT-AE(9979): Static references cleared...
01-13 19:37:12.920: I/jPCT-AE(9979): Visibility lists disposed!
01-13 19:37:12.920: I/jPCT-AE(9979): Static references cleared...
01-13 19:37:12.920: I/jPCT-AE(9979): Visibility lists disposed!
01-13 19:37:12.920: I/jPCT-AE(9979): Static references cleared...
01-13 19:37:12.960: I/jPCT-AE(9979): Loading Texture...
01-13 19:37:13.750: I/jPCT-AE(9979): Adding Lightsource: 0
01-13 19:37:13.750: I/jPCT-AE(9979): Adding Lightsource: 0

It prints "Visibility lists disposed!" four times. This can happen only if either dispose() of the FrameBuffer is called multiple times or multiple FrameBuffer's get garbage collected. Both doesn't seem to make much sense to me. And why are the textures loaded inbetween? Are you using some threads for these tasks?
Which textures the ones that the Overlay uses? Maybe the first ones that you are loading? Could you add some logging output to your texture loading, so that it's possible to see which texture gets loaded when!? Also, please run it again with Logger.getLogLevel(Logger.DEBUG); and post the log.

Offline hayden621

  • byte
  • *
  • Posts: 20
    • View Profile
Re: Overlay with NVidia Tegra II GPU
« Reply #8 on: January 16, 2012, 03:23:11 am »
Sorry about the last log, as I was switching between Activities in the previous log. Here is the log when I directly go to the Activity which the overlays are loaded in black.

Code: [Select]
01-16 10:21:05.160: I/jPCT-AE(11372): Loading Texture...
01-16 10:21:05.160: I/jPCT-AE(11372): Loading Texture...
01-16 10:21:05.170: I/jPCT-AE(11372): Loading Texture...
01-16 10:21:05.990: I/jPCT-AE(11372): Adding Lightsource: 0
01-16 10:21:05.990: I/jPCT-AE(11372): Adding Lightsource: 0
01-16 10:21:06.000: I/jPCT-AE(11372): OpenGL vendor:     NVIDIA Corporation
01-16 10:21:06.000: I/jPCT-AE(11372): OpenGL renderer:   NVIDIA AP
01-16 10:21:06.000: I/jPCT-AE(11372): OpenGL version:    OpenGL ES-CM 1.1
01-16 10:21:06.000: I/jPCT-AE(11372): OpenGL renderer initialized (using 2 texture stages)
01-16 10:21:06.000: I/jPCT-AE(11372): [ 1326680466007 ] - WARNING: No normals have been calculated for this mesh yet!
01-16 10:21:06.010: I/jPCT-AE(11372): [ 1326680466012 ] - WARNING: No normals have been calculated for this mesh yet!
01-16 10:21:06.010: I/jPCT-AE(11372): Memory usage before compacting: 5341 KB used out of 8071 KB
01-16 10:21:06.250: I/jPCT-AE(11372): Memory usage after compacting: 4823 KB used out of 8071 KB
01-16 10:21:06.250: I/jPCT-AE(11372): Saving MyRenderer!
01-16 10:21:06.250: I/jPCT-AE(11372): Using vm based buffer copies!
01-16 10:21:06.260: I/jPCT-AE(11372): Remapping 4 vertex indices!
01-16 10:21:06.260: I/jPCT-AE(11372): Creating vertex cache (96 bytes)!
01-16 10:21:06.260: I/jPCT-AE(11372): Vertex indices will be accessed directly!
01-16 10:21:06.260: I/jPCT-AE(11372): Subobject of object 2/__overlay plane 0__ compiled to indexed fixed point data using 6 vertices in 5ms!
01-16 10:21:06.260: I/jPCT-AE(11372): Object 2/__overlay plane 0__ compiled to 1 subobjects in 13ms!
01-16 10:21:06.270: I/jPCT-AE(11372): Remapping 4 vertex indices!
01-16 10:21:06.270: I/jPCT-AE(11372): Creating vertex cache (96 bytes)!
01-16 10:21:06.270: I/jPCT-AE(11372): Vertex indices will be accessed directly!
01-16 10:21:06.270: I/jPCT-AE(11372): Subobject of object 3/__overlay plane 1__ compiled to indexed fixed point data using 6 vertices in 2ms!
01-16 10:21:06.270: I/jPCT-AE(11372): Object 3/__overlay plane 1__ compiled to 1 subobjects in 3ms!
01-16 10:21:06.480: I/jPCT-AE(11372): 0fps
01-16 10:21:07.520: I/jPCT-AE(11372): 40fps
01-16 10:21:08.540: I/jPCT-AE(11372): 37fps
01-16 10:21:08.830: I/jPCT-AE(11372): Loading Texture...
01-16 10:21:08.940: I/jPCT-AE(11372): Loading Texture...
01-16 10:21:09.040: I/jPCT-AE(11372): Loading Texture...
01-16 10:21:09.100: I/jPCT-AE(11372): Loading Texture...
01-16 10:21:09.100: I/jPCT-AE(11372): Loading Texture...
01-16 10:21:09.190: I/jPCT-AE(11372): Loading Texture...
01-16 10:21:09.190: I/jPCT-AE(11372): Loading Texture...
01-16 10:21:09.330: I/jPCT-AE(11372): Loading Texture...
01-16 10:21:09.330: I/jPCT-AE(11372): Loading Texture...
01-16 10:21:09.430: I/jPCT-AE(11372): Loading Texture...
01-16 10:21:09.540: I/jPCT-AE(11372): Remapping 6 vertex indices!
01-16 10:21:09.540: I/jPCT-AE(11372): Creating vertex cache (144 bytes)!
01-16 10:21:09.540: I/jPCT-AE(11372): Vertex indices will be mapped!
01-16 10:21:09.540: I/jPCT-AE(11372): Subobject of object 7/object9 compiled to indexed fixed point data using 12 vertices in 2ms!
01-16 10:21:09.540: I/jPCT-AE(11372): Object 7/object9 compiled to 1 subobjects in 2ms!
01-16 10:21:09.540: I/jPCT-AE(11372): Remapping 6 vertex indices!
01-16 10:21:09.540: I/jPCT-AE(11372): Creating vertex cache (144 bytes)!
01-16 10:21:09.540: I/jPCT-AE(11372): Vertex indices will be mapped!
01-16 10:21:09.540: I/jPCT-AE(11372): Subobject of object 10/object12 compiled to indexed fixed point data using 12 vertices in 1ms!
01-16 10:21:09.540: I/jPCT-AE(11372): Object 10/object12 compiled to 1 subobjects in 1ms!
01-16 10:21:09.540: I/jPCT-AE(11372): Remapping 6 vertex indices!
01-16 10:21:09.540: I/jPCT-AE(11372): Creating vertex cache (144 bytes)!
01-16 10:21:09.540: I/jPCT-AE(11372): Vertex indices will be mapped!
01-16 10:21:09.540: I/jPCT-AE(11372): Subobject of object 13/object15 compiled to indexed fixed point data using 12 vertices in 1ms!
01-16 10:21:09.540: I/jPCT-AE(11372): Object 13/object15 compiled to 1 subobjects in 1ms!
01-16 10:21:09.550: I/jPCT-AE(11372): Remapping 6 vertex indices!
01-16 10:21:09.550: I/jPCT-AE(11372): Creating vertex cache (144 bytes)!
01-16 10:21:09.550: I/jPCT-AE(11372): Vertex indices will be mapped!
01-16 10:21:09.550: I/jPCT-AE(11372): Subobject of object 16/object18 compiled to indexed fixed point data using 12 vertices in 1ms!
01-16 10:21:09.550: I/jPCT-AE(11372): Object 16/object18 compiled to 1 subobjects in 3ms!
01-16 10:21:09.550: I/jPCT-AE(11372): Remapping 6 vertex indices!
01-16 10:21:09.550: I/jPCT-AE(11372): Creating vertex cache (144 bytes)!
01-16 10:21:09.550: I/jPCT-AE(11372): Vertex indices will be mapped!
01-16 10:21:09.550: I/jPCT-AE(11372): Subobject of object 19/object21 compiled to indexed fixed point data using 12 vertices in 2ms!
01-16 10:21:09.550: I/jPCT-AE(11372): Object 19/object21 compiled to 1 subobjects in 2ms!

Offline K24A3

  • long
  • ***
  • Posts: 231
    • View Profile
Re: Overlay with NVidia Tegra II GPU
« Reply #9 on: January 16, 2012, 08:21:54 am »
All 3D objects and textures should be loaded from the main OpenGL activity thread. The first call to the GLSurfaceView.Renderer onSurfaceChanged() function is a good place to load initialize the scene including all textures.

Do you have multiple Activity classes or launching multiple runnables/threads? If yes, those extra threads should not load anything 3D related.

Also ensure the texture files are placed in res\drawable-nodpi or res\raw so they don't get resized automatically by Android.




Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Overlay with NVidia Tegra II GPU
« Reply #10 on: January 16, 2012, 08:26:25 am »
Can you narrow it down a little further? For example, what is causing this:

Code: [Select]
01-16 10:21:06.000: I/jPCT-AE(11372): [ 1326680466007 ] - WARNING: No normals have been calculated for this mesh yet!
01-16 10:21:06.010: I/jPCT-AE(11372): [ 1326680466012 ] - WARNING: No normals have been calculated for this mesh yet!

??? Does it go away if all you add to the world/render are the overlays?

Offline hayden621

  • byte
  • *
  • Posts: 20
    • View Profile
Re: Overlay with NVidia Tegra II GPU
« Reply #11 on: January 16, 2012, 09:41:19 am »
Textures are all placed in res/raw.

The warning is due to the 3D model used in the scene which should not have anything to do with the overlay.

I have also tried changing the color and format of the overlay image, but seems there is not much help.

All your help would be most appreciated. Thanks a lot guys!

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Overlay with NVidia Tegra II GPU
« Reply #12 on: January 16, 2012, 10:12:18 am »
Please make a version that strips everything but the Overlays, verify that they are still all black, set Logger.setLogLevel(Logger.DEBUG); and post the log output.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Overlay with NVidia Tegra II GPU
« Reply #13 on: January 16, 2012, 10:22:33 am »
You might also want to try this:

  • Set the texture name in the Overlay's constructor to null
  • Set the texture using setTexture() on the Overlay afterwards

...and see if that changes something.
« Last Edit: January 16, 2012, 10:30:10 am by EgonOlsen »

Offline hayden621

  • byte
  • *
  • Posts: 20
    • View Profile
Re: Overlay with NVidia Tegra II GPU
« Reply #14 on: January 16, 2012, 12:24:27 pm »
Hi guys, sorry for the trouble.

I just updated the JPCT-AE version from 1.23 to 1.24 and the overlay works fine!