X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftexture2d.cpp;h=dac671fdfa52fcae265d088b2cb9d14f918a9a56;hb=ffe1debbd757d20f7250fd8572c2c46cd901f559;hp=94224147c70434b53bcb8ef9ea78328e9f81284b;hpb=85c6c43eb0f937f31f4a91ef3731d8bb2e98c8b4;p=libs%2Fgl.git diff --git a/source/texture2d.cpp b/source/texture2d.cpp index 94224147..dac671fd 100644 --- a/source/texture2d.cpp +++ b/source/texture2d.cpp @@ -104,7 +104,7 @@ 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) {