Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Legacy opengl renderer #421

Merged
merged 26 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ed3fa2e
legacy single buffer renderer for speed freaks
assertivist Jun 21, 2024
b4bd6fc
kill some spectator frags
tra Jun 21, 2024
ee26fdd
output an estimate of CPU usage with `/dbg cpu`
tra Jun 21, 2024
f95ca3e
more frag fixes
tra Jun 22, 2024
2534cb7
local variable scope bug, oops
tra Jun 24, 2024
0bf4dbb
default Goody angle to zero
tra Jun 25, 2024
ba57a49
/dbg frag
tra Jun 25, 2024
10e900e
fixed koth field
tra Jun 26, 2024
3b002ea
try taking the hill logo out of the equation
tra Jun 26, 2024
b69e339
reverting last change for further build/testing
tra Jun 26, 2024
0cbe0bd
output dbg as BSPs are loaded
tra Jun 27, 2024
9af88b0
added attribute to Hologram
tra Jun 27, 2024
2be0190
fixed RayTest calls to use the fps ray distances
tra Jul 2, 2024
a6a45fc
backout changes to missile
tra Jul 3, 2024
75f1ede
make FramesFromNow() accept a float arg
tra Jul 3, 2024
ceca44e
consistent grenade/missile/plasma shooting rates (#417)
tra Jul 10, 2024
c54dc28
fix level-loading crashes
tra Aug 9, 2024
1f26642
fixed compiler warnings introduced by previous fix
tra Aug 9, 2024
4193ac2
Add function to allow the FrameBuffer to be updated on the fly
Ymihere03 Aug 13, 2024
d3d5fc5
Remove comment lines
Ymihere03 Aug 13, 2024
1711742
Refactored window resize handling to prevent memory leaks when updati…
Ymihere03 Aug 13, 2024
6aca440
Fix test class
Ymihere03 Aug 13, 2024
7ce62d7
Fix test class
Ymihere03 Aug 13, 2024
1a54b4a
merge with update to render api from fix for window resizing
assertivist Aug 13, 2024
2017094
Merge remote-tracking branch 'origin' into legacy-opengl-renderer
assertivist Aug 13, 2024
a2f9c7a
add new files to msvc project
assertivist Aug 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Avara.msvc/AvaraCore.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@
<ClInclude Include="..\src\net\TrackerTags.h" />
<ClInclude Include="..\src\net\UDPTags.h" />
<ClInclude Include="..\src\render\AbstractRenderer.h" />
<ClInclude Include="..\src\render\LegacyOpenGLRenderer.h" />
<ClInclude Include="..\src\render\ModernOpenGLRenderer.h" />
<ClInclude Include="..\src\render\NullRenderer.h" />
<ClInclude Include="..\src\render\OpenGLShader.h" />
Expand Down Expand Up @@ -476,6 +477,7 @@
<ClCompile Include="..\src\net\CUDPComm.cpp" />
<ClCompile Include="..\src\net\CUDPConnection.cpp" />
<ClCompile Include="..\src\render\AbstractRenderer.cpp" />
<ClCompile Include="..\src\render\LegacyOpenGLRenderer.cpp" />
<ClCompile Include="..\src\render\ModernOpenGLRenderer.cpp" />
<ClCompile Include="..\src\render\OpenGLShader.cpp" />
<ClCompile Include="..\src\render\OpenGLVertices.cpp" />
Expand Down
6 changes: 6 additions & 0 deletions Avara.msvc/AvaraCore.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,9 @@
<ClInclude Include="..\platform\windows\resource.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\render\LegacyOpenGLRenderer.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\src\util\ARGBColor.cpp">
Expand Down Expand Up @@ -1118,5 +1121,8 @@
<ClCompile Include="..\vendor\pugixml\pugixml.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\render\LegacyOpenGLRenderer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>
9 changes: 9 additions & 0 deletions Avara.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
6025AE4E2C255E6A00A57EFB /* LegacyOpenGLRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 60C274E22C23EBE9005B67A9 /* LegacyOpenGLRenderer.cpp */; };
940541ED2B5875B200E32241 /* OpenGLShader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 940541EC2B5875B200E32241 /* OpenGLShader.cpp */; };
940541EE2B5875B200E32241 /* OpenGLShader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 940541EC2B5875B200E32241 /* OpenGLShader.cpp */; };
9419E8472B49ECB1007C50D0 /* CTeamColorAdjuster.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9419E8462B49ECB1007C50D0 /* CTeamColorAdjuster.cpp */; };
Expand Down Expand Up @@ -387,6 +388,8 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
60C274E22C23EBE9005B67A9 /* LegacyOpenGLRenderer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LegacyOpenGLRenderer.cpp; sourceTree = "<group>"; };
60C274E32C23EBE9005B67A9 /* LegacyOpenGLRenderer.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; path = LegacyOpenGLRenderer.h; sourceTree = "<group>"; };
940541EB2B58744500E32241 /* OpenGLShader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OpenGLShader.h; sourceTree = "<group>"; };
940541EC2B5875B200E32241 /* OpenGLShader.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = OpenGLShader.cpp; sourceTree = "<group>"; };
9419E8452B49EC89007C50D0 /* CTeamColorAdjuster.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTeamColorAdjuster.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1083,6 +1086,8 @@
children = (
947F5C642B576B9F00F41689 /* ModernOpenGLRenderer.cpp */,
947F5C632B576ACD00F41689 /* ModernOpenGLRenderer.h */,
60C274E22C23EBE9005B67A9 /* LegacyOpenGLRenderer.cpp */,
60C274E32C23EBE9005B67A9 /* LegacyOpenGLRenderer.h */,
947F5C672B57A30100F41689 /* NullRenderer.h */,
940541EC2B5875B200E32241 /* OpenGLShader.cpp */,
940541EB2B58744500E32241 /* OpenGLShader.h */,
Expand Down Expand Up @@ -2390,6 +2395,7 @@
E5890CBF29895118007A875D /* CAbstractActor.cpp in Sources */,
E5890CAA29895118007A875D /* CAbstractPipe.cpp in Sources */,
E5890F0929895124007A875D /* stb_vorbis.c in Sources */,
6025AE4E2C255E6A00A57EFB /* LegacyOpenGLRenderer.cpp in Sources */,
E5890D0529895118007A875D /* CSoundMixer.cpp in Sources */,
E5890CF529895118007A875D /* CRamp.cpp in Sources */,
E5890C9F29895118007A875D /* Resource.cpp in Sources */,
Expand Down Expand Up @@ -2597,6 +2603,7 @@
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=macosx*]" = "";
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -2621,6 +2628,7 @@
PRODUCT_BUNDLE_IDENTIFIER = net.avaraline.Avara;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "";
SWIFT_EMIT_LOC_STRINGS = YES;
};
name = Debug;
Expand Down Expand Up @@ -2661,6 +2669,7 @@
PRODUCT_BUNDLE_IDENTIFIER = net.avaraline.Avara;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "";
SWIFT_EMIT_LOC_STRINGS = YES;
};
name = Release;
Expand Down
9 changes: 8 additions & 1 deletion src/game/CAvaraApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "Tags.h"
#include "Debug.h"
#include "ModernOpenGLRenderer.h"
#include "LegacyOpenGLRenderer.h"

// included while we fake things out
#include "CPlayerManager.h"
Expand Down Expand Up @@ -79,7 +80,13 @@ CAvaraAppImpl::CAvaraAppImpl() : CApplication("Avara") {
ui->LoadImages(mNVGContext);
}

gRenderer = new ModernOpenGLRenderer(mSDLWindow);
if (Get(kUseLegacyRenderer)) {
gRenderer = new LegacyOpenGLRenderer(mSDLWindow);
}
else {
gRenderer = new ModernOpenGLRenderer(mSDLWindow);
}

gRenderer->UpdateViewRect(mSize.x, mSize.y, mPixelRatio);
gRenderer->SetFOV(Number(kFOV));
gRenderer->ResetLights();
Expand Down
2 changes: 2 additions & 0 deletions src/gui/Preferences.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ using json = nlohmann::json;
#define kFullScreenTag "fullscreen"
#define kFOV "fov"
#define kFXAA "fxaa"
#define kUseLegacyRenderer "useLegacyRenderer"

// Other graphics settings
#define kColorBlindMode "colorBlindMode"
Expand Down Expand Up @@ -196,6 +197,7 @@ static json defaultPrefs = {
{kThrottle, 0},
{kGoodGamePhrases, {}},
{kShowElo, false},
{kUseLegacyRenderer, false}
};


Expand Down
Loading
Loading