Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


PBO and glBufferSubData


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   -  Reputation: 1297

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!

Sponsor:

#2 MARS_999   Members   -  Reputation: 1297

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.



PARTNERS