Descent3/renderer/HardwareGlobalVars.cpp

47 lines
1.3 KiB
C++
Raw Normal View History

/*
* Descent 3
* Copyright (C) 2024 Parallax Software
*
* 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 3 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.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
2024-04-16 03:43:29 +00:00
#include "3d.h"
#include "HardwareInternal.h"
#include <float.h>
2024-04-16 18:56:40 +00:00
vector View_position;
float View_zoom;
2024-04-16 03:43:29 +00:00
2024-04-16 18:56:40 +00:00
float Far_clip_z = FLT_MAX; // set to a really really far distance initially
2024-04-16 03:43:29 +00:00
2024-05-24 03:07:26 +00:00
uint8_t Clip_custom = 0;
2024-04-16 18:56:40 +00:00
float Clip_plane_distance = 0;
vector Clip_plane;
2024-04-16 03:43:29 +00:00
2024-04-16 18:56:40 +00:00
matrix Unscaled_matrix; // before scaling
matrix View_matrix;
2024-04-16 03:43:29 +00:00
2024-04-16 18:56:40 +00:00
vector Matrix_scale; // how the matrix is scaled, window_scale * zoom
2024-04-16 03:43:29 +00:00
2024-04-16 18:56:40 +00:00
int Window_width; // the actual width
int Window_height; // the actual height
2024-04-16 03:43:29 +00:00
2024-04-16 18:56:40 +00:00
float Window_w2; // width/2
float Window_h2; // height/2
2024-04-16 03:43:29 +00:00
float gTransformViewPort[4][4];
float gTransformProjection[4][4];
float gTransformModelView[4][4];
float gTransformFull[4][4];