⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qgl_win.pas

📁 雷神之锤2(Quake2)Delphi源码
💻 PAS
📖 第 1 页 / 共 5 页
字号:
// PLEASE, don't modify this file
// 95% complete

{----------------------------------------------------------------------------}
{                                                                            }
{ File(s): QGL_WIN.C                                                         }
{                                                                            }
{ Initial conversion by : YgriK (Igor Karpov) - glYgriK@hotbox.ru            }
{ Initial conversion on : 18-Jan-2002                                        }
{                                                                            }
{ This File contains part of convertion of Quake2 source to ObjectPascal.    }
{ More information about this project can be found at:                       }
{ http://www.sulaco.co.za/quake2/                                            }
{                                                                            }
{ Copyright (C) 1997-2001 Id Software, Inc.                                  }
{                                                                            }
{ This program is free software; you can redistribute it and/or              }
{ modify it under the terms of the GNU General Public License                }
{ as published by the Free Software Foundation; either version 2             }
{ of the License, or (at your option) any later version.                     }
{                                                                            }
{ This program is distributed in the hope that it will be useful,            }
{ but WITHOUT ANY WARRANTY; without even the implied warranty of             }
{ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                       }
{                                                                            }
{ See the GNU General Public License for more details.                       }
{                                                                            }
{----------------------------------------------------------------------------}
{ Updated on :                                                               }
{ Updated by :                                                               }
{                                                                            }
{----------------------------------------------------------------------------}
{ * Still dependent (to compile correctly) on:                               }
{ 1) unit GL.pas - standard OpenGL unit                                      }
{ 2) unit q_shared.pas                                                       }
{ 3) unit glw_win.pas                                                        }
{                                                                            }
{ .) ??? unit ref.pas                                                        }
{                                                                            }
{ 1) inc  qgl_win_GL.inc                                                     }
{                                                                            }
{----------------------------------------------------------------------------}
{ * TODO:                                                                    }
{ 1) Do more tests                                                           }
{                                                                            }
{----------------------------------------------------------------------------}


{*
** QGL_WIN.C
**
** This file implements the operating system binding of GL to QGL function
** pointers.  When doing a port of Quake2 you must implement the following
** two functions:
**
** QGL_Init() - loads libraries, assigns function pointers, etc.
** QGL_Shutdown() - unloads libraries, NULLs function pointers
*}


unit qgl_win;  //336 glProc

interface

uses Windows, SysUtils,
     GL,
     q_shared, glw_win{, gl_local};

procedure QGL_Shutdown;
function QGL_Init (const dllname : PChar) : qboolean;
procedure GLimp_EnableLogging (enable : qboolean);
procedure GLimp_LogNewFrame;

{$I qgl_win_GL_int.inc}  //Xxx_int - interface

implementation


(*
#include <float.h>
#include "../ref_gl/gl_local.h"
#include "glw_win.h"
*)
uses ref, gl_local;
var
  ri : refimport_t; //???ref
  gl_config : glconfig_t; //gl_local OR gl_rmain



{$I qgl_win_GL_imp.inc}  //Xxx_imp - implementation


{*
** QGL_Shutdown
**
** Unloads the specified DLL then nulls out all the proc pointers.
*}
procedure QGL_Shutdown;
begin
  if (glw_state.hinstOpenGL <>0) then
   begin
     FreeLibrary (glw_state.hinstOpenGL);
//{Y}     glw_state.hinstOpenGL := 0;
   end;

  glw_state.hinstOpenGL := 0;

  qglAccum                   := Nil;
  qglAlphaFunc               := Nil;
  qglAreTexturesResident     := Nil;
  qglArrayElement            := Nil;
  qglBegin                   := Nil;
  qglBindTexture             := Nil;
  qglBitmap                  := Nil;
  qglBlendFunc               := Nil;
  qglCallList                := Nil;
  qglCallLists               := Nil;
  qglClear                   := Nil;
  qglClearAccum              := Nil;
  qglClearColor              := Nil;
  qglClearDepth              := Nil;
  qglClearIndex              := Nil;
  qglClearStencil            := Nil;
  qglClipPlane               := Nil;
  qglColor3b                 := Nil;
  qglColor3bv                := Nil;
  qglColor3d                 := Nil;
  qglColor3dv                := Nil;
  qglColor3f                 := Nil;
  qglColor3fv                := Nil;
  qglColor3i                 := Nil;
  qglColor3iv                := Nil;
  qglColor3s                 := Nil;
  qglColor3sv                := Nil;
  qglColor3ub                := Nil;
  qglColor3ubv               := Nil;
  qglColor3ui                := Nil;
  qglColor3uiv               := Nil;
  qglColor3us                := Nil;
  qglColor3usv               := Nil;
  qglColor4b                 := Nil;
  qglColor4bv                := Nil;
  qglColor4d                 := Nil;
  qglColor4dv                := Nil;
  qglColor4f                 := Nil;
  qglColor4fv                := Nil;
  qglColor4i                 := Nil;
  qglColor4iv                := Nil;
  qglColor4s                 := Nil;
  qglColor4sv                := Nil;
  qglColor4ub                := Nil;
  qglColor4ubv               := Nil;
  qglColor4ui                := Nil;
  qglColor4uiv               := Nil;
  qglColor4us                := Nil;
  qglColor4usv               := Nil;
  qglColorMask               := Nil;
  qglColorMaterial           := Nil;
  qglColorPointer            := Nil;
  qglCopyPixels              := Nil;
  qglCopyTexImage1D          := Nil;
  qglCopyTexImage2D          := Nil;
  qglCopyTexSubImage1D       := Nil;
  qglCopyTexSubImage2D       := Nil;
  qglCullFace                := Nil;
  qglDeleteLists             := Nil;
  qglDeleteTextures          := Nil;
  qglDepthFunc               := Nil;
  qglDepthMask               := Nil;
  qglDepthRange              := Nil;
  qglDisable                 := Nil;
  qglDisableClientState      := Nil;
  qglDrawArrays              := Nil;
  qglDrawBuffer              := Nil;
  qglDrawElements            := Nil;
  qglDrawPixels              := Nil;
  qglEdgeFlag                := Nil;
  qglEdgeFlagPointer         := Nil;
  qglEdgeFlagv               := Nil;
  qglEnable                  := Nil;
  qglEnableClientState       := Nil;
  qglEnd                     := Nil;
  qglEndList                 := Nil;
  qglEvalCoord1d             := Nil;
  qglEvalCoord1dv            := Nil;
  qglEvalCoord1f             := Nil;
  qglEvalCoord1fv            := Nil;
  qglEvalCoord2d             := Nil;
  qglEvalCoord2dv            := Nil;
  qglEvalCoord2f             := Nil;
  qglEvalCoord2fv            := Nil;
  qglEvalMesh1               := Nil;
  qglEvalMesh2               := Nil;
  qglEvalPoint1              := Nil;
  qglEvalPoint2              := Nil;
  qglFeedbackBuffer          := Nil;
  qglFinish                  := Nil;
  qglFlush                   := Nil;
  qglFogf                    := Nil;
  qglFogfv                   := Nil;
  qglFogi                    := Nil;
  qglFogiv                   := Nil;
  qglFrontFace               := Nil;
  qglFrustum                 := Nil;
  qglGenLists                := Nil;
  qglGenTextures             := Nil;
  qglGetBooleanv             := Nil;
  qglGetClipPlane            := Nil;
  qglGetDoublev              := Nil;
  qglGetError                := Nil;
  qglGetFloatv               := Nil;
  qglGetIntegerv             := Nil;
  qglGetLightfv              := Nil;
  qglGetLightiv              := Nil;
  qglGetMapdv                := Nil;
  qglGetMapfv                := Nil;
  qglGetMapiv                := Nil;
  qglGetMaterialfv           := Nil;
  qglGetMaterialiv           := Nil;
  qglGetPixelMapfv           := Nil;
  qglGetPixelMapuiv          := Nil;
  qglGetPixelMapusv          := Nil;
  qglGetPointerv             := Nil;
  qglGetPolygonStipple       := Nil;
  qglGetString               := Nil;
  qglGetTexEnvfv             := Nil;
  qglGetTexEnviv             := Nil;
  qglGetTexGendv             := Nil;
  qglGetTexGenfv             := Nil;
  qglGetTexGeniv             := Nil;
  qglGetTexImage             := Nil;
  qglGetTexLevelParameterfv  := Nil;
  qglGetTexLevelParameteriv  := Nil;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -