Merge branch 'master' into graphics

This commit is contained in:
b-guild
2025-08-24 12:48:58 -07:00
37 changed files with 972 additions and 781 deletions
+14 -3
View File
@@ -126,9 +126,9 @@ pub trait GraphicsServer: GraphicsServerAsAny {
line_offset: isize,
) -> Result<GpuShader, FrameworkError>;
/// Creates a new named GPU program using a pair of vertex and fragment shaders. The name could
/// be used for debugging purposes. The implementation of graphics server will generate proper
/// resource bindings in the shader code for you.
/// Creates a new named GPU program using source code of both vertex and fragment shaders. The
/// name could be used for debugging purposes. The implementation of graphics server will generate
/// proper resource bindings in the shader code for you.
fn create_program(
&self,
name: &str,
@@ -139,6 +139,17 @@ pub trait GraphicsServer: GraphicsServerAsAny {
resources: &[ShaderResourceDefinition],
) -> Result<GpuProgram, FrameworkError>;
/// Creates a new named GPU program using a pair of vertex and fragment shaders. The name could
/// be used for debugging purposes. The implementation of graphics server will generate proper
/// resource bindings in the shader code for you.
fn create_program_from_shaders(
&self,
name: &str,
vertex_shader: &GpuShader,
fragment_shader: &GpuShader,
resources: &[ShaderResourceDefinition],
) -> Result<GpuProgram, FrameworkError>;
/// Creates a new read-back buffer, that can be used to obtain texture data from GPU. It can be
/// used to read rendering result from GPU to CPU memory and save the result to disk.
fn create_async_read_buffer(