Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 07-08-06, 05:21 PM   #1
Ian Schmidt
Registered User
 
Join Date: Jul 2004
Posts: 6
Default Programming with pixel buffer objects

I'm running a GF7800GT PCI-E with Fedora Core 5 and the 87.62 drivers. I'm working on an OpenGL app where some texture objects should upload once and stay put (fonts) and 2 are double-buffered video playback. The video playback works great and the PBOs greatly increase performance over the stock glTexImage2D() method (I saw easily a 5 times speedup), but I'm having several problems.

#1 is that the last non-PBO texture allocated before I allocate the PBOs always gets corrupted. Usually it just goes all black or all white, but sometimes it actually ends up displaying a copy of one of the PBO textures.

#2 is that if I allocate any non-PBO textures after the PBO textures have been instanciated, they don't display and/or are corrupted too.

#3 is that if I force it so all textures upload via PBOs, then all the textures corrupt pretty much immediately.

I've found I can fix #1 and #3 by forcing all textures to re-upload each frame regardless of type, but that of course ruins performance. I'm not sure if I'm doing it wrong or if it's a driver bug or a combination of the the two. There is seemingly no complete working sample code anywhere on the Internet for using PBOs and so I went off the "texture streaming" fragment in the actual extension document and modified it until it worked.

I realize this may not be a technical enough place for this sort of question, if anyone knows where NV/OpenGL gurus are to be found, please let me know.
Ian Schmidt is offline   Reply With Quote
Old 07-08-06, 06:40 PM   #2
Ian Schmidt
Registered User
 
Join Date: Jul 2004
Posts: 6
Default Re: Programming with pixel buffer objects

For the record: I managed to solve this myself. It's important to make sure all the states are correct when creating a new texture object. You must still call glBindTexture(GL_TEXTURE_2D, foo); when creating a PBO texture, and you must always close out the PBO with glBindBuffer(GL_PIXEL_UNPACK_BUFFER_ARB, 0); when you're done uploading it.

Also, contrary to what the sample code looks like, you do NOT need to glBindBuffer() the PBO when drawing the texture, just glBindTexture() like normal.

Hopefully this helps someone sometime - Google is currently barren of any good info on PBOs, and they're a handy weapon for feature parity with a certain monopoly platform :-)
Ian Schmidt is offline   Reply With Quote
Old 12-05-07, 01:19 PM   #3
MegaManSE
Registered User
 
Join Date: Dec 2007
Posts: 1
Default Re: Programming with pixel buffer objects

I also had to work out a lot of weird undocumented quirks with doing this stuff.. there's so little documentation on the web for this. You may want to check out the post on my site on how to work with PBuffer and Frame Buffer Objects at http://willperone.net/Code/coderendertotexture.php
MegaManSE is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Allow pixel clock > 400MHz waperboy NVIDIA Linux 16 05-08-13 09:44 PM
GPU memory consumption, back buffer, Quadro tdsussman NVIDIA Linux 5 08-14-12 09:14 PM
Regression with 295.33 and GeForce GT 240 maro NVIDIA Linux 16 06-29-12 06:47 PM
Video: Programming Heterogeneous Many-cores Using Directives News Archived News Items 0 05-23-12 08:00 AM
nCore Schedules Popular Multicore Programming Course for Houston News Archived News Items 0 05-14-12 05:00 PM

All times are GMT -5. The time now is 04:55 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.