Jump to content

View more

Image of the Day

Inventory ! Va falloir trouver une autre couleur pour le cadre D: #AzTroScreenshot #screenshotsaturday https://t.co/PvxhGL7cOH
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

PBO and glBufferSubData

4: Adsense

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
1 reply to this topic

#1 MARS_999   Members   

1620
Like
0Likes
Like

Posted 02 October 2012 - 04:04 PM

//this works....
unsigned char* p = (unsigned char*)glMapBuffer(GL_PIXEL_PACK_BUFFER, GL_READ_ONLY);
	    if(p)
	    {
   memcpy(pixels, p, size);
		    glUnmapBuffer(GL_PIXEL_PACK_BUFFER);
	    }
//this call doesn't
glBufferSubData(GL_PIXEL_PACK_BUFFER, 0, size, pixels);
//doesn't work? why?

Do I need to call glFlush() or glFinish() to use glBufferSubData()? I get a grey texture if I us that vs. the glMapBuffer()....

Thanks!

#2 MARS_999   Members   

1620
Like
0Likes
Like

Posted 02 October 2012 - 04:24 PM

ARGH!!!

Forget it!!!

I fat fingered it.....

glGetBufferSubData() was the problem... sigh!!!!




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.