Skip to content

modifying glconfig_t breaks engine/gamecode compatibility #517

@illwieckz

Description

@illwieckz

While working on #478 I noticed the string we use to store the list of available OpenGL extensions is smaller than the list of available OpenGL extensions itself provided by actual drivers, so I just tried to double the size this way:

diff --git a/src/engine/renderer/tr_types.h b/src/engine/renderer/tr_types.h
index 7c4aeb672..662ae5742 100644
--- a/src/engine/renderer/tr_types.h
+++ b/src/engine/renderer/tr_types.h
@@ -335,7 +335,7 @@ struct glconfig_t
        char                 renderer_string[ MAX_STRING_CHARS ];
        char                 vendor_string[ MAX_STRING_CHARS ];
        char                 version_string[ MAX_STRING_CHARS ];
-       char                 extensions_string[ MAX_STRING_CHARS * 4 ]; // TTimo - bumping, some cards have a big extension string
+       char                 extensions_string[ MAX_STRING_CHARS * 8 ]; // TTimo - bumping, some cards have a big extension string
 
        int                  maxTextureSize; // queried from GL
        int                  unused;

And then when trying to load the engine from that branch with released game code I got this error:

Loaded VM module in 124 msec 
Warn: Error during initialization: CGame VM: Reader: Unread bytes at end of message 

Why modifying that string (and then, that struct) breaks engine/game compat? Do we need that?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions