Skip to content

Comments

Migrate render commands to C++ interface#1494

Merged
slipher merged 4 commits intoDaemonEngine:masterfrom
slipher:render-cmd-migrate
Jan 18, 2025
Merged

Migrate render commands to C++ interface#1494
slipher merged 4 commits intoDaemonEngine:masterfrom
slipher:render-cmd-migrate

Conversation

@slipher
Copy link
Member

@slipher slipher commented Jan 10, 2025

Migrate commands to the new interface. That has the benefit of show descriptions for the commands, and using Print so that the output is not affected by log suppression.

Most of the diffs are indentation changes, so you might like to review it as follows:

git fetch origin pull/1494/head
git show -4 FETCH_HEAD --ignore-space-change

Minor functional changes:
- listModels: print MD3 per-frame data when any argument is given,
  instead of when the argument is "frames", since there was no usage
  message to discover that
- listModels: use spaces instead of tabs since console doesn't display
  tabs
- listAnimations: fix weird formatting of summary line
Some of them do exist, but are now implemented with new-style commands
so the legacy interface shouldn't be used.
@VReaperV
Copy link
Contributor

VReaperV commented Jan 17, 2025

The descriptions for e. g. shaderexp and buildcubemaps show up as -- when using /listCmds, rather than evaluate a q3shader expression (RB_EvalExpression) and generate cube probes for reflection mapping, is this supposed to happen?

@slipher
Copy link
Member Author

slipher commented Jan 17, 2025

The descriptions for e. g. shaderexp and buildcubemaps show up as -- when using /listCmds, rather than evaluate a q3shader expression (RB_EvalExpression) and generate cube probes for reflection mapping, is this supposed to happen?

Can't reproduce. Are you sure you're building and running the right code?

@VReaperV
Copy link
Contributor

VReaperV commented Jan 17, 2025

I'm certain of that.

Apparently, it works properly with auto-completion, but not with listCmds:
Regular usage:

 ]/listcmds gfx
 0 commands
 ]/listcmds shader
 0 commands
 ]/listcmds build
   build an old style vm command
 1 commands
 ]/listcmds gl
   globalservers --
 1 commands

Auto-completion:

 ^3-> ^*/shader
    shaderexp  evaluate a q3shader expression (RB_EvalExpression)
    shaderpath cvar - "^*" - text - path to load GLSL source files at runtime
 ^3-> ^*/build
    build         an old style vm command
    buildcubemaps generate cube probes for reflection mapping
 ^3-> ^*/gl
    globalservers --
    glsl_restart  recompile GLSL shaders (useful when shaderpath is set)
 ^3-> ^*/listcmds g
    g_                  
    gfxinfo             dump graphics driver and configuration info

@slipher
Copy link
Member Author

slipher commented Jan 17, 2025

OK so there's a bug with listCmds that it won't show commands without a flag.

static ListCmdsCmd listCmdsRegistration("listCmds", BASE, "lists all the commands", ~(CVAR|ALIAS));

But I don't see -- anywhere with the migrated commands.

@VReaperV
Copy link
Contributor

But I don't see -- anywhere with the migrated commands.

This works fine on my end after a full rebuild.

@VReaperV
Copy link
Contributor

OK so there's a bug with listCmds that it won't show commands without a flag.

Yeah, found the same issue.

Copy link
Contributor

@VReaperV VReaperV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@slipher slipher merged commit 26866fb into DaemonEngine:master Jan 18, 2025
9 checks passed
@slipher slipher deleted the render-cmd-migrate branch January 18, 2025 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants