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

📄 glw_imp.pas

📁 雷神之锤2(Quake2)Delphi源码
💻 PAS
字号:
// PLEASE, don't modify this file
// 90% complete

{----------------------------------------------------------------------------}
{                                                                            }
{ File(s): GLW_IMP.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 q_shared, gl_local                                                 }
{                                                                            }
{ 2) unit Windows, ref, GL, glw_win, qgl_win                                 }
{                                                                            }
{----------------------------------------------------------------------------}
{ * TODO:                                                                    }
{ 1) Do more tests                                                           }
{                                                                            }
{----------------------------------------------------------------------------}

{*
** GLW_IMP.C
**
** This file contains ALL Win32 specific stuff having to do with the
** OpenGL refresh.  When a port is being made the following functions
** must be implemented by the port:
**
** GLimp_EndFrame
** GLimp_Init
** GLimp_Shutdown
** GLimp_SwitchFullscreen
**
*}

unit glw_imp;

interface

uses q_shared, gl_local;

//NB! none cdecl
function GLimp_SetMode (var pwidth, pheight : integer;
                        mode : integer; fullscreen : qboolean) : rserr_t;
procedure GLimp_Shutdown;
function  GLimp_Init (hinstance : HINST; wndproc : pointer) : qboolean;  //add info: glw_win.inc: glwstate_t
procedure GLimp_BeginFrame (camera_separation : float);

//NB! cdecl
procedure GLimp_EndFrame; cdecl;
procedure GLimp_AppActivate (active : qboolean); cdecl;


(*
extern cvar_t *vid_fullscreen;
extern cvar_t *vid_ref;
*)
var
  vid_fullscreen,
  vid_ref         : cvar_p;

implementation

uses Windows,
     ref,
     GL, glw_win, qgl_win;
(*
#include <assert.h>
#include "winquake.h"
*)


//need REMOVE
var
  ri : refimport_t; //??? ref
(*static qboolean GLimp_SwitchFullscreen( int width, int height );*)
//qboolean GLimp_InitGL (void);

{
//666 - in glw_win.pas
var
  glw_state : glwstate_t; //

⌨️ 快捷键说明

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