I would like to upload part of Pixmap (specified Rectangle of it) to Texture in GPU (at specified position).
What i would like to achieve is
void updateTextureFromPixmap(sourcePixmap,sourceRectangle,destTexture, destRectangle) {
destTexture.fill(copyfrom(sourcePixmap),copyarea(SourceRectangle),newArea(destRectangle));
}
Should i use glTexSubImage2D ? I'm still learning opengl ;/