Edit

kc3-lang/angle/util/windows/wgl_loader_autogen.cpp

Branch :

  • Show log

    Commit

  • Author : Jamie Madill
    Date : 2019-01-03 15:24:22
    Hash : 1f56ed2a
    Message : Add WGLWindow and WGL test configs. WGLWindow lets us use a Windows driver's bindings instead of ANGLE. This only works if the underlying driver supports OpenGL ES compatibility. Also adds the WGL headers, WGL XML, and a specialized WGL loader. Because of a small driver issue with NVIDIA I added a retry for the WGL Window initialization. Bug: angleproject:2995 Change-Id: Ie5148ece470dd03df33015f4919ad1fa79a859ec Reviewed-on: https://chromium-review.googlesource.com/c/1366021 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>

  • util/windows/wgl_loader_autogen.cpp
  • // GENERATED FILE - DO NOT EDIT.
    // Generated by generate_loader.py using data from wgl.xml.
    //
    // Copyright 2019 The ANGLE Project Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style license that can be
    // found in the LICENSE file.
    //
    // wgl_loader_autogen.cpp:
    //   Simple WGL function loader.
    
    #include "wgl_loader_autogen.h"
    
    PFNCHOOSEPIXELFORMATPROC _ChoosePixelFormat;
    PFNDESCRIBEPIXELFORMATPROC _DescribePixelFormat;
    PFNGETENHMETAFILEPIXELFORMATPROC _GetEnhMetaFilePixelFormat;
    PFNGETPIXELFORMATPROC _GetPixelFormat;
    PFNSETPIXELFORMATPROC _SetPixelFormat;
    PFNSWAPBUFFERSPROC _SwapBuffers;
    PFNWGLCOPYCONTEXTPROC _wglCopyContext;
    PFNWGLCREATECONTEXTPROC _wglCreateContext;
    PFNWGLCREATELAYERCONTEXTPROC _wglCreateLayerContext;
    PFNWGLDELETECONTEXTPROC _wglDeleteContext;
    PFNWGLDESCRIBELAYERPLANEPROC _wglDescribeLayerPlane;
    PFNWGLGETCURRENTCONTEXTPROC _wglGetCurrentContext;
    PFNWGLGETCURRENTDCPROC _wglGetCurrentDC;
    PFNWGLGETLAYERPALETTEENTRIESPROC _wglGetLayerPaletteEntries;
    PFNWGLGETPROCADDRESSPROC _wglGetProcAddress;
    PFNWGLMAKECURRENTPROC _wglMakeCurrent;
    PFNWGLREALIZELAYERPALETTEPROC _wglRealizeLayerPalette;
    PFNWGLSETLAYERPALETTEENTRIESPROC _wglSetLayerPaletteEntries;
    PFNWGLSHARELISTSPROC _wglShareLists;
    PFNWGLSWAPLAYERBUFFERSPROC _wglSwapLayerBuffers;
    PFNWGLUSEFONTBITMAPSPROC _wglUseFontBitmaps;
    PFNWGLUSEFONTBITMAPSAPROC _wglUseFontBitmapsA;
    PFNWGLUSEFONTBITMAPSWPROC _wglUseFontBitmapsW;
    PFNWGLUSEFONTOUTLINESPROC _wglUseFontOutlines;
    PFNWGLUSEFONTOUTLINESAPROC _wglUseFontOutlinesA;
    PFNWGLUSEFONTOUTLINESWPROC _wglUseFontOutlinesW;
    PFNWGLCREATECONTEXTATTRIBSARBPROC _wglCreateContextAttribsARB;
    PFNWGLGETEXTENSIONSSTRINGARBPROC _wglGetExtensionsStringARB;
    PFNWGLGETSWAPINTERVALEXTPROC _wglGetSwapIntervalEXT;
    PFNWGLSWAPINTERVALEXTPROC _wglSwapIntervalEXT;
    
    namespace angle
    {
    void LoadWGL(LoadProc loadProc)
    {
        _ChoosePixelFormat = reinterpret_cast<PFNCHOOSEPIXELFORMATPROC>(loadProc("ChoosePixelFormat"));
        _DescribePixelFormat =
            reinterpret_cast<PFNDESCRIBEPIXELFORMATPROC>(loadProc("DescribePixelFormat"));
        _GetEnhMetaFilePixelFormat =
            reinterpret_cast<PFNGETENHMETAFILEPIXELFORMATPROC>(loadProc("GetEnhMetaFilePixelFormat"));
        _GetPixelFormat   = reinterpret_cast<PFNGETPIXELFORMATPROC>(loadProc("GetPixelFormat"));
        _SetPixelFormat   = reinterpret_cast<PFNSETPIXELFORMATPROC>(loadProc("SetPixelFormat"));
        _SwapBuffers      = reinterpret_cast<PFNSWAPBUFFERSPROC>(loadProc("SwapBuffers"));
        _wglCopyContext   = reinterpret_cast<PFNWGLCOPYCONTEXTPROC>(loadProc("wglCopyContext"));
        _wglCreateContext = reinterpret_cast<PFNWGLCREATECONTEXTPROC>(loadProc("wglCreateContext"));
        _wglCreateLayerContext =
            reinterpret_cast<PFNWGLCREATELAYERCONTEXTPROC>(loadProc("wglCreateLayerContext"));
        _wglDeleteContext = reinterpret_cast<PFNWGLDELETECONTEXTPROC>(loadProc("wglDeleteContext"));
        _wglDescribeLayerPlane =
            reinterpret_cast<PFNWGLDESCRIBELAYERPLANEPROC>(loadProc("wglDescribeLayerPlane"));
        _wglGetCurrentContext =
            reinterpret_cast<PFNWGLGETCURRENTCONTEXTPROC>(loadProc("wglGetCurrentContext"));
        _wglGetCurrentDC = reinterpret_cast<PFNWGLGETCURRENTDCPROC>(loadProc("wglGetCurrentDC"));
        _wglGetLayerPaletteEntries =
            reinterpret_cast<PFNWGLGETLAYERPALETTEENTRIESPROC>(loadProc("wglGetLayerPaletteEntries"));
        _wglGetProcAddress = reinterpret_cast<PFNWGLGETPROCADDRESSPROC>(loadProc("wglGetProcAddress"));
        _wglMakeCurrent    = reinterpret_cast<PFNWGLMAKECURRENTPROC>(loadProc("wglMakeCurrent"));
        _wglRealizeLayerPalette =
            reinterpret_cast<PFNWGLREALIZELAYERPALETTEPROC>(loadProc("wglRealizeLayerPalette"));
        _wglSetLayerPaletteEntries =
            reinterpret_cast<PFNWGLSETLAYERPALETTEENTRIESPROC>(loadProc("wglSetLayerPaletteEntries"));
        _wglShareLists = reinterpret_cast<PFNWGLSHARELISTSPROC>(loadProc("wglShareLists"));
        _wglSwapLayerBuffers =
            reinterpret_cast<PFNWGLSWAPLAYERBUFFERSPROC>(loadProc("wglSwapLayerBuffers"));
        _wglUseFontBitmaps = reinterpret_cast<PFNWGLUSEFONTBITMAPSPROC>(loadProc("wglUseFontBitmaps"));
        _wglUseFontBitmapsA =
            reinterpret_cast<PFNWGLUSEFONTBITMAPSAPROC>(loadProc("wglUseFontBitmapsA"));
        _wglUseFontBitmapsW =
            reinterpret_cast<PFNWGLUSEFONTBITMAPSWPROC>(loadProc("wglUseFontBitmapsW"));
        _wglUseFontOutlines =
            reinterpret_cast<PFNWGLUSEFONTOUTLINESPROC>(loadProc("wglUseFontOutlines"));
        _wglUseFontOutlinesA =
            reinterpret_cast<PFNWGLUSEFONTOUTLINESAPROC>(loadProc("wglUseFontOutlinesA"));
        _wglUseFontOutlinesW =
            reinterpret_cast<PFNWGLUSEFONTOUTLINESWPROC>(loadProc("wglUseFontOutlinesW"));
        _wglCreateContextAttribsARB =
            reinterpret_cast<PFNWGLCREATECONTEXTATTRIBSARBPROC>(loadProc("wglCreateContextAttribsARB"));
        _wglGetExtensionsStringARB =
            reinterpret_cast<PFNWGLGETEXTENSIONSSTRINGARBPROC>(loadProc("wglGetExtensionsStringARB"));
        _wglGetSwapIntervalEXT =
            reinterpret_cast<PFNWGLGETSWAPINTERVALEXTPROC>(loadProc("wglGetSwapIntervalEXT"));
        _wglSwapIntervalEXT =
            reinterpret_cast<PFNWGLSWAPINTERVALEXTPROC>(loadProc("wglSwapIntervalEXT"));
    }
    }  // namespace angle