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

JvdH's opengl changes

File:
1 edited

Legend:

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

    r2526 r2527  
    1 /* $Id: opengl.cpp,v 1.5 2000-01-26 23:19:55 sandervl Exp $ */
     1/* $Id: opengl.cpp,v 1.6 2000-01-26 23:48:03 sandervl Exp $ */
    22
    33/*
     
    3333typedef BOOL (* WIN32API SETPIXELFMT) (HDC, int, CONST PIXELFORMATDESCRIPTOR *);
    3434typedef BOOL (* WIN32API SWAPBUFFERS) (HDC hdc);
    35 // JVDH MOD STARTS
    3635typedef int  (* WIN32API DESCRIBEPIXELFMT) (HDC, int, UINT, LPPIXELFORMATDESCRIPTOR);
    37 // JVDH MOD ENDS
     36typedef int  (* WIN32API GETPIXELFMT) (HDC);
    3837
    3938
     
    4544static SETPIXELFMT       glSetPixelFormat      = NULL;
    4645static SWAPBUFFERS       glSwapBuffers         = NULL;
    47 // JVDH MOD STARTS
    4846static DESCRIBEPIXELFMT  glDescribePixelFormat = NULL;
    49 // JVDH MOD ENDS
     47static GETPIXELFMT       glGetPixelFormat      = NULL;
    5048static HINSTANCE         hOpenGL               = NULL;
    5149
     
    9088  }
    9189
    92 // JVDH MOD STARTS
    9390  if(glDescribePixelFormat == NULL) {
    9491        glDescribePixelFormat = (DESCRIBEPIXELFMT)O32_GetProcAddress(hOpenGL, "OS2wglDescribePixelFormat");
     
    9693                return(FALSE);
    9794  }
    98 // JVDH MOD ENDS
     95
     96  if(glGetPixelFormat == NULL) {
     97        glGetPixelFormat = (GETPIXELFMT)O32_GetProcAddress(hOpenGL, "OS2wglGetPixelFormat");
     98        if(glGetPixelFormat == NULL)
     99                return(FALSE);
     100  }
    99101
    100102  return(TRUE);                        /* OpenGL is initialized and enabled*/
     
    117119                                    CONST PIXELFORMATDESCRIPTOR*,pformat)
    118120{
    119   //@@@PH: ?? return(1);
    120 
    121121  if (glChoosePixelFormat == NULL)
    122122    if (internalOpenGLEnable() == FALSE)
     
    138138}
    139139
     140ODINFUNCTION1(int,GetPixelFormat,HDC,hdc)
     141{
     142  if (glGetPixelFormat == NULL)
     143    if (internalOpenGLEnable() == FALSE)
     144      return(0);
     145
     146  return(glGetPixelFormat(hdc));
     147}
    140148
    141149/*****************************************************************************
Note: See TracChangeset for help on using the changeset viewer.