Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions src/engine/client/cg_msgdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ using CGameStaticInitMsg = IPC::SyncMessage<
IPC::Message<IPC::Id<VM::QVM, CG_STATIC_INIT>, int>
>;
using CGameInitMsg = IPC::SyncMessage<
IPC::Message<IPC::Id<VM::QVM, CG_INIT>, int, int, glconfig_t, GameStateCSs>
IPC::Message<IPC::Id<VM::QVM, CG_INIT>, int, int, WindowConfig, GameStateCSs>
>;
using CGameShutdownMsg = IPC::SyncMessage<
IPC::Message<IPC::Id<VM::QVM, CG_SHUTDOWN>>
Expand Down Expand Up @@ -540,7 +540,7 @@ using CGameFocusEventMsg = IPC::SyncMessage<

//TODO Check all rocket calls
using CGameRocketInitMsg = IPC::SyncMessage<
IPC::Message<IPC::Id<VM::QVM, CG_ROCKET_VM_INIT>, glconfig_t>
IPC::Message<IPC::Id<VM::QVM, CG_ROCKET_VM_INIT>, WindowConfig>
>;
using CGameRocketFrameMsg = IPC::SyncMessage<
IPC::Message<IPC::Id<VM::QVM, CG_ROCKET_FRAME>, cgClientState_t>
Expand Down
20 changes: 2 additions & 18 deletions src/engine/client/cl_cgame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -956,15 +956,7 @@ void CGameVM::CGameStaticInit()

void CGameVM::CGameInit(int serverMessageNum, int clientNum)
{
glconfig_t glConfig;
memset( &glConfig, 0, sizeof( glconfig_t ) );
glConfig.displayAspect = cls.windowConfig.displayAspect;
glConfig.displayWidth = cls.windowConfig.displayWidth;
glConfig.displayHeight = cls.windowConfig.displayHeight;
glConfig.vidWidth = cls.windowConfig.vidWidth;
glConfig.vidHeight = cls.windowConfig.vidHeight;

this->SendMsg<CGameInitMsg>(serverMessageNum, clientNum, glConfig, cl.gameState);
this->SendMsg<CGameInitMsg>(serverMessageNum, clientNum, cls.windowConfig, cl.gameState);
NetcodeTable psTable;
size_t psSize;
this->SendMsg<VM::GetNetcodeTablesMsg>(psTable, psSize);
Expand Down Expand Up @@ -1028,15 +1020,7 @@ void CGameVM::CGameTextInputEvent(int c)

void CGameVM::CGameRocketInit()
{
glconfig_t glConfig;
memset( &glConfig, 0, sizeof( glconfig_t ) );
glConfig.displayAspect = cls.windowConfig.displayAspect;
glConfig.displayWidth = cls.windowConfig.displayWidth;
glConfig.displayHeight = cls.windowConfig.displayHeight;
glConfig.vidWidth = cls.windowConfig.vidWidth;
glConfig.vidHeight = cls.windowConfig.vidHeight;

this->SendMsg<CGameRocketInitMsg>( glConfig );
this->SendMsg<CGameRocketInitMsg>( cls.windowConfig );
}

void CGameVM::CGameRocketFrame()
Expand Down
10 changes: 2 additions & 8 deletions src/engine/renderer/tr_public.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,6 @@ struct GLConfig
bool motionBlur;
};

struct WindowConfig {
float displayAspect;
int displayWidth, displayHeight; // the entire monitor (the one indicated by displayIndex)
int vidWidth, vidHeight; // what the game is using
};

//
// these are the functions exported by the refresh module
//
Expand All @@ -192,8 +186,8 @@ struct refexport_t
// if necessary.
//
// BeginRegistration makes any existing media pointers invalid
// and returns the current gl configuration, including screen width
// and height, which can be used by the client to intelligently
// and returns the current window configuration, including screen and display width
// and height, and aspect ratio, which can be used by the client to intelligently
// size display elements. Returns false if the renderer couldn't
// be initialized.
bool( *BeginRegistration )( WindowConfig* windowCfg );
Expand Down
21 changes: 2 additions & 19 deletions src/engine/renderer/tr_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,30 +273,13 @@ enum class glHardwareType_t

/**
* Contains variables specific to the OpenGL configuration
* being run right now. These are constant once the OpenGL
* being run right now. These are constant once the OpenGL
* subsystem is initialized.
*/
struct glconfig_t
{
char renderer_string[ MAX_STRING_CHARS ];
char vendor_string[ MAX_STRING_CHARS ];
char version_string[ MAX_STRING_CHARS ];

int maxTextureSize; // queried from GL

int colorBits;

glDriverType_t driverType;
glHardwareType_t hardwareType;

textureCompression_t textureCompression;

int displayIndex;
struct WindowConfig {
float displayAspect;
int displayWidth, displayHeight; // the entire monitor (the one indicated by displayIndex)
int vidWidth, vidHeight; // what the game is using

bool8_t smpActive; // dual processor
};

#pragma pop_macro("bool")
Expand Down