VirtualBox

Changeset 3419 in vbox for trunk/src/VBox/Additions/WINNT


Ignore:
Timestamp:
Jul 4, 2007 3:51:30 PM (17 years ago)
Author:
vboxsync
Message:

Don't export wgl functions by default

Location:
trunk/src/VBox/Additions/WINNT/Graphics/OpenGL
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/OpenGL/OGLComplexSync.cpp

    r3413 r3419  
    6464}
    6565
    66 /* Test export for directly linking with vboxogl.dll */
    67 HGLRC WINAPI wglCreateContext(HDC hdc)
    68 {
    69     return DrvCreateContext(hdc);
    70 }
    71 
    7266HGLRC APIENTRY DrvCreateLayerContext(HDC hdc, int iLayerPlane)
    7367{
     
    117111}
    118112
     113int APIENTRY DrvGetLayerPaletteEntries(HDC hdc, int iLayerPlane,
     114                                       int iStart, int cEntries,
     115                                       COLORREF *pcr)
     116{
     117    VBOX_OGL_GEN_SYNC_OP5_PASS_PTR_RET(int, DrvGetLayerPaletteEntries, hdc, iLayerPlane, iStart, cEntries, sizeof(COLORREF)*cEntries, pcr);
     118    return retval;
     119}
     120
     121int APIENTRY DrvDescribePixelFormat(HDC hdc, int iPixelFormat, UINT nBytes, LPPIXELFORMATDESCRIPTOR ppfd)
     122{
     123    /* if ppfd == NULL, then DrvDescribelayerPlane returns the maximum nr of supported pixel formats */
     124    VBOX_OGL_GEN_SYNC_OP4_PASS_PTR_RET(int, DrvDescribePixelFormat, hdc, iPixelFormat, nBytes, nBytes, ppfd);
     125    return retval;
     126}
     127
     128#ifdef VBOX_WITH_WGL_EXPORTS
    119129/* Test export for directly linking with vboxogl.dll */
     130int WINAPI wglDescribePixelFormat(HDC hdc, int iPixelFormat, UINT nBytes, LPPIXELFORMATDESCRIPTOR ppfd)
     131{
     132    return DrvDescribePixelFormat(hdc, iPixelFormat, nBytes, ppfd);
     133}
     134
    120135BOOL WINAPI wglDescribeLayerPlane(HDC hdc,int iPixelFormat,
    121136                                  int iLayerPlane, UINT nBytes,
     
    125140}
    126141
    127 int APIENTRY DrvGetLayerPaletteEntries(HDC hdc, int iLayerPlane,
    128                                        int iStart, int cEntries,
    129                                        COLORREF *pcr)
    130 {
    131     VBOX_OGL_GEN_SYNC_OP5_PASS_PTR_RET(int, DrvGetLayerPaletteEntries, hdc, iLayerPlane, iStart, cEntries, sizeof(COLORREF)*cEntries, pcr);
    132     return retval;
    133 }
    134 
    135 /* Test export for directly linking with vboxogl.dll */
    136142int WINAPI wglGetLayerPaletteEntries(HDC hdc, int iLayerPlane,
    137143                                     int iStart, int cEntries,
     
    141147}
    142148
    143 int APIENTRY DrvDescribePixelFormat(HDC hdc, int iPixelFormat, UINT nBytes, LPPIXELFORMATDESCRIPTOR ppfd)
    144 {
    145     /* if ppfd == NULL, then DrvDescribelayerPlane returns the maximum nr of supported pixel formats */
    146     VBOX_OGL_GEN_SYNC_OP4_PASS_PTR_RET(int, DrvDescribePixelFormat, hdc, iPixelFormat, nBytes, nBytes, ppfd);
    147     return retval;
    148 }
    149 
    150 /* Test export for directly linking with vboxogl.dll */
    151 int WINAPI wglDescribePixelFormat(HDC hdc, int iPixelFormat, UINT nBytes, LPPIXELFORMATDESCRIPTOR ppfd)
    152 {
    153     return DrvDescribePixelFormat(hdc, iPixelFormat, nBytes, ppfd);
    154 }
     149HGLRC WINAPI wglCreateContext(HDC hdc)
     150{
     151    return DrvCreateContext(hdc);
     152}
     153
     154#endif
    155155
    156156void APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
  • trunk/src/VBox/Additions/WINNT/Graphics/OpenGL/OGLSimpleSync.cpp

    r3413 r3419  
    3030}
    3131
    32 /* Test export for directly linking with vboxogl.dll */
    33 BOOL WINAPI wglDeleteContext(HGLRC hglrc)
    34 {
    35     return DrvDeleteContext(hglrc);
    36 }
    37 
    3832BOOL APIENTRY DrvCopyContext(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask)
    3933{
     
    4236}
    4337
    44 /* Test export for directly linking with vboxogl.dll */
    45 BOOL WINAPI wglCopyContext(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask)
    46 {
    47     return DrvCopyContext(hglrcSrc, hglrcDst, mask);
    48 }
    49 
    5038void APIENTRY DrvReleaseContext(HGLRC hglrc)
    5139{
     
    5745    VBOX_OGL_GEN_SYNC_OP2_RET(BOOL, DrvShareLists, hglrc1, hglrc2);
    5846    return retval;
    59 }
    60 
    61 BOOL WINAPI wglShareLists(HGLRC hglrc1, HGLRC hglrc2)
    62 {
    63     return DrvShareLists(hglrc1, hglrc2);
    6447}
    6548
     
    7255}
    7356
     57
     58BOOL APIENTRY DrvRealizeLayerPalette(HDC hdc, int iLayerPlane, BOOL bRealize)
     59{
     60    VBOX_OGL_GEN_SYNC_OP3_RET(BOOL, DrvRealizeLayerPalette, hdc, iLayerPlane, bRealize);
     61    return retval;
     62}
     63
     64BOOL APIENTRY DrvSwapLayerBuffers(HDC hdc, UINT fuPlanes)
     65{
     66    VBOX_OGL_GEN_SYNC_OP2_RET(BOOL, DrvSwapLayerBuffers, hdc, fuPlanes);
     67    return retval;
     68}
     69
     70BOOL APIENTRY DrvSetPixelFormat(HDC hdc, int iPixelFormat)
     71{
     72    VBOX_OGL_GEN_SYNC_OP2_RET(BOOL, DrvSetPixelFormat, hdc, iPixelFormat);
     73    return retval;
     74}
     75
     76BOOL APIENTRY DrvSwapBuffers(HDC hdc)
     77{
     78    VBOX_OGL_GEN_SYNC_OP1_RET(BOOL, DrvSwapBuffers, hdc);
     79    return retval;
     80}
     81
     82#ifdef VBOX_WITH_WGL_EXPORTS
    7483/* Test export for directly linking with vboxogl.dll */
    7584int WINAPI wglSetLayerPaletteEntries(HDC hdc, int iLayerPlane,
     
    8089}
    8190
    82 BOOL APIENTRY DrvRealizeLayerPalette(HDC hdc, int iLayerPlane, BOOL bRealize)
    83 {
    84     VBOX_OGL_GEN_SYNC_OP3_RET(BOOL, DrvRealizeLayerPalette, hdc, iLayerPlane, bRealize);
    85     return retval;
    86 }
    87 
    88 /* Test export for directly linking with vboxogl.dll */
     91BOOL WINAPI wglSetPixelFormat(HDC hdc, int iPixelFormat)
     92{
     93    return DrvSetPixelFormat(hdc, iPixelFormat);
     94}
     95
    8996BOOL WINAPI wglRealizeLayerPalette(HDC hdc, int iLayerPlane, BOOL bRealize)
    9097{
     
    9299}
    93100
    94 BOOL APIENTRY DrvSwapLayerBuffers(HDC hdc, UINT fuPlanes)
    95 {
    96     VBOX_OGL_GEN_SYNC_OP2_RET(BOOL, DrvSwapLayerBuffers, hdc, fuPlanes);
    97     return retval;
    98 }
    99 
    100 /* Test export for directly linking with vboxogl.dll */
     101BOOL WINAPI wglDeleteContext(HGLRC hglrc)
     102{
     103    return DrvDeleteContext(hglrc);
     104}
     105
    101106BOOL WINAPI wglSwapLayerBuffers(HDC hdc, UINT fuPlanes)
    102107{
     
    104109}
    105110
    106 BOOL APIENTRY DrvSetPixelFormat(HDC hdc, int iPixelFormat)
    107 {
    108     VBOX_OGL_GEN_SYNC_OP2_RET(BOOL, DrvSetPixelFormat, hdc, iPixelFormat);
    109     return retval;
    110 }
    111 
    112 /* Test export for directly linking with vboxogl.dll */
    113 BOOL WINAPI wglSetPixelFormat(HDC hdc, int iPixelFormat)
    114 {
    115     return DrvSetPixelFormat(hdc, iPixelFormat);
    116 }
    117 
    118 BOOL APIENTRY DrvSwapBuffers(HDC hdc)
    119 {
    120     VBOX_OGL_GEN_SYNC_OP1_RET(BOOL, DrvSwapBuffers, hdc);
    121     return retval;
    122 }
    123 
    124 /* Test export for directly linking with vboxogl.dll */
    125111BOOL WINAPI SwapBuffers(HDC hdc)
    126112{
    127113    return DrvSwapBuffers(hdc);
    128114}
     115
     116BOOL WINAPI wglCopyContext(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask)
     117{
     118    return DrvCopyContext(hglrcSrc, hglrcDst, mask);
     119}
     120
     121BOOL WINAPI wglShareLists(HGLRC hglrc1, HGLRC hglrc2)
     122{
     123    return DrvShareLists(hglrc1, hglrc2);
     124}
     125#endif
    129126
    130127/* OpenGL functions */
  • trunk/src/VBox/Additions/WINNT/Graphics/OpenGL/VBoxOGL.def

    r3414 r3419  
    379379
    380380; test exports
    381     wglCreateContext
    382     wglMakeCurrent
    383     wglDeleteContext
    384     SwapBuffers
    385 
    386     wglGetProcAddress
    387     wglDescribeLayerPlane
    388     wglGetLayerPaletteEntries
    389     wglDescribePixelFormat
    390     wglCopyContext
    391     wglShareLists
    392     wglSetLayerPaletteEntries
    393     wglRealizeLayerPalette
    394     wglSwapLayerBuffers
    395     wglSetPixelFormat
     381;    wglCreateContext
     382;    wglMakeCurrent
     383;    wglDeleteContext
     384;    SwapBuffers
     385
     386;    wglGetProcAddress
     387;    wglDescribeLayerPlane
     388;    wglGetLayerPaletteEntries
     389;    wglDescribePixelFormat
     390;    wglCopyContext
     391;    wglShareLists
     392;    wglSetLayerPaletteEntries
     393;    wglRealizeLayerPalette
     394;    wglSwapLayerBuffers
     395;    wglSetPixelFormat
  • trunk/src/VBox/Additions/WINNT/Graphics/OpenGL/drv.cpp

    r3413 r3419  
    7676}
    7777
    78 /* Test export for directly linking with vboxogl.dll */
    79 PROC WINAPI wglGetProcAddress(LPCSTR lpszProc)
    80 {
    81     return DrvGetProcAddress(lpszProc);
    82 }
    83 
    8478BOOL APIENTRY DrvValidateVersion(DWORD version)
    8579{
     
    9892}
    9993
     94#ifdef VBOX_WITH_WGL_EXPORTS
    10095/* Test export for directly linking with vboxogl.dll */
    10196BOOL WINAPI wglMakeCurrent(HDC hdc, HGLRC hglrc)
     
    10499    return TRUE;
    105100}
     101
     102PROC WINAPI wglGetProcAddress(LPCSTR lpszProc)
     103{
     104    return DrvGetProcAddress(lpszProc);
     105}
     106#endif
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette