From: Sven G. <sgo...@ja...> - 2001-12-07 23:43:47
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday 30 November 2001 19:22, Lamy Jean-Baptiste wrote: > > You should not recreate your display list in every rendering ! > Create it THE FIRST TIME ONLY, then re-use it ! well true, look at gearRenderer.java for example ! > > Other consideration : > > - Are you sure that it is the quad that take so long time to render, and > not the hexagone ? > - Are you using software 3D ? Software rendering is typically slowed down > by texture changement, and speed is quasi proportionnal to the surface > drawn (so a big quad may be VERY slow). > - 1024*1024 may be too big for a texture ? try smaller ! hmm .. to transfer 1MB only once to the gfx card should be ok with the old java style ! because the CriticalArray JNI stuff may use the COPY mode of transfering such a big amount of memory, instead of using just the pointer, you might want to try the new java.nio mode .. well, this java.nio mode is currently not supported by the texture utilities .. (anybody interested in creating gl4java/jdk14 related utilities ?) anyway, because it is done only once, it is not critical. > > You can also disable some useless OpenGL flag when rendering the quad (e.g. > lights, fog, depth test...); it may be a little faster (but probably not a > lot). some techniques, i use for glmame (xmame.xgl) to increase the performance: no antialiasing: glShadeModel (GL_FLAT) glDisable (GL_POLYGON_SMOOTH) glDisable (GL_LINE_SMOOTH) glDisable (GL_POINT_SMOOTH) no alphablending: glDisable (GL_BLEND); no bilinear filtering: glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glmame updates and draws the complete bitmap (as a texture) at the maximum fps (depends, but about 20-60 fps) .. i have added a vo_gl2 driver to mplayer also, with the same technique .. (to watch movies ;-) of course glmame is native, so to implement this nice movie-feature, we indeed need the java.nio buffer's !!! > > Jiba > cheers, sven - -- "come on sexy mama, let's kill all humans", bender - futurama 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 iD8DBQE8EVQtHdOA30NoFAARAqq+AKCUXruXGFa49VAnBR4s0ow3+P7tvwCgoALi nwlEDAVPBc8x8DXWICcwkWk= =JvI0 -----END PGP SIGNATURE----- |