Ignore:
Timestamp:
Jan 27, 2000, 12:20:00 AM (26 years ago)
Author:
sandervl
Message:

YD's makefile changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gdi32/opengl.cpp

    r526 r2526  
    1 /* $Id: opengl.cpp,v 1.4 1999-08-17 13:28:36 phaller Exp $ */
     1/* $Id: opengl.cpp,v 1.5 2000-01-26 23:19:55 sandervl Exp $ */
    22
    33/*
     
    3333typedef BOOL (* WIN32API SETPIXELFMT) (HDC, int, CONST PIXELFORMATDESCRIPTOR *);
    3434typedef BOOL (* WIN32API SWAPBUFFERS) (HDC hdc);
     35// JVDH MOD STARTS
     36typedef int  (* WIN32API DESCRIBEPIXELFMT) (HDC, int, UINT, LPPIXELFORMATDESCRIPTOR);
     37// JVDH MOD ENDS
    3538
    3639
     
    3942 ****************************************************************************/
    4043
    41 static CHOOSEPIXELFMT glChoosePixelFormat = NULL;
    42 static SETPIXELFMT    glSetPixelFormat    = NULL;
    43 static SWAPBUFFERS    glSwapBuffers       = NULL;
    44 static HINSTANCE      hOpenGL             = NULL;
     44static CHOOSEPIXELFMT    glChoosePixelFormat   = NULL;
     45static SETPIXELFMT       glSetPixelFormat      = NULL;
     46static SWAPBUFFERS       glSwapBuffers         = NULL;
     47// JVDH MOD STARTS
     48static DESCRIBEPIXELFMT  glDescribePixelFormat = NULL;
     49// JVDH MOD ENDS
     50static HINSTANCE         hOpenGL               = NULL;
    4551
    4652
     
    8490  }
    8591
    86   return(TRUE); /* OpenGL is initialized and enabled */
     92// JVDH MOD STARTS
     93  if(glDescribePixelFormat == NULL) {
     94        glDescribePixelFormat = (DESCRIBEPIXELFMT)O32_GetProcAddress(hOpenGL, "OS2wglDescribePixelFormat");
     95        if(glDescribePixelFormat == NULL)
     96                return(FALSE);
     97  }
     98// JVDH MOD ENDS
     99
     100  return(TRUE);                        /* OpenGL is initialized and enabled*/
    87101}
    88102
     
    110124
    111125  return(glChoosePixelFormat(hdc, pformat));
     126}
     127
     128ODINFUNCTION4(int,DescribePixelFormat,HDC,hdc,
     129                                      int,iFormat,
     130                                      UINT,nBytes,
     131                                      LPPIXELFORMATDESCRIPTOR,pformat)
     132{
     133  if (glDescribePixelFormat == NULL)
     134    if (internalOpenGLEnable() == FALSE)
     135      return(0);
     136
     137  return(glDescribePixelFormat(hdc, iFormat, nBytes, pformat));
    112138}
    113139
Note: See TracChangeset for help on using the changeset viewer.