//---------------------------------------------------------- void ofTexture::loadData(const ofShortPixels & pix){ if(!isAllocated()){ allocate(pix); }else{ ofSetPixelStoreiAlignment(GL_UNPACK_ALIGNMENT,pix.getBytesStride()); loadData(pix.getData(), pix.getWidth(), pix.getHeight(), ofGetGlFormat(pix), ofGetGlType(pix)); } }
//---------------------------------------------------------- void ofTexture::loadData(const ofShortPixels & pix){ ofSetPixelStorei(pix.getBytesStride()); loadData(pix.getPixels(), pix.getWidth(), pix.getHeight(), ofGetGlFormat(pix), ofGetGlType(pix)); }