Author Topic: Huaweu x1 renders very glitchy  (Read 1982 times)

Offline zammbi

  • float
  • ****
  • Posts: 360
    • View Profile
Huaweu x1 renders very glitchy
« on: February 29, 2012, 11:52:44 pm »
I'm currently testing the Huaweu x1 however it's very glitchy. Tested with both the beta and the stable version.

I have a plane with a texture on it which is under my model, but the texture is warped and the plane goes on top of the model. Clipping of the model also messes up.

Quote
03-01 12:03:22.322: I/jPCT-AE(2544): OpenGL vendor:     Android
03-01 12:03:22.342: I/jPCT-AE(2544): OpenGL renderer:   Android PixelFlinger 1.3
03-01 12:03:22.342: I/jPCT-AE(2544): OpenGL version:    OpenGL ES-CM 1.0
03-01 12:03:22.342: I/jPCT-AE(2544): OpenGL renderer initialized (using 2 texture stages)

Its Android 2.2.2.

I'll try get a screen shot...
« Last Edit: February 29, 2012, 11:56:36 pm by zammbi »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Huaweu x1 renders very glitchy
« Reply #1 on: March 01, 2012, 12:02:40 am »
No need for a screen shot, the reason is right here:
Quote
Android PixelFlinger 1.3

That's the software renderer of Android. It's the same one that the emulator uses. It's slow, buggy...it just sucks. It's used on phones without dedicated 3d hardware or drivers. You might want to check your setup code and (in case you haven't already) try the one that i use in my examples. If it still uses Pixelflinger, the phone obviously has no hardware support for 3d. There nothing you can do about this. You might want to see if this call

Code: [Select]
gl10.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST);
improves the image quality to a degree, but it will slow it down even more.

Edit: From what i found on the net, the Huaweu x1 has no hardware 3d support at all.
« Last Edit: March 01, 2012, 12:05:35 am by EgonOlsen »

Offline zammbi

  • float
  • ****
  • Posts: 360
    • View Profile
Re: Huaweu x1 renders very glitchy
« Reply #2 on: March 01, 2012, 12:14:17 am »
Quote
(in case you haven't already) try the one that i use in my examples
The code is based on your helloworld example.

Quote
You might want to see if this call
Thanks, that helps with the texture warping. Still fast enough also for our cases. But the overlapping isn't fixed. (photo attached). Is there any other code which could help with this?

We will be supporting low end phones with 2.1 or higher so I need to make sure it looks nice as possible on most of them.

If there is no way for supporting these phones is there a method in Jpct that I can easily use to figure out if its rendering using PixelFlinger?

[attachment deleted by admin]
« Last Edit: March 01, 2012, 12:17:14 am by zammbi »

Offline zammbi

  • float
  • ****
  • Posts: 360
    • View Profile
Re: Huaweu x1 renders very glitchy
« Reply #3 on: March 01, 2012, 03:00:07 am »
I solved my main issue.

Changed
Code: [Select]
final Object3D ground = Primitives.getPlane(1, 48);
to
Code: [Select]
final Object3D ground = Primitives.getPlane(8, 6);
Now it doesn't overlap (much). There is still some smaller glitches but its good enough for me.

Edit:

I don't even need this code anymore:

Code: [Select]
gl10.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST);
« Last Edit: March 01, 2012, 05:46:25 am by zammbi »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Huaweu x1 renders very glitchy
« Reply #4 on: March 01, 2012, 07:02:03 am »
That's because by increasing the tessellation of the plane, you compensate the errors in perspective correction that Pixelflinger introduces. Perspective correction for textures seems to be used in GL_NICEST mode only and perspective correction for the depth buffer seems to be unknown to Pixelflinger (albeit i don't get why...if you have the first, the latter actually comes for free...).
« Last Edit: March 02, 2012, 04:32:34 pm by EgonOlsen »