From: Sven G. <sgo...@ja...> - 2002-01-09 05:10:39
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 31 December 2001 12:00, Marcel Romijn wrote: > Hello, > > I've been looking at the GL4Java implementation to use OpenGL in Java. > > To learn it, I've ported the NeHe lesson 1 through 8 in Java. did you port other lessons than allready ported ? if so, please mail the sources (zip, bzip2) - thx > This all > works nice, but I noticed that drawing gets slower as my window size > increases. So I printed out 'gl.glGetString( gl.GL_RENDERER )' and > 'gl.glGetString( gl.GL_VENDOR )'. They return "GDI Generic" and "Microsoft > Corporation" respectively. This means that the software rendering of > Windows is used. do a "java gl4java.GLContext -info" RTFM -> read the FAQ ;-) > > When I run the NeHe lessons, compiled in C++, they all run very fast, > independent of the window size (when running windowed and not full-screen). > So no problem with the hardware acceleration. > > Is there a reason why GL4Java end up with the software rendering? i do not know .. GL4Java does load the opengl32.dll (i guess thats the name ;-), within the default location. so, if you do have installed an opengl ICD, e.g. nvidia's detonator etc., it is hw accelerated automatically, and you should see the vendors id .. but - if you have linked an alternated GL dll to your c++ nehe lessons, you need to tell GL4Java which one you need .. have a look at CHANGES.txt: <snip> 5th April 2001 (Version 2.7.0 - Release 0 ) <snip> o It is now possible to specify/switch the gl/glu lib's at runtime !! E.g. the classes "gl4java.GLContext", "gl4java.utils.Test" (you better use the one within the demos/MiscDemos directory just called Test) now takes the arguments: "-GLLib <name>" and "-GLULib <name>" to specify the OpenGL and GLU library which should be used !! You can also switch to another GL/GLU set of libraries, while just calling gl4java.GLContext.gljFetchGLFunctions(...), with force:=true ! But be shure that no GLContext is alive ;-) Last but not least, you can use gltool's feature of specifying the GL/GLU library names by the systems environment variables: GLTOOL_USE_GLLIB - OpenGL library name GLTOOL_USE_GLULIB - GLU library name these environment variables does _always_ overrides any given ones from the java side ! <snip> just give the later solution a try, if you do not use an ICD .., or install your non-ICD opengl dll (with the name opengl32.dll) to your: - current directory, or - to the default system[32] directory .. but be sure, the opengl32.dll you want to use should/must contain at least the std. opengl 1.1 function set, otherwise it is very useless. remind: all opengl function (-pointers) are fetched automagically from the opengl dll. if any function is not implemented within the dll, the application will _not_ crash, just nothing happens then ! > > Thanks in advance, > Marcel Romijn I hope this helps, because this is for general purpose, I fwd'ed this Q to the mailinglist - later we will add it to the FAQ !! please use the mailinglist for further questions ! cheers, sven - -- health & wealth mailto:sgo...@ja... www : http://www.jausoft.com ; pgp: http://www.jausoft.com/gpg/ voice : +49-521-2399440 ; fax : +49-521-2399442 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8O9DDHdOA30NoFAARAuGKAKC/N1YcsJwojh14NADOm36Ic9VJFACfTjQ3 uD3VtvEZ/kerYLpbY8UzU7I= =6049 -----END PGP SIGNATURE----- |
From: Marcel R. <mr...@em...> - 2002-01-09 23:38:44
|
Hello Sven, This really is an interesting problem.... :-) I have one "opengl32.dll" on my system (which is Windows XP Professional) and it is located in "C:\WINNT\system32\opengl32.dll". I have an ASUS 7700 card and I'm using the NVidia Detonator drivers. Running my port of NeHe lesson 8, with a strategic println(), the "GL_VENDOR" is "Microsoft" and the "GL_RENDERER" is "GDI Generic". However, running from the same location, with the same JVM, the "java gl4java.GLContext -info", I get: <snip> Java Virtual Machine: Version 1.3.1_01 (1.3), Vendor: Sun Microsystems Inc. OpenGL - Versions ----------------------------------------------- GL VENDOR: NVIDIA Corporation GL RENDERER: GeForce2 GTS/AGP/3DNOW! GL VERSION: 1.3.0 GL EXTENSIONS: GL_ARB_imaging GL_ARB_multitexture 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_transpose_matrix GL_S3_s3tc GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_compiled_vertex_array GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_packed_pixels GL_EXT_paletted_texture 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_edge_clamp GL_EXT_texture_env_add GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_cube_map GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod GL_EXT_texture_lod_bias GL_EXT_texture_object GL_EXT_vertex_array GL_EXT_vertex_weighting GL_IBM_texture_mirrored_repeat GL_KTX_buffer_region GL_NV_blend_square GL_NV_evaluators GL_NV_fence GL_NV_fog_distance GL_NV_light_max_exponent GL_NV_packed_depth_stencil GL_NV_register_combiners GL_NV_texgen_emboss 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_SGIS_generate_mipmap GL_SGIS_multitexture GL_SGIS_texture_lod GL_WIN_swap_hint WGL_EXT_swap_control GLU VERSION: 1.2.2.0 Microsoft Corporation GLU EXTENSIONS: GL_EXT_bgra </snip> Surprise, surprise... "NVIDIA" :-) In situations like this, I'd like to get to the bottom of it. So I'll dive into this in the (very) near future. I will keep you (and the maillinglist) posted. Oh, BTW. I see that with the NeHe lessons, that Darren Hodges has a number of Java ports on his site. Is it safe to assume that lesson 13 to 15, lesson 17 and all lessons above 20 have not been ported to Java? Marcel Romijn. ----- Original Message ----- From: "Sven Goethel" <sgo...@ja...> To: "Marcel Romijn" <mr...@em...>; "gl4java-usergroup" <gl4...@li...> Sent: Wednesday, January 09, 2002 6:10 AM Subject: Re: Software rendering, no hardware acceleration? > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Monday 31 December 2001 12:00, Marcel Romijn wrote: > > Hello, > > > > I've been looking at the GL4Java implementation to use OpenGL in Java. > > > > To learn it, I've ported the NeHe lesson 1 through 8 in Java. > > did you port other lessons than allready ported ? > if so, please mail the sources (zip, bzip2) - thx > > > This all > > works nice, but I noticed that drawing gets slower as my window size > > increases. So I printed out 'gl.glGetString( gl.GL_RENDERER )' and > > 'gl.glGetString( gl.GL_VENDOR )'. They return "GDI Generic" and "Microsoft > > Corporation" respectively. This means that the software rendering of > > Windows is used. > > do a "java gl4java.GLContext -info" > > RTFM -> read the FAQ ;-) > > > > > When I run the NeHe lessons, compiled in C++, they all run very fast, > > independent of the window size (when running windowed and not full-screen). > > So no problem with the hardware acceleration. > > > > Is there a reason why GL4Java end up with the software rendering? > > i do not know .. > > GL4Java does load the opengl32.dll (i guess thats the name ;-), > within the default location. > > so, if you do have installed an opengl ICD, e.g. nvidia's detonator etc., > it is hw accelerated automatically, and you should see the vendors id .. > > but - if you have linked an alternated GL dll to your c++ nehe lessons, > you need to tell GL4Java which one you need .. > > have a look at CHANGES.txt: > > <snip> > 5th April 2001 (Version 2.7.0 - Release 0 ) > <snip> > o It is now possible to specify/switch the gl/glu lib's at runtime !! > > E.g. the classes > "gl4java.GLContext", > "gl4java.utils.Test" > (you better use the one within the demos/MiscDemos > directory just called Test) > now takes the arguments: > "-GLLib <name>" and > "-GLULib <name>" > to specify the OpenGL and GLU library which should be used !! > > You can also switch to another GL/GLU set of libraries, > while just calling gl4java.GLContext.gljFetchGLFunctions(...), > with force:=true ! > But be shure that no GLContext is alive ;-) > > Last but not least, you can use gltool's feature of > specifying the GL/GLU library names by the systems > environment variables: > GLTOOL_USE_GLLIB - OpenGL library name > GLTOOL_USE_GLULIB - GLU library name > these environment variables does _always_ overrides > any given ones from the java side ! > <snip> > > just give the later solution a try, if you do not use an ICD .., > or install your non-ICD opengl dll (with the name opengl32.dll) > to your: > - current directory, or > - to the default system[32] directory .. > but be sure, the opengl32.dll you want to use should/must contain > at least the std. opengl 1.1 function set, otherwise it is very useless. > > remind: all opengl function (-pointers) are fetched automagically > from the opengl dll. > > if any function is not implemented within the dll, > the application will _not_ crash, just nothing happens then ! > > > > > Thanks in advance, > > Marcel Romijn > > I hope this helps, because this is for general purpose, > I fwd'ed this Q to the mailinglist - later we will add it to the FAQ !! > > please use the mailinglist for further questions ! > > cheers, sven > - -- > health & wealth > mailto:sgo...@ja... > www : http://www.jausoft.com ; pgp: http://www.jausoft.com/gpg/ > voice : +49-521-2399440 ; fax : +49-521-2399442 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.6 (GNU/Linux) > Comment: For info see http://www.gnupg.org > > iD8DBQE8O9DDHdOA30NoFAARAuGKAKC/N1YcsJwojh14NADOm36Ic9VJFACfTjQ3 > uD3VtvEZ/kerYLpbY8UzU7I= > =6049 > -----END PGP SIGNATURE----- |
From: Sven G. <sgo...@ja...> - 2002-01-10 07:04:59
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday 09 January 2002 23:37, Marcel Romijn wrote: > Hello Sven, > > This really is an interesting problem.... :-) > > I have one "opengl32.dll" on my system (which is Windows XP Professional) > and it is located in "C:\WINNT\system32\opengl32.dll". > I have an ASUS 7700 card and I'm using the NVidia Detonator drivers. > > Running my port of NeHe lesson 8, with a strategic println(), the > "GL_VENDOR" is "Microsoft" and the "GL_RENDERER" is "GDI Generic". > However, running from the same location, with the same JVM, the "java > gl4java.GLContext -info", I get: > > <snip> > Java Virtual Machine: Version 1.3.1_01 (1.3), Vendor: Sun Microsystems Inc. > > OpenGL - Versions > ----------------------------------------------- > GL VENDOR: NVIDIA Corporation > GL RENDERER: GeForce2 GTS/AGP/3DNOW! > GL VERSION: 1.3.0 <snip> > > Surprise, surprise... "NVIDIA" :-) > > In situations like this, I'd like to get to the bottom of it. > very funny .. as you might know, i do not know win xp ;-) > So I'll dive into this in the (very) near future. > I will keep you (and the maillinglist) posted. > cool, thx. > Oh, BTW. I see that with the NeHe lessons, that Darren Hodges has a number > of Java ports on his site. Is it safe to assume that lesson 13 to 15, > lesson 17 and all lessons above 20 have not been ported to Java? > well look at the nehe ports within the gl4java demo's and on hodge's site then you know what's missing .. right ! > Marcel Romijn. > cheers, sven - -- health & wealth mailto:sgo...@ja... www : http://www.jausoft.com ; pgp: http://www.jausoft.com/gpg/ voice : +49-521-2399440 ; fax : +49-521-2399442 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8PT0OHdOA30NoFAARAiopAKCKbLQdXaQwV5HsIVNF8hUVAWq+MACgqVP7 SGII0MmY5jVyieMD4YRmjG0= =rRmU -----END PGP SIGNATURE----- |
From: Marcel R. <mr...@em...> - 2002-01-10 19:47:02
|
Hi Sven, Found it... I should have read the FAQ closer :-( With "GLAnimCanvas" and "GLCanvas" it runs "GeForce2 GTS/AGP/3DNOW!" from "NVIDIA Corporation". With "GLAnimJPanel" and "GLJPanel" it runs "GDI Generic" from "Microsoft Corporation". The swing implementation has to work "behind the screen" and cannot use hardware acceleration. This is covered in item "GLAnimCanvas vs GLJPanel, which should I choose ?" in the FAQ, which I, like I said, should have read closer... Marcel Romijn ----- Original Message ----- From: "Sven Goethel" <sgo...@ja...> To: "Marcel Romijn" <mr...@em...>; "gl4java-usergroup" <gl4...@li...> Sent: Thursday, January 10, 2002 8:04 AM Subject: Re: [gl4java-usergroup] Re: Software rendering, no hardware acceleration? > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Wednesday 09 January 2002 23:37, Marcel Romijn wrote: > > Hello Sven, > > > > This really is an interesting problem.... :-) > > > > I have one "opengl32.dll" on my system (which is Windows XP Professional) > > and it is located in "C:\WINNT\system32\opengl32.dll". > > I have an ASUS 7700 card and I'm using the NVidia Detonator drivers. > > > > Running my port of NeHe lesson 8, with a strategic println(), the > > "GL_VENDOR" is "Microsoft" and the "GL_RENDERER" is "GDI Generic". > > However, running from the same location, with the same JVM, the "java > > gl4java.GLContext -info", I get: > > > > <snip> > > Java Virtual Machine: Version 1.3.1_01 (1.3), Vendor: Sun Microsystems Inc. > > > > OpenGL - Versions > > ----------------------------------------------- > > GL VENDOR: NVIDIA Corporation > > GL RENDERER: GeForce2 GTS/AGP/3DNOW! > > GL VERSION: 1.3.0 > > <snip> > > > > Surprise, surprise... "NVIDIA" :-) > > > > In situations like this, I'd like to get to the bottom of it. > > > > very funny .. > > as you might know, i do not know win xp ;-) > > > So I'll dive into this in the (very) near future. > > I will keep you (and the maillinglist) posted. > > > > cool, thx. > > > Oh, BTW. I see that with the NeHe lessons, that Darren Hodges has a number > > of Java ports on his site. Is it safe to assume that lesson 13 to 15, > > lesson 17 and all lessons above 20 have not been ported to Java? > > > > well look at the nehe ports within the gl4java demo's and on hodge's site > > then you know what's missing .. > > right ! > > > Marcel Romijn. > > > > cheers, sven > - -- > health & wealth > mailto:sgo...@ja... > www : http://www.jausoft.com ; pgp: http://www.jausoft.com/gpg/ > voice : +49-521-2399440 ; fax : +49-521-2399442 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.6 (GNU/Linux) > Comment: For info see http://www.gnupg.org > > iD8DBQE8PT0OHdOA30NoFAARAiopAKCKbLQdXaQwV5HsIVNF8hUVAWq+MACgqVP7 > SGII0MmY5jVyieMD4YRmjG0= > =rRmU > -----END PGP SIGNATURE----- |