Skip to main content

[JAVA2D] Tiger and Opengl

5 replies [Last post]
Anonymous

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Brian Peterson

Hi Chris,

I noticed in your article (a very helpful one, BTW), under the "Stroke"
section, that drawLine is "sent directly to OpenGL only when there is a thin
stroke (i.e. a default BasicStroke with width=1.0)". I commonly use a
BasicStroke with width setting of 0, for which the documentation indicates
will give me the thinnest stroke supported by the graphics device no matter
the scale setting.

Is the condition for sending the drawLine to OpenGL specifically that the
width setting is 1, or will 0 work as well?

Brian

> -----Original Message-----
> From: Discussion list for Java 2D API
> [mailto:JAVA2D-INTEREST@JAVA.SUN.COM]On Behalf Of Chris Campbell
> Sent: Friday, November 12, 2004 4:57 PM
> To: JAVA2D-INTEREST@JAVA.SUN.COM
> Subject: Re: [JAVA2D] Tiger and Opengl
>
>
> Hi Iulian,
>
> I had sent out a URL earlier in the week pointing to a
> document I wrote
> about the ins and outs of the OpenGL-based Java 2D pipeline. Since
> then, it's been published as a full java.net article (with some minor
> clarifications made since the blog posting):
> http://today.java.net/pub/a/today/2004/11/12/graphics2d.html
>
> Thanks,
> Chris
>
>
> Iulian Musat wrote:
> > Sorry for breaking in, I am just curious what article were
> you talking
> > about...
> >
> > Thanks,
> > -Iulian
> >
> > Manie Coetzee wrote:
> > [...]
> >
> >> Hi Chris,
> >>
> >>>
> >>>> Hi Chris,
> >>>>
> >>>> Cool article by the way. It was actually the article
> that promted
> >>>> me to
> >>>> dig back into my old java 2d projects and rerun them
> with the opengl
> >>>> pipeline
> >>>> enabled.
> >>>>
> >>>
> >>> Thanks, hope it is useful for you.
> >
> >
> >
> ==============================================================
> =============
> > To unsubscribe, send email to listserv@java.sun.com and
> include in the body
> > of the message "signoff JAVA2D-INTEREST". For general
> help, send email to
> > listserv@java.sun.com and include in the body of the message "help".
>
> ==============================================================
> =============
> To unsubscribe, send email to listserv@java.sun.com and
> include in the body
> of the message "signoff JAVA2D-INTEREST". For general help,
> send email to
> listserv@java.sun.com and include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

Chris Campbell

Hi Brian,

Yes, I can see how that statement is a bit misleading. We do indeed
treat a BasicStroke with width <= 1.0 (and no dashing) as a "thin
stroke", so in your case (width=0) drawLine() calls will be handled
directly by OpenGL. A thin line will be rendered by OpenGL as 1 pixel
wide, which is consistent with the spec you mention.

Thanks for pointing this out. I'll see what I can do to clarify the
article.

Chris

On Nov 16, 2004, at 8:14 AM, Brian Peterson wrote:
> Hi Chris,
>
> I noticed in your article (a very helpful one, BTW), under the "Stroke"
> section, that drawLine is "sent directly to OpenGL only when there is
> a thin
> stroke (i.e. a default BasicStroke with width=1.0)". I commonly use a
> BasicStroke with width setting of 0, for which the documentation
> indicates
> will give me the thinnest stroke supported by the graphics device no
> matter
> the scale setting.
>
> Is the condition for sending the drawLine to OpenGL specifically that
> the
> width setting is 1, or will 0 work as well?
>
> Brian
>
>> -----Original Message-----
>> From: Discussion list for Java 2D API
>> [mailto:JAVA2D-INTEREST@JAVA.SUN.COM]On Behalf Of Chris Campbell
>> Sent: Friday, November 12, 2004 4:57 PM
>> To: JAVA2D-INTEREST@JAVA.SUN.COM
>> Subject: Re: [JAVA2D] Tiger and Opengl
>>
>>
>> Hi Iulian,
>>
>> I had sent out a URL earlier in the week pointing to a
>> document I wrote
>> about the ins and outs of the OpenGL-based Java 2D pipeline. Since
>> then, it's been published as a full java.net article (with some minor
>> clarifications made since the blog posting):
>> http://today.java.net/pub/a/today/2004/11/12/graphics2d.html
>>
>> Thanks,
>> Chris
>>
>>
>> Iulian Musat wrote:
>>> Sorry for breaking in, I am just curious what article were
>> you talking
>>> about...
>>>
>>> Thanks,
>>> -Iulian
>>>
>>> Manie Coetzee wrote:
>>> [...]
>>>
>>>> Hi Chris,
>>>>
>>>>>
>>>>>> Hi Chris,
>>>>>>
>>>>>> Cool article by the way. It was actually the article
>> that promted
>>>>>> me to
>>>>>> dig back into my old java 2d projects and rerun them
>> with the opengl
>>>>>> pipeline
>>>>>> enabled.
>>>>>>
>>>>>
>>>>> Thanks, hope it is useful for you.
>>>
>>>
>>>
>> ==============================================================
>> =============
>>> To unsubscribe, send email to listserv@java.sun.com and
>> include in the body
>>> of the message "signoff JAVA2D-INTEREST". For general
>> help, send email to
>>> listserv@java.sun.com and include in the body of the message "help".
>>
>> ==============================================================
>> =============
>> To unsubscribe, send email to listserv@java.sun.com and
>> include in the body
>> of the message "signoff JAVA2D-INTEREST". For general help,
>> send email to
>> listserv@java.sun.com and include in the body of the message "help".
>>
>
> =======================================================================
> ====
> To unsubscribe, send email to listserv@java.sun.com and include in the
> body
> of the message "signoff JAVA2D-INTEREST". For general help, send
> email to
> listserv@java.sun.com and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

Manie Coetzee

Hi Chris,

Thanks, I'll give it a try. Thats Linux for you!

Regards
Manie

On Fri, 12 Nov 2004 11:25:27 -0800, Chris Campbell
wrote:
> Hi Manie,
>
> Manie Coetzee wrote:
> > Hi Chris,
> >
> > Cool article by the way. It was actually the article that promted me to
> > dig back into my old java 2d projects and rerun them with the opengl pipeline
> > enabled.
> >
>
> Thanks, hope it is useful for you.
>
> > The nividia-kernel and nvidia-glx versions are '1.0.6111-r3' and I'm
> > running with a color depth of 16. I have a nvidia GeForce4 MX 440
> > (agp).
> >
>
> Ah, the 6106 and 6111 drivers from Nvidia are known to cause problems
> with the OGL-based Java 2D pipeline, and other apps. Those problems
> have been fixed in the 6629 drivers, so I suggest you try them out.
> Note however that some people have had trouble with those drivers on old
> hardware (pre-GF4, but possibly including GF4). Refer to this thread if
> you have any trouble with the 6629 drivers:
> http://www.nvnews.net/vbulletin/showthread.php?s=348cb7bb85d96342b555644...
>
> Thanks,
> Chris
>
>
>
>
> > Here is the full glxinfo output:
> >
> > ...........
> > name of display: :0.0
> > display: :0 screen: 0
> > direct rendering: Yes
> > server glx vendor string: NVIDIA Corporation
> > server glx version string: 1.3
> > server glx extensions:
> > GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig,
> > GLX_SGIX_pbuffer, GLX_SGI_video_sync, GLX_SGI_swap_control
> > client glx vendor string: NVIDIA Corporation
> > client glx version string: 1.3
> > client glx extensions:
> > GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_info,
> > GLX_EXT_visual_rating, GLX_EXT_import_context, GLX_SGI_video_sync,
> > GLX_NV_swap_group, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
> > GLX_SGI_swap_control, GLX_NV_float_buffer
> > GLX extensions:
> > GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig,
> > GLX_SGIX_pbuffer, GLX_SGI_video_sync, GLX_SGI_swap_control,
> > GLX_ARB_get_proc_address
> > OpenGL vendor string: NVIDIA Corporation
> > OpenGL renderer string: GeForce4 MX 440/AGP/SSE/3DNOW!
> > OpenGL version string: 1.5.1 NVIDIA 61.11
> > OpenGL extensions:
> > GL_ARB_imaging, GL_ARB_multitexture, GL_ARB_point_parameters,
> > GL_ARB_point_sprite, GL_ARB_shader_objects, GL_ARB_shading_language_100,
> > GL_ARB_texture_compression, GL_ARB_texture_cube_map,
> > GL_ARB_texture_env_add, GL_ARB_texture_env_combine,
> > GL_ARB_texture_env_dot3, GL_ARB_texture_mirrored_repeat,
> > GL_ARB_transpose_matrix, GL_ARB_vertex_buffer_object,
> > GL_ARB_vertex_program, GL_ARB_vertex_shader, GL_ARB_window_pos,
> > GL_S3_s3tc, GL_EXT_texture_env_add, GL_EXT_abgr, GL_EXT_bgra,
> > GL_EXT_blend_color, GL_EXT_blend_minmax, GL_EXT_blend_subtract,
> > GL_EXT_clip_volume_hint, GL_EXT_compiled_vertex_array,
> > GL_EXT_draw_range_elements, GL_EXT_fog_coord, GL_EXT_multi_draw_arrays,
> > GL_EXT_packed_pixels, GL_EXT_paletted_texture, GL_EXT_pixel_buffer_object,
> > GL_EXT_point_parameters, GL_EXT_rescale_normal, GL_EXT_secondary_color,
> > GL_EXT_separate_specular_color, GL_EXT_shared_texture_palette,
> > GL_EXT_stencil_wrap, GL_EXT_texture_compression_s3tc,
> > GL_EXT_texture_cube_map, GL_EXT_texture_edge_clamp,
> > GL_EXT_texture_env_combine, GL_EXT_texture_env_dot3,
> > GL_EXT_texture_filter_anisotropic, GL_EXT_texture_lod,
> > GL_EXT_texture_lod_bias, GL_EXT_texture_object, GL_EXT_vertex_array,
> > GL_IBM_rasterpos_clip, GL_IBM_texture_mirrored_repeat,
> > GL_KTX_buffer_region, GL_NV_blend_square, GL_NV_fence,
> > GL_NV_fog_distance, GL_NV_light_max_exponent, GL_NV_packed_depth_stencil,
> > GL_NV_pixel_data_range, GL_NV_point_sprite, GL_NV_register_combiners,
> > GL_NV_texgen_reflection, GL_NV_texture_env_combine4,
> > GL_NV_texture_rectangle, GL_NV_vertex_array_range,
> > GL_NV_vertex_array_range2, GL_NV_vertex_program, GL_NV_vertex_program1_1,
> > GL_SGIS_generate_mipmap, GL_SGIS_multitexture, GL_SGIS_texture_lod,
> > GL_SUN_slice_accum
> > glu version: 1.3
> > glu extensions:
> > GLU_EXT_nurbs_tessellator, GLU_EXT_object_space_tess
> >
> > visual x bf lv rg d st colorbuffer ax dp st accumbuffer ms cav
> > id dep cl sp sz l ci b ro r g b a bf th cl r g b a ns b eat
> > ----------------------------------------------------------------------
> > 0x21 16 tc 0 16 0 r y . 5 6 5 0 0 16 0 16 16 16 16 0 0 None
> > 0x22 16 dc 0 16 0 r y . 5 6 5 0 0 16 0 16 16 16 16 0 0 None
> > 0x23 16 tc 0 16 0 r . . 5 6 5 0 0 16 0 16 16 16 16 0 0 None
> > 0x24 16 tc 0 16 0 r y . 5 6 5 0 0 0 0 16 16 16 16 0 0 None
> > 0x25 16 tc 0 16 0 r . . 5 6 5 0 0 0 0 16 16 16 16 0 0 None
> > 0x26 16 dc 0 16 0 r . . 5 6 5 0 0 16 0 16 16 16 16 0 0 None
> > 0x27 16 dc 0 16 0 r y . 5 6 5 0 0 0 0 16 16 16 16 0 0 None
> > 0x28 16 dc 0 16 0 r . . 5 6 5 0 0 0 0 16 16 16 16 0 0 None
> >
> >
> > Error: couldn't find RGB GLX visual
> >
> > visual x bf lv rg d st colorbuffer ax dp st accumbuffer ms cav
> > id dep cl sp sz l ci b ro r g b a bf th cl r g b a ns b eat
> > ----------------------------------------------------------------------
> > 0x71 16 tc 1 0 0 c . . 0 0 0 0 0 0 0 0 0 0 0 0 0 None
> > 0x72 16 dc 1 0 0 c . . 0 0 0 0 0 0 0 0 0 0 0 0 0 None
> > ...............................
> >
> > I am using Gentoo, so all my packages are emerged. I see that the newest ebuild
> > is 6629. If all else fails, I'll give that a try.
> >
> > Thanks in advance
> > Manie
> >
> >
> >
> >
> > On Fri, 12 Nov 2004 10:12:38 -0800, Chris Campbell
> > wrote:
> >
> >>Hi Manie,
> >>
> >>By "latest" Nvidia drivers, do you mean 6629? What bit depth are you
> >>running (8, 16, 32)? Which Nvidia board do you have?
> >>
> >>I think I'd need to see the full output of glxinfo to diagnose the
> >>problem further. If glxinfo reports errors, then it sounds like your
> >>drivers aren't configured properly.
> >>
> >>Chris
> >>
> >>
> >>
> >>
> >>Manie Coetzee wrote:
> >>
> >>>Hi,
> >>>
> >>>When I try to enable the opengl pipeline, I get the following
> >>>message; "Could not enable OpenGL pipeline (GLX 1.3 not available)"
> >>>
> >>>I am running linux (Gentoo) and have the latest nvidia drivers
> >>>installed (nvidia-glx and nvidia-kernel).
> >>>
> >>>when I run "glxinfo | grep glx" I get:
> >>>.........
> >>>Error: couldn't find RGB GLX visual
> >>>server glx vendor string: NVIDIA Corporation
> >>>server glx version string: 1.3
> >>>server glx extensions:
> >>>client glx vendor string: NVIDIA Corporation
> >>>client glx version string: 1.3
> >>>client glx extensions:
> >>>..........
> >>>
> >>>when I run "glxinfo | grep direct"
> >>>............
> >>>Error: couldn't find RGB GLX visual
> >>>direct rendering: Yes
> >>>............
> >>>
> >>>I can run other opengl programs like glxgears, and it
> >>>run's fast (1600x1200) 166 frames per second.
> >>>
> >>>According to the messages, GLX 1.3 is supported. I have not loaded
> >>>the DRI module,
> >>>in my xorg-x11 config file. The nvidia splash screen shows when I start KDE
> >>>and I have run "opengl-update nvidia". Is here something I missed?
> >>>
> >>>Thanks in advance
> >>>Manie Coetzee
> >>>
> >>>===========================================================================
> >>>To unsubscribe, send email to listserv@java.sun.com and include in the body
> >>>of the message "signoff JAVA2D-INTEREST". For general help, send email to
> >>>listserv@java.sun.com and include in the body of the message "help".
> >>
>

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

Iulian Musat

Sorry for breaking in, I am just curious what article were you talking
about...

Thanks,
-Iulian

Manie Coetzee wrote:
[...]
> Hi Chris,
>>
>>>Hi Chris,
>>>
>>>Cool article by the way. It was actually the article that promted me to
>>>dig back into my old java 2d projects and rerun them with the opengl pipeline
>>>enabled.
>>>
>>
>>Thanks, hope it is useful for you.

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

Chris Campbell

Hi Iulian,

I had sent out a URL earlier in the week pointing to a document I wrote
about the ins and outs of the OpenGL-based Java 2D pipeline. Since
then, it's been published as a full java.net article (with some minor
clarifications made since the blog posting):
http://today.java.net/pub/a/today/2004/11/12/graphics2d.html

Thanks,
Chris

Iulian Musat wrote:
> Sorry for breaking in, I am just curious what article were you talking
> about...
>
> Thanks,
> -Iulian
>
> Manie Coetzee wrote:
> [...]
>
>> Hi Chris,
>>
>>>
>>>> Hi Chris,
>>>>
>>>> Cool article by the way. It was actually the article that promted
>>>> me to
>>>> dig back into my old java 2d projects and rerun them with the opengl
>>>> pipeline
>>>> enabled.
>>>>
>>>
>>> Thanks, hope it is useful for you.
>
>
> ===========================================================================
> To unsubscribe, send email to listserv@java.sun.com and include in the body
> of the message "signoff JAVA2D-INTEREST". For general help, send email to
> listserv@java.sun.com and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".