Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (741)
Games in Android Showcase (225)
games submitted by our members
Games in WIP (823)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  PBuffer display() call slow?  (Read 1860 times)
0 Members and 1 Guest are viewing this topic.
Offline mantesat

Junior Devvie




Java games rock!


« Posted 2006-04-14 16:31:42 »

Hi all

I'm using a pbuffer for performing some offscreen rendering, to use for copying data to a texture. At first I noticed that the whole piece of code was somewhat slow (2-3ms), and I thought that this was normal because of the use of glCopyTexImage2D/glCopyTexSubImage2D. However, what I timed up the glCopyTexImage2D call, I found out that it was fairly fast, about 0.2 ms. In fact, everything inside the display method of the pbuffer was timed to be less than 0.3 ms. But still, the call to pbuffer display took about 1-3 ms each time. In fact, a call to an empty display method for the pbuffer took 0.8-3 ms.

Has anyone came across this? Is this something normal? Should the call to display take up so much time?

TIA
N
Offline Mithrandir

Senior Devvie




Cut from being on the bleeding edge too long


« Reply #1 - Posted 2006-04-14 17:23:40 »

There could be many different reasons for this. Platform and video card information are essential. For example, you may be under the conditions that JOGL has forced single threaded-rendering on you, and thus the display call won't be scheduled until the next screen refresh cycle. That's just one of many ways things could be appearing to be slow, even when they are not.

The site for 3D Graphics information http://www.j3d.org/
Aviatrix3D JOGL Scenegraph http://aviatrix3d.j3d.org/
Programming is essentially a markup language surrounding mathematical formulae and thus, should not be patentable.
Offline mantesat

Junior Devvie




Java games rock!


« Reply #2 - Posted 2006-04-14 18:36:20 »

Well, I'm using an Acer Travelmate (Intel Centrino 1.6Ghz, 1.25GB mem), with an infamous ATI Mobility Radeon 9000 card. I suspect that, yes, my case must be the single threaded one, but I can't understand why the display() call on the pbuffer uses so much time, since it is done from inside a GLEvent Listener display() call. Also, context for the pbuffer and the GLCanvas is the same, so probably no context switching occurs.

If more system specific info is needed, I'll be happy to provide them.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Mithrandir

Senior Devvie




Cut from being on the bleeding edge too long


« Reply #3 - Posted 2006-04-14 18:46:04 »

Are you using single or double buffered pbuffers or auto swap buffers?

Another thing to check: Are you only testing a single call to display()? The first time through the pbuffer has to initialise itself, which could take a considerable amount of time.

The site for 3D Graphics information http://www.j3d.org/
Aviatrix3D JOGL Scenegraph http://aviatrix3d.j3d.org/
Programming is essentially a markup language surrounding mathematical formulae and thus, should not be patentable.
Offline Niwak
« Reply #4 - Posted 2006-04-14 18:47:03 »

I had quite a lot of problem when using PBuffer. FBO are now mainstream ; as far as I know (for NVidia and ATI at least), all hardware supporting PBuffer now supports FBO with a simple driver update. I would therefore suggest to drop PBuffer in favor of FBO, this is easy and will solve these problems.
Offline mantesat

Junior Devvie




Java games rock!


« Reply #5 - Posted 2006-04-14 19:12:23 »

To Mithrandir:

I'm using single buffered pbuffers. I think that the setDoubleBuffered() method doesn't work for pbuffers in JOGL-JSR231. I also time many display() calls, not one. The times I have mentioned in previous posts are mean times for the pbuffer display() call.

To Niwak:

You're right, FBO are a better solution. However, my Mobility Radeon 9000 doesn't support  them, even with driver updates. I don't think that all cards that support pbuffers support FBO too. I've confirmed that by running the tests provided with the OpenGL Extensions Viewer utility. Using FBO is the best solution, however, I must make sure that my app runs to as many cards as possible.
Pages: [1]
  ignore  |  Print  
 
 

 
xxMrPHDxx (21 views)
2017-11-21 16:21:00

xxMrPHDxx (14 views)
2017-11-21 16:14:31

xxMrPHDxx (16 views)
2017-11-21 16:10:57

Ecumene (114 views)
2017-09-30 02:57:34

theagentd (150 views)
2017-09-26 18:23:31

cybrmynd (260 views)
2017-08-02 12:28:51

cybrmynd (250 views)
2017-08-02 12:19:43

cybrmynd (247 views)
2017-08-02 12:18:09

Sralse (260 views)
2017-07-25 17:13:48

Archive (881 views)
2017-04-27 17:45:51
List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!