Skip to content

Instantly share code, notes, and snippets.

@IanByun
Forked from arturoc/ofPBO.h
Last active August 28, 2016 13:40
Show Gist options
  • Save IanByun/670dcffbdf9af488ec60ac31cf261bb3 to your computer and use it in GitHub Desktop.
Save IanByun/670dcffbdf9af488ec60ac31cf261bb3 to your computer and use it in GitHub Desktop.
/*
* ofPBO.cpp
*
* Created on: 08/04/2012
* Author: arturo
* Revised on: 2016-08-27
* Reviser: ofIan, Ian Byun
* updated to match deletion and renaming of ofTextureData members
*/
#pragma once
#include "ofConstants.h"
#include "ofTexture.h"
#include "ofGraphics.h"
class ofPBO {
public:
ofPBO();
virtual ~ofPBO();
void allocate(ofTexture & tex, int numPBOs);
void updateData(const ofPixels & pixels);
void updateTexture();
private:
ofTexture texture;
vector<GLuint> pboIds;
size_t index;
unsigned int dataSize;
GLint glType;
GLint glFormat;
GLint glInternalFormat;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment