Ignore:
Timestamp:
Feb 9, 2000, 9:51:20 AM (26 years ago)
Author:
jeroen
Message:

* empty log message *

File:
1 edited

Legend:

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

    r2660 r2689  
    1 /* $Id: opengl32.cpp,v 1.3 2000-02-05 15:54:53 sandervl Exp $ */
     1/* $Id: opengl32.cpp,v 1.4 2000-02-09 08:50:54 jeroen Exp $ */
    22/*****************************************************************************/
    33/*                                                                           */
     
    66/*****************************************************************************/
    77#define INCL_BASE
    8 #include <os2.h>
    98#include <os2wrap.h>
    109#include <misc.h>
    1110#include <malloc.h>
    1211#include <memory.h>
     12#include <float.h>
    1313
    1414#include "pglos2.h"
    1515#include "initterm.h"
    1616
    17 HWND WIN32API WindowFromDC(HDC hdc);
    18 HWND          Win32ToOS2Handle(HWND hwnd);
     17HWND    WIN32API WindowFromDC(HDC hdc);
     18HWND             Win32ToOS2Handle(HWND hwnd);
     19HWND             OS2ToWin32Handle(HWND hwnd);
     20LRESULT WIN32API SendMessageA(HWND,ULONG,WPARAM,LPARAM);
    1921
    2022#define PFD_TYPE_RGBA       0
     
    580582  hWnd=Win32ToOS2Handle(WindowFromDC(hdc));
    581583
    582   if(hdc)
     584  if(hWnd)
    583585    OS2pglSwapBuffers(hdc,hWnd);
    584586
    585   return hdc!=NULL;
     587  return hWnd!=NULL;
    586588}
    587589
     
    760762HGC WIN32API wglGetCurrentContext(void)
    761763{
    762   /* FIXME: parameter '0'! */
    763   return OS2pglGetCurrentContext(0);
    764 }
    765 
    766 HDC WIN32API wglGetCurrentDC(void)
    767 {
    768   /* FIXME: parameter '0'! */
    769764  HWND     hwnd;
    770765  PFDINFO *pfdi;
    771766
    772   hwnd=OS2pglGetCurrentWindow(0);
     767  hwnd=OS2ToWin32Handle(OS2pglGetCurrentWindow(WinQueryAnchorBlock(HWND_DESKTOP)));
     768
     769  pfdi=query_pfdi_by_hwnd(hwnd);
     770
     771  if(pfdi)
     772    return pfdi->hgc;
     773
     774  return 0;
     775}
     776
     777HDC WIN32API wglGetCurrentDC(void)
     778{
     779  HWND     hwnd;
     780  PFDINFO *pfdi;
     781
     782  hwnd=OS2ToWin32Handle(OS2pglGetCurrentWindow(WinQueryAnchorBlock(HWND_DESKTOP)));
    773783
    774784  pfdi=query_pfdi_by_hwnd(hwnd);
     
    13461356{
    13471357  OS2glFlush();
     1358
     1359  dprintf(("OPENGL32: glFlush() complete\n"));
    13481360}
    13491361
     
    30283040/*****************************************************************************/
    30293041/*                                                                           */
     3042/* As of yet unsupported gl functions                                        */
     3043/*                                                                           */
     3044/*****************************************************************************/
     3045
     3046void WIN32API glTexImage3D(GLenum target,
     3047                           GLint level,
     3048                           GLint component,
     3049                           GLsizei width,
     3050                           GLsizei height,
     3051                           GLsizei depth,
     3052                           GLint border,
     3053                           GLenum format,
     3054                           GLenum type,
     3055                           const GLvoid *pixels)
     3056{
     3057  dprintf(("OPENGL32: glTexImage3D - not implemented\n"));
     3058}
     3059
     3060/*****************************************************************************/
     3061/*                                                                           */
    30303062/* Module Internal init and cleanup - called by initterm                     */
    30313063/*                                                                           */
     
    30373069  /* store them. All indexes returned are based upon this list!        */
    30383070  dprintf(("OPENGL32: INIT\n"));
     3071
     3072  _control87(EM_UNDERFLOW,EM_UNDERFLOW);
     3073  _control87(EM_OVERFLOW,EM_OVERFLOW);
    30393074
    30403075  DosCreateMutexSem(NULL,&hmtxPfdInfo,0,0);
     
    30613096  pfdi_destroy_all();
    30623097
    3063   if(global_visual_config_list)
    3064     free(global_visual_config_list);
    3065 
    30663098  DosCloseMutexSem(hmtxPfdInfo);
    30673099
     3100  _control87(0,EM_UNDERFLOW);
     3101  _control87(0,EM_OVERFLOW);
     3102
    30683103  dprintf(("OPENGL32 TERM\n"));
    30693104}
Note: See TracChangeset for help on using the changeset viewer.