Changeset 2527


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

JvdH's opengl changes

Location:
trunk/src/gdi32
Files:
2 edited

Legend:

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

    r2526 r2527  
    1 /* $Id: gdi32.cpp,v 1.32 2000-01-26 23:19:55 sandervl Exp $ */
     1/* $Id: gdi32.cpp,v 1.33 2000-01-26 23:48:02 sandervl Exp $ */
    22
    33/*
     
    670670
    671671    rc = O32_CreateBitmap(nWidth, nHeight, cPlanes, cBitsPerPel, lpvBits);
    672     dprintf(("GDI32: CreateBitmap (%d,%d) bps %d returned %x\n", nWidth, nHeight, cBitsPerPel, rc));
     672    dprintf(("GDI32: CreateBitmap (%d,%d) bps %d returned %d\n", nWidth, nHeight, cBitsPerPel, rc));
    673673    return(rc);
    674674}
     
    24062406}
    24072407//******************************************************************************
     2408
    24082409//******************************************************************************
    24092410BOOL WIN32API SetObjectOwner( HGDIOBJ arg1, int arg2 )
     
    31373138}
    31383139
    3139 
    3140 /*****************************************************************************
    3141  * Name      : int GetPixelFormat
    3142  * Purpose   : The GetPixelFormat function obtains the index of the specified
    3143  *             device context's currently selected pixel format.
    3144  * Parameters: HDC  hdc   handle of device context
    3145  * Variables :
    3146  * Result    : 0 / 1
    3147  * Remark    :
    3148  * Status    : UNTESTED STUB
    3149  *
    3150  * Author    : Patrick Haller [Mon, 1998/06/15 08:00]
    3151  *****************************************************************************/
    3152 
    3153 int WIN32API GetPixelFormat(HDC hdc)
    3154 {
    3155   dprintf(("GDI32: GetPixelFormat(%08xh) not implemented.\n",
    3156            hdc));
    3157 
    3158   return (0);
    3159 }
    3160 
    3161 
    31623140/*****************************************************************************
    31633141 * Name      : BOOL SetDeviceGammaRamp
  • TabularUnified 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.