Blender V5.3
blender::gpu::Preprocessor Struct Reference

Public Member Functions

 Preprocessor (const std::string_view str)
void preprocess ()
void optimize ()
std::string result_get ()

Detailed Description

Fast C preprocessor implementation.

This is not a compliant implementation, but it supports most common features.

What is not supported:

  • Trigraphs.
  • Backslash at end of a line does not continue a token.
  • Error checking is incomplete.

Unsupported preprocessor directive (like #warning and #error) are left untouched.

Definition at line 759 of file gpu_shader_preprocessor.cc.

Constructor & Destructor Documentation

◆ Preprocessor()

blender::gpu::Preprocessor::Preprocessor ( const std::string_view str)
inline

Definition at line 853 of file gpu_shader_preprocessor.cc.

References hash, and str.

Member Function Documentation

◆ optimize()

void blender::gpu::Preprocessor::optimize ( )
inline

Definition at line 976 of file gpu_shader_preprocessor.cc.

Referenced by blender::gpu::Shader::run_preprocessor().

◆ preprocess()

void blender::gpu::Preprocessor::preprocess ( )
inline

◆ result_get()

std::string blender::gpu::Preprocessor::result_get ( )
inline

Definition at line 984 of file gpu_shader_preprocessor.cc.

Referenced by blender::gpu::Shader::run_preprocessor().


The documentation for this struct was generated from the following file: