Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


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: 1288

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: 1288

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