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----- |