Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (736)
Games in Android Showcase (223)
games submitted by our members
Games in WIP (813)
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  
  Double buffered pbuffer  (Read 2708 times)
0 Members and 1 Guest are viewing this topic.
Offline mantesat

Junior Devvie




Java games rock!


« Posted 2006-01-03 18:57:47 »

Hi all,

has anyone been able to create a double buffered pbuffer? I searched the forum for a similar problem and  at this topic (http://www.java-gaming.org/forums/index.php?topic=5032.0) GTW has reported the same problem, but it remained unclear whether pbuffers can be double buffered when using jogl. I'm using JSR231, and if I try to enable double buffering at the pbuffer  GLcapabilities, my app crashes and I get the following report:

1  
2  
3  
4  
5  
6  
7  
8  
9  
Stack: [0x037d0000,0x03810000),  sp=0x0380f274,  free space=252k
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  com.sun.opengl.impl.windows.WGLExtImpl.dispatch_wglCreatePbufferARB1(JIIILjava/lang/Object;IJ)J+0
j  com.sun.opengl.impl.windows.WGLExtImpl.wglCreatePbufferARB(JIII[II)J+103
j  com.sun.opengl.impl.windows.WindowsPbufferGLDrawable.createPbuffer(JLcom/sun/opengl/impl/windows/WGLExt;)V+1026
j  com.sun.opengl.impl.windows.WindowsPbufferGLDrawable.<init>(Ljavax/media/opengl/GLCapabilities;IILcom/sun/opengl/impl/windows/WindowsGLDrawable;Lcom/sun/opengl/impl/windows/WGLExt;)V+167
j  com.sun.opengl.impl.windows.WindowsGLDrawableFactory$2.run()V+59
j  com.sun.opengl.impl.windows.WindowsGLDrawableFactory.maybeDoSingleThreadedWorkaround(Ljava/lang/Runnable;)V+20
j  com.sun.opengl.impl.windows.WindowsGLDrawableFactory.createGLPbuffer(Ljavax/media/opengl/GLCapabilities;Ljavax/media/opengl/GLCapabilitiesChooser;IILjavax/media/opengl/GLContext;)Ljavax/media/opengl/GLPbuffer;+47


Thanks in advance
N
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #1 - Posted 2006-01-03 19:07:23 »

Why do you want a double-buffered pbuffer? Pbuffers, being offscreen, don't need double-buffering because the intermediate rendering results aren't visible on the screen until you explicitly copy them there.
Offline mantesat

Junior Devvie




Java games rock!


« Reply #2 - Posted 2006-01-03 19:24:24 »

I'm noticing a behavior that I'm not sure its the right one. I render two quads, the one hiding the other (they are not coincident, so z fighting is not the problem). The quad in front uses a texture produced by the pbuffer. When I move the camera quickly towards/away from the quads, sometimes the quad in behind becomes visible for a split second before the quad in front is  rendered. I suspect that this might be because of the pbuffer produced texture,and a cause might be the single buffered pbuffer.

 
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline GKW

Senior Devvie




Revenge is mine!


« Reply #3 - Posted 2006-01-03 21:11:14 »

Your drivers are supposed to support doublebuffered pbuffers.  My nvidia card does just fine but the ATI card in my laptop does not.  After trying the newest drivers from ATI I eventually loaded up the orginal drivers from gateway and they actually could almost do doublebuffered pbuffers correctly but there were lots of lines in the frame that shouldn't have been there.  It should work but if it doesn't then it is probably the drivers fault.  Take a look at framebuffer objects if you card supports it.  They will probably be better supported than pbuffers.
Offline NVaidya

Junior Devvie




Java games rock!


« Reply #4 - Posted 2006-01-03 22:01:38 »

Yeah, never had a problem with nVidia drivers.

For ATI cards, this Java3D Issue may be of some interest:
https://java3d.dev.java.net/issues/show_bug.cgi?id=100

Gravity Sucks !
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #5 - Posted 2006-01-03 22:02:06 »

I don't think the single-buffered pbuffer is the issue in your application. Even if it were, you can and probably should guarantee that all OpenGL work related to the pbuffer has completed by doing a glFinish() at the end of your GLEventListener's display() callback for the pbuffer.
Offline mantesat

Junior Devvie




Java games rock!


« Reply #6 - Posted 2006-01-04 08:26:35 »

Well, my card is an ATI Mobility Radeon 9000, and it seems, considering GKW's post, that it doesn't support double buffered pbuffers. I tried to use the newest available drivers, but no luck. It also doesn't support frame buffers. I want to be able to draw vector graphics on an already existing  texture image, and pbuffers seem to be the only solution, considering the fact that i want to be compatible to as many older graphics cards as possible. I could use multitexturing and continuously draw an image with the vector graphics and send it as a texture to blend with the original texture, but that is too slow (sending all the time unneeded pixels to the GPU). Any suggestions there?

Considering  the two quads problem I mentioned, and thought as a consequence of unsupported double buffered pbufers, I'll look it up as Ken suggests, since double buffering seems not to be the issue. I'll try glFinish to see if it improves things.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

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

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

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

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

Archive (619 views)
2017-04-27 17:45:51

buddyBro (730 views)
2017-04-05 03:38:00

CopyableCougar4 (1255 views)
2017-03-24 15:39:42

theagentd (1235 views)
2017-03-24 15:32:08

Rule (1213 views)
2017-03-19 12:43:22

Rule (1264 views)
2017-03-19 12:42:17
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!