[AD] OpenGL 3.0 fails on Windows

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


al_create_display() fails when the ALLEGRO_OPENGL_3_0 flag is used on Windows.
I am building the examples/ex_shader.cpp program with the following 
modification:

   display_flags = ALLEGRO_OPENGL | ALLEGRO_OPENGL_3_0 |
                   ALLEGRO_OPENGL_FORWARD_COMPATIBLE;

After linking with the debug libraries the allegro.log shows these errors:

    display  E    wgl_disp.c:711  get_available_pixel_formats_ext  [   0.3711
2] WGL_ARB/EXT_pf not supported.
    display  I    wgl_disp.c:785  get_available_pixel_formats_old  [   0.4048
8] Got 100 visuals.
    ...
    display  I    wgl_disp.c:811  get_available_pixel_formats_old  [   0.4336
8] 44 visuals are good enough.
   display  I    wgl_disp.c:852  select_pixel_format              [   0.4385
5] Chose visual no. 1
    ...
    display  E    wgl_disp.c:943  create_display_internals         [   
0.45363] Unable to create a render context! Invalid handle.
    display  I     wgl_disp.c:1310 display_thread_proc              [   
0.46417] wgl display thread exits
    display  E    display.c:55   al_create_display                [   0.46502] 
Failed to create display (NULL)

I am using the allegro-x86_64-w64-mingw32-gcc-10.2.0-posix-seh-
static-5.2.7.0.zip SDK.  The example fails this way when running on Windows 7 
and with Wine on Linux.  It runs fine in both environments when only 
ALLEGRO_OPENGL is used.  I do not have a Windows 10 machine to test on. 

Is there an Allegro test or example specifically for OpenGL 3.0?

-Karl






Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/