The optix7.0 program references the sutil.cpp file, the optix7.0 program will not change after sutil.cpp is changed

I use win10, optix7.0, vs2019 configuration。

I created a new program, copied the code of optixwhitted and referenced sutil_7_sdk.

I want to change the text color of the information displayed on the interface when the display is running, such as fps, render _time,display_time information.

For example, I want to change the gray text in the upper left corner of the picture below to red

I found that changing this color is in the displayText function in sutil.cpp.

I changed the text color in this function to red, but the text color when my program runs is still the default gray.

Below are my two programs, one is my main program Optixwhitted.cpp, and the other is the program sutil.cpp referenced by the main program.
optixWhitted.cpp (44.0 KB) sutil.cpp (34.0 KB)

Running a diff of your two files against OptiX SDK 7.0, 7.1, and 7.2 shows that these two files are from the OptiX SDK 7.1.0 and you just added a string in sutil.cpp and formatted the optixWhitted.cpp.

There is no color change done in those two files.
You say you’re using OptiX SDK 7.0. Did you change the wrong file maybe?

Looking at the sutil.cpp code, I don’t see why it shouldn’t work to change the displayText() function in line 740 to another color instead of the hardcoded 0.7 grey value:
ImGui::TextColored( ImColor( 0.7f, 0.7f, 0.7f, 1.0f ), "%s", text );

Thank you for your reply.

My program is the referenced sutil_7_sdk file, and my program uses the sutil.cpp program in this file for text information.

I used to change the color value to red in this sutil.cpp program

As follows


But at runtime, the text is still grayed out.

But when I also changed the sutil.cpp of the official demo, the color of the official Optixwhitted text information changed to red.

That sounds more as if you’re having different versions of the sutil code and the built dynamic link library sutil.dll of that.
Means you either changed the wrong code or you’re using the wrong sutil.dll without your changes in it.

Search for that sutil.dll file and sort by date. Then rebuild your solution and check which sutil.dll changed. Then check if that’s the one you copied next to your application’s executable.