Login  Register

Re: I can't set Line Width to 1 pixel

Posted by elect on May 22, 2012; 6:45am
URL: https://forum.jogamp.org/I-can-t-set-Line-Width-to-1-pixel-tp4004559p4006104.html

Wade Walker wrote
You might try querying the supported widths as described at http://www.opengl.org/wiki/GLAPI/glLineWidth. Implementations aren't required to support non-antialiased line widths greater than 1.

                      float[] b = new float[2];

                        gl2.glGetFloatv(GL2.GL_ALIASED_LINE_WIDTH_RANGE, b, 0);
                        System.out.println("b[0]: "+b[0]+" b[1]: "+b[1]);
                        gl2.glGetFloatv(GL2.GL_SMOOTH_LINE_WIDTH_RANGE, b, 0);
                        System.out.println("b[0]: "+b[0]+" b[1]: "+b[1]);
                        gl2.glGetFloatv(GL2.GL_SMOOTH_LINE_WIDTH_GRANULARITY, b, 0);
                        System.out.println("b[0]: "+b[0]);


b[0]: 1.0 b[1]: 10.0
b[0]: 0.5 b[1]: 10.0
b[0]: 0.125