Author Topic: Points are always microscopic in OpenGL 2  (Read 16397 times)

Offline jaco robier

  • byte
  • *
  • Posts: 14
    • View Profile
Points are always microscopic in OpenGL 2
« on: January 07, 2018, 10:38:41 am »
Hello,
I use the class PolyLine and i have problem with the method SetWidth in mode Point in OpenGL 2

   mGLView.setEGLContextClientVersion(1); //  OpenGL 1
   ...;
   Polyline1.setPointMode(True); // mode point
   polyline1.setWidth(35);
=> the width of the point is correct.


   mGLView.setEGLContextClientVersion(2); //  OpenGL 2
   ...;
   Polyline1.setPointMode(True); // mode point
   polyline1.setWidth(35);=> The Width of the point never change and are always microscopic ? see photo openGL2.jpg

thank you for your support !.

« Last Edit: January 07, 2018, 10:58:36 am by jaco robier »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12298
    • View Profile
    • http://www.jpct.net
Re: Points are always microscopic in OpenGL 2
« Reply #1 on: January 08, 2018, 09:13:35 am »
That's not a bug. OpenGL ES 2.0 doesn't support point sizes directly so I left out the option to set the width back then and never revisited it. I'll look at it again...


Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12298
    • View Profile
    • http://www.jpct.net
Re: Points are always microscopic in OpenGL 2
« Reply #2 on: January 08, 2018, 05:14:07 pm »

Offline jaco robier

  • byte
  • *
  • Posts: 14
    • View Profile
Re: Points are always microscopic in OpenGL 2
« Reply #3 on: January 08, 2018, 05:47:05 pm »
I tried your version 1.32 and I saw no difference : the points must measure 1 pixel.

What is surprising is that the thickness of the lines work fine in OpenGL1 and OpengGL2 with JPCT version 1.31, when i use  Polyline1.setPointMode(False)


Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12298
    • View Profile
    • http://www.jpct.net
Re: Points are always microscopic in OpenGL 2
« Reply #4 on: January 08, 2018, 08:25:13 pm »
No, that's actually not surprinsing. ES 2.0 cares about lines width, it just has not method to set the point size, because of...reasons. For me, the new jar actually works fine simply be using the method to set the line width and apply it to points. It might be that some driver do this and some don't. Which device are you using? Can you try it on another one with a different GPU?

Offline jaco robier

  • byte
  • *
  • Posts: 14
    • View Profile
Re: Points are always microscopic in OpenGL 2
« Reply #5 on: January 09, 2018, 06:43:44 pm »
Yesterday I tested your version 1.32 on my Genymotion emulator on PC. :o

today, I test on my Samsung tablet and it works.


It's solved with your version 1.32
thank you very much.