Jump to content

  • Log In with Google      Sign In   
  • Create Account

PBO to GL_BACK


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 aqrit   Members   -  Reputation: 119

Like
0Likes
Like

Posted 23 October 2013 - 10:02 PM

Why is uploading to a texture then rendering a quad recommended over glDrawPixels?

edit: looks like glDrawPixels takes twice the time to run as glTexSubImage2D->render quad does in my tests :(

 

 

Why does glCopyBufferSubData not work for this?

//glDrawPixels( 640, 480, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, 0 ); // works

glBindBuffer( GL_COPY_WRITE_BUFFER, GL_BACK_LEFT ) ;
glCopyBufferSubData( GL_PIXEL_UNPACK_BUFFER, GL_COPY_WRITE_BUFFER, 0, 0, 256 ); // fails 0x501

Edited by aqrit, 27 October 2013 - 01:00 PM.


Sponsor:

#2 Dark Helmet   Members   -  Reputation: 173

Like
3Likes
Like

Posted 24 October 2013 - 05:45 AM

GL_BACK_LEFT is a component buffer of the default (system) framebuffer. It is not the name of a buffer object.

I can easily see why you made this mistake though. Components of a framebuffer are historically called buffers (e.g. color buffers, depth buffer, stencil buffer; thus glDrawBuffer/glReadBuffer/etc.). These are different than buffer objects (arbitrary blocks of driver memory you can create).

With framebuffer objects, these component buffers are called "attachment points" to help disambiguate these concepts.

#3 aqrit   Members   -  Reputation: 119

Like
0Likes
Like

Posted 25 October 2013 - 10:09 AM

Is there any way to upload an image to the back buffer with out an extra copy step? ( other than glDrawPixels )

 -- maybe get the handle of the texture the back buffer is using?

 

edit: glGetFramebufferAttachmentParameteriv doesn't work on the default frame buffer sad.png

I see some disussion of about this topic

http://www.opengl.org/discussion_boards/showthread.php/178863-Lock-the-Default-Framebuffer?p=1241817&viewfull=1#post1241817

http://www.opengl.org/discussion_boards/showthread.php/182610-Request-FBO-can-use-default-color-depth-and-stencil-buffers?p=1254401&viewfull=1#post1254401

 

that seems to suggest it is currently impossible because the screen size can change without notice ( or something )


Edited by aqrit, 26 October 2013 - 03:28 PM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS