Author Topic: Lines not drawing correctly for S2  (Read 3612 times)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11775
    • View Profile
    • http://www.jpct.net
Re: Lines not drawing correctly for S2
« Reply #15 on: March 27, 2012, 11:06:22 pm »
Is this always the first segment being drawn or a (fixed?) number of segments? Can you narrow that down somehow? And does setting Config.useVBO=false; (has to be executed right at the beginning; before creating any object) make any difference?

Offline zammbi

  • float
  • ****
  • Posts: 360
    • View Profile
Re: Lines not drawing correctly for S2
« Reply #16 on: March 27, 2012, 11:12:51 pm »
Found a interesting test case. I made my stadium transparent. When looking from behind had no problems(below), but looking at front had the problem




[attachment deleted by admin]

Offline zammbi

  • float
  • ****
  • Posts: 360
    • View Profile
Re: Lines not drawing correctly for S2
« Reply #17 on: March 27, 2012, 11:13:27 pm »
Looking at front(below). If you look closely between the 2 images, my transparent grid changes.

Quote
Config.useVBO=false;
Solves the problem  :)

Quote
Is this always the first segment being drawn or a (fixed?) number of segments?
Well I have 40 segments, looking at the curve it seems a few being drawn.

[attachment deleted by admin]
« Last Edit: March 27, 2012, 11:19:33 pm by zammbi »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11775
    • View Profile
    • http://www.jpct.net
Re: Lines not drawing correctly for S2
« Reply #18 on: March 27, 2012, 11:18:35 pm »
Quote
Config.useVBO=false;
Solves the problem  :)
The funny thing is: The lines don't use VBOs at all. Only the rest of the geometry does...i'm close to consider this to be a driver bug...

Offline zammbi

  • float
  • ****
  • Posts: 360
    • View Profile
Re: Lines not drawing correctly for S2
« Reply #19 on: March 27, 2012, 11:23:08 pm »
Quote
i'm close to consider this to be a driver bug...
Yeah probably is. S2 is a very popular device and not sure if this will effect everyone with the same graphics chip. So if there is no work around then I'll have to keep VBOs off.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11775
    • View Profile
    • http://www.jpct.net
Re: Lines not drawing correctly for S2
« Reply #20 on: March 27, 2012, 11:30:49 pm »
It's a Mali GPU. I'm not sure which other devices are using these suckers...

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11775
    • View Profile
    • http://www.jpct.net
Re: Lines not drawing correctly for S2
« Reply #21 on: March 27, 2012, 11:42:30 pm »
...then I'll have to keep VBOs off.
It shouldn't be a performance issue in your case. I'll look into this again tomorrow, but i don't think that i'll discover the magic switch. After all, it's just a simple draw call that says: These are the coordinates and we have xxx of them...please do! I've no idea what prevents it from doing so...but i'll look into it. Maybe i'll find something...

Offline zammbi

  • float
  • ****
  • Posts: 360
    • View Profile
Re: Lines not drawing correctly for S2
« Reply #22 on: March 27, 2012, 11:46:28 pm »
You could have a blacklist of GPUs and if it's a "Mali-400 MP" you could turn off VBOs by default? But then again since only lines that are causing the problems (that we know about), this application is probably the only one having the problems :P

Quote
It shouldn't be a performance issue in your case.
Yeah my 3d stuff is quite light on the gpu.

Quote
but i'll look into it. Maybe i'll find something...
Thanks again  ;D
« Last Edit: March 27, 2012, 11:50:29 pm by zammbi »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11775
    • View Profile
    • http://www.jpct.net
Re: Lines not drawing correctly for S2
« Reply #23 on: March 28, 2012, 10:28:33 pm »
I've no idea what should cause this other than a driver bug. It's a simple call that says: This is the line data (which obviously is correct and not affected by transparency at all) and then executes a draw call for that data with the current length  (which isn't affected by transparency either). I've no idea what i'm supposed to do to get this working correctly.

However, please give this version a try. I doubt that it'll fix the problem but it's worth a try: http://jpct.de/download/tmp/jpct_ae.jar

Offline zammbi

  • float
  • ****
  • Posts: 360
    • View Profile
Re: Lines not drawing correctly for S2
« Reply #24 on: March 28, 2012, 11:04:52 pm »
Sorry it didn't fix the issue. Don't worry about it, if its going to be a hassle.

I've just done this:

Quote
   private static final String[] vboBlackList = {"Mali-400 MP"};
   
   public static void SetupJpctOptionsForGPU(final GL10 gl){
      
      final String renderer = gl.glGetString(GL10.GL_RENDERER);

      for(String test: vboBlackList){
         if(test.equalsIgnoreCase(renderer)){
            Config.useVBO = false;
         }   
      }
        }

However I can keep on testing anything you give me.