X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Ftexture.cpp;h=a8b2f6d0db3e243a05548e6f452ae8d71fd015f8;hp=185ed7feea582b53194e7a7a61183845b576f065;hb=03de23d42e418f5d7d86c1fbe8665aef1f0a36bd;hpb=ee1da735a016a4df724fb18e60dec6a6f9bf3d6e diff --git a/source/texture.cpp b/source/texture.cpp index 185ed7fe..a8b2f6d0 100644 --- a/source/texture.cpp +++ b/source/texture.cpp @@ -95,11 +95,8 @@ DataType Texture::get_alloc_type(PixelFormat fmt) void Texture::set_internal_format(PixelFormat fmt) { - if(!get_component_size(fmt) && MSP_sized_internal_formats) - { - unsigned size = (fmt==DEPTH_COMPONENT ? get_gl_api()==OPENGL_ES2 ? 2 : 4 : 1); - fmt = get_sized_pixelformat(fmt, size); - } + if(!get_component_size(fmt) && OES_required_internalformat) + fmt = get_default_sized_pixelformat(fmt); FormatSwizzle swiz = NO_SWIZZLE; if(ARB_texture_rg && ARB_texture_swizzle)