Ticket #7669 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

S3TC reported in OpenGL extensions, but not working

Reported by: wolf42 Owned by:
Priority: major Component: 3D support
Version: VirtualBox 3.2.10 Keywords:
Cc: Guest type: Linux
Host type: Windows


VirtualBox's OpenGL driver reports that it supports both GL_ARB_texture_compression and GL_EXT_texture_compression_s3tc, but attempt to load compressed texture results in OpenGL error 1282 (invalid operation).


/* gcc dupa.c `sdl-config --libs --cflags` -lGL */
#include <stdio.h>
#include <SDL.h>
#include <GL/gl.h>
#include <GL/glext.h>

int main()
        int tex;
        char* buf = malloc( 64 * 64 / 2);
        memset( buf, 0, 64 * 64 / 2);

        SDL_Init( SDL_INIT_VIDEO );
        SDL_SetVideoMode( 64, 64, 24, SDL_OPENGL );

        glGenTextures( 1, &tex );
        glBindTexture( GL_TEXTURE_2D, tex );

        printf( "before: %i\n", glGetError() );
        /* glCompressedTexImage2D <- GL_ARB_texture_compression
         * GL_COMPRESSED_RGB_S3TC_DXT1_EXT <- GL_EXT_texture_compression_s3tc
        glCompressedTexImage2D( GL_TEXTURE_2D, 0, GL_COMPRESSED_RGB_S3TC_DXT1_EXT, 64, 64, 0, 64 * 64 / 2, buf );
        printf( "after: %i\n", glGetError() );

        return 0;

Results when run using VirtualBox video driver:

before: 0
after: 1282

Results when run with an external X server:

before: 0
after: 0

VirtualBox video driver:

OpenGL vendor string: Humper
OpenGL renderer string: Chromium
OpenGL version string: 2.1 Chromium 1.9
OpenGL shading language version string: 3.30 NVIDIA via Cg compiler

% glxinfo|grep compress
    GL_EXT_texture_compression_s3tc, GL_EXT_draw_range_elements,
    GL_ARB_texture_compression, GL_ARB_texture_cube_map,

External X server (indirect rendering on win32 host):

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce 9800 GTX/9800 GTX+/PCI/SSE2
OpenGL version string: 1.4 (3.3.0)

% LIBGL_ALWAYS_INDIRECT=1 DISPLAY= glxinfo | grep compress
    GL_ARB_texture_border_clamp, GL_ARB_texture_compression,
    GL_EXT_texture_compression_s3tc, GL_EXT_texture_edge_clamp,

Change History

comment:1 Changed 3 years ago by leonid

Can't reproduce and it appears to be something specific to your configuration, which is totally missing in the ticket (exact guest/host OSes, host gpu, host vm log).

Here're results i get:

leo@leo-ub-vm:~/tickets/7669$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 10.04 LTS
Release:	10.04
Codename:	lucid
leo@leo-ub-vm:~/tickets/7669$ glxinfo|head -21|tail -4
OpenGL vendor string: Humper
OpenGL renderer string: Chromium
OpenGL version string: 2.1 Chromium 1.9
OpenGL shading language version string: 1.50
leo@leo-ub-vm:~/tickets/7669$ glewinfo|grep n_s3tc
GL_EXT_texture_compression_s3tc:                               OK 
leo@leo-ub-vm:~/tickets/7669$ glewinfo|grep 'ARB_texture_compression:'
GL_ARB_texture_compression:                                    OK 
leo@leo-ub-vm:~/tickets/7669$ glxinfo|grep compress
    GL_EXT_texture_compression_s3tc, GL_EXT_draw_range_elements, 
    GL_ARB_texture_border_clamp, GL_ARB_texture_compression, 
leo@leo-ub-vm:~/tickets/7669$ ./a.out 
before: 0
after: 0

comment:2 Changed 3 years ago by wolf42

Looks like it's fixed in VirtualBox 4.0.0.

comment:3 Changed 3 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Thanks for the feedback!

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use