| Paste number 82960: | sub texture |
| Pasted by: | vade |
| When: | 8 months, 6 days ago |
| Share: | Tweet this! | http://paste.lisp.org/+1S0G |
| Channel: | #openemu |
| Paste contents: |
- (void)uploadGameBufferToTexture
{
// only do a texture submit if we have a new frame...
if([gameCore frameFinished])
{
// update our gamebuffer texture
glEnable(GL_TEXTURE_RECTANGLE_EXT);
glBindTexture(GL_TEXTURE_RECTANGLE_EXT, gameTexture);
// this is 'optimal'
//glTexSubImage2D(GL_TEXTURE_RECTANGLE_EXT, 0, 0, 0, [gameCore width], [gameCore height], GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, [gameCore videoBuffer]);
// this definitely works
glTexSubImage2D(GL_TEXTURE_RECTANGLE_EXT, 0, someRandomXoffSet, someRandomYOffset, [gameCore width], [gameCore height], [gameCore pixelFormat], [gameCore pixelType], [gameCore videoBuffer]);
}
}This paste has no annotations.