-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged pull request "Debug line drawing": #440
- Loading branch information
Showing
29 changed files
with
5,087 additions
and
167 deletions.
There are no files selected for viewing
Submodule Vulkan-Headers
updated
86 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
Copyright (C) 1997-2001 Id Software, Inc. | ||
Copyright (C) 2024-2025 Frank Richter | ||
Copyright (C) 2024-2025 Andrey Nazarov | ||
Copyright (C) 2024-2025 Jonathan "Paril" Barkley | ||
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. | ||
You should have received a copy of the GNU General Public License along | ||
with this program; if not, write to the Free Software Foundation, Inc., | ||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
*/ | ||
|
||
#ifndef REFRESH_DEBUG_H_ | ||
#define REFRESH_DEBUG_H_ | ||
|
||
#define MAX_DEBUG_LINES 8192 | ||
#define MAX_DEBUG_VERTICES (MAX_DEBUG_LINES * 2) | ||
|
||
typedef struct { | ||
list_t entry; | ||
vec3_t start, end; | ||
color_t color; | ||
uint32_t time; | ||
bool depth_test; | ||
} r_debug_line_t; | ||
|
||
extern list_t r_debug_lines_free; | ||
extern list_t r_debug_lines_active; | ||
|
||
// Debug lines shared functionality | ||
extern bool R_DebugTimeExpired(const uint32_t time); | ||
extern void R_ExpireDebugLines(void); | ||
extern void R_AddDebugText_Lines(const vec3_t vieworg, const vec3_t origin, const vec3_t angles, const char *text, float size, uint32_t color, uint32_t time, bool depth_test); | ||
extern void R_InitDebugText(void); | ||
|
||
#endif // REFRESH_DEBUG_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
Copyright (C) 1997-2001 Id Software, Inc. | ||
Copyright (C) 2024-2025 Frank Richter | ||
Copyright (C) 2024-2025 Andrey Nazarov | ||
Copyright (C) 2024-2025 Jonathan "Paril" Barkley | ||
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. | ||
You should have received a copy of the GNU General Public License along | ||
with this program; if not, write to the Free Software Foundation, Inc., | ||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#if USE_REF | ||
void R_ClearDebugLines(void); | ||
void R_AddDebugLine(const vec3_t start, const vec3_t end, uint32_t color, uint32_t time, bool depth_test); | ||
void R_AddDebugText(const vec3_t origin, const vec3_t angles, const char *text, | ||
float size, uint32_t color, uint32_t time, bool depth_test); | ||
void R_AddDebugPoint(const vec3_t point, float size, uint32_t color, uint32_t time, bool depth_test); | ||
void R_AddDebugAxis(const vec3_t origin, const vec3_t angles, float size, uint32_t time, bool depth_test); | ||
void R_AddDebugBounds(const vec3_t mins, const vec3_t maxs, uint32_t color, uint32_t time, bool depth_test); | ||
void R_AddDebugSphere(const vec3_t origin, float radius, uint32_t color, uint32_t time, bool depth_test); | ||
void R_AddDebugCircle(const vec3_t origin, float radius, uint32_t color, uint32_t time, bool depth_test); | ||
void R_AddDebugCylinder(const vec3_t origin, float half_height, float radius, uint32_t color, uint32_t time, bool depth_test); | ||
void R_AddDebugArrow(const vec3_t start, const vec3_t end, float size, uint32_t line_color, | ||
uint32_t arrow_color, uint32_t time, bool depth_test); | ||
void R_AddDebugCurveArrow(const vec3_t start, const vec3_t ctrl, const vec3_t end, float size, | ||
uint32_t line_color, uint32_t arrow_color, uint32_t time, bool depth_test); | ||
#else | ||
#define R_ClearDebugLines() (void)0 | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.