X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftexture2d.cpp;h=dac671fdfa52fcae265d088b2cb9d14f918a9a56;hb=5bc9c7214feaf4ea4797fc0d4a906e5e59b75839;hp=44ee6406420e85f261c988f5e8b14f678c90cfe3;hpb=03d3984ecd2c4e7c38b6a62b4b7a81bab69f8d40;p=libs%2Fgl.git diff --git a/source/texture2d.cpp b/source/texture2d.cpp index 44ee6406..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) {