X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftexture2d.cpp;h=dac671fdfa52fcae265d088b2cb9d14f918a9a56;hb=c89b596e05705f9a23f6c5cdf0b98ffd5f8f273c;hp=806e4a179bded9f8a71264ecce78bccafc529870;hpb=8ed377139d48a6fc39eeed9f3494bbe41aed4107;p=libs%2Fgl.git diff --git a/source/texture2d.cpp b/source/texture2d.cpp index 806e4a17..dac671fd 100644 --- a/source/texture2d.cpp +++ b/source/texture2d.cpp @@ -104,9 +104,9 @@ void Texture2D::image(unsigned level, PixelFormat fmt, DataType type, const void glTexImage2D(target, level, ifmt, w, h, 0, get_upload_format(fmt), type, data); allocated |= 1<(pixel_buffer.map(WRITE_ONLY)); + pixel_buffer.storage(n_bytes); + mapped_address = reinterpret_cast(pixel_buffer.map()); } else if(phase==2) {