www.jpct.net

jPCT-AE - a 3d engine for Android => Bugs => Topic started by: jaco robier on January 07, 2018, 10:38:41 am

Title: Points are always microscopic in OpenGL 2
Post by: jaco robier 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 !.

Title: Re: Points are always microscopic in OpenGL 2
Post by: EgonOlsen 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...

Title: Re: Points are always microscopic in OpenGL 2
Post by: EgonOlsen on January 08, 2018, 05:14:07 pm
Try this jar: http://jpct.de/download/beta/jpct_ae.jar (http://jpct.de/download/beta/jpct_ae.jar)
Title: Re: Points are always microscopic in OpenGL 2
Post by: jaco robier 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)

Title: Re: Points are always microscopic in OpenGL 2
Post by: EgonOlsen 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?
Title: Re: Points are always microscopic in OpenGL 2
Post by: jaco robier 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.