Struct glium::draw_parameters::DrawParametersBuilder [] [src]

pub struct DrawParametersBuilder<'a> {
    // some fields omitted
}

This is what the new API of DrawParameters will look like in a future version.

FIXME: add the missing functions (with a better API)

Methods

impl<'a> DrawParametersBuilder<'a>

fn with_depth(self, test: DepthTest, write: bool, range: (f32, f32)) -> DrawParametersBuilder<'a>

Sets the depth operation to use while drawing.

For a simple depth buffer usage, the common parameters are (DepthTest::IfLess, true, (0.0, 1.0)).

fn with_blending_function(self, blending: BlendingFunction) -> DrawParametersBuilder<'a>

Sets the function that the GPU will use to merge the existing pixel with the pixel that is being written.

fn with_backface_culling(self, culling: BackfaceCullingMode) -> DrawParametersBuilder<'a>

Sets whether to cull faces, and which ones.

fn with_viewport(self, viewport: Rect) -> DrawParametersBuilder<'a>

Sets the viewport to use.

By default, the whole surface is used.

fn with_scissor(self, scissor: Rect) -> DrawParametersBuilder<'a>

Sets the scissor box to use.

By default, no scissor box is used.

fn with_rasterizer_discard_if_supported(self) -> Result<DrawParametersBuilder<'a>, DrawParametersBuilder<'a>>

Sets that the output of the rasterized must be discarded.

It is not discarded by default.

Returns Err if the backend doesn't support this operation.

fn without_multisampling(self) -> DrawParametersBuilder<'a>

Sets that multisampling must not be used.

Multisampling is active by default.

fn without_dithering(self) -> DrawParametersBuilder<'a>

Sets that dithering must not be used.

Dithering is active by default.

fn with_samples_passed_query<Q>(self, query: Q) -> DrawParametersBuilder<'a> where Q: Into<SamplesQueryParam<'a>>

Sets the query to store the number of samples that are written to the output.

fn with_time_elapsed_query(self, query: &'a TimeElapsedQuery) -> DrawParametersBuilder<'a>

Sets the query to store the time that it takes to execute the commands.

fn with_primitives_generated_query(self, query: &'a PrimitivesGeneratedQuery) -> DrawParametersBuilder<'a>

Sets the query to store the number of primitives generated by the commands.

fn with_transform_feedback_primitives_written_query(self, query: &'a TransformFeedbackPrimitivesWrittenQuery) -> DrawParametersBuilder<'a>

Sets the query to store the number of vertices generated by transform feedback in the commands.

fn with_conditional_rendering<Q>(self, query: Q, wait: bool, per_region: bool) -> DrawParametersBuilder<'a> where Q: Into<SamplesQueryParam<'a>>

See the ConditionalRendering struct.

Methods from Deref<Target=DrawParameters<'a>>

fn new<F>(facade: &'a F) -> DrawParametersBuilder<'a> where F: Facade

Start building draw parameters.

Trait Implementations

impl<'a> Deref for DrawParametersBuilder<'a>

type Target = DrawParameters<'a>

fn deref(&self) -> &DrawParameters<'a>

impl<'a> DerefMut for DrawParametersBuilder<'a>

fn deref_mut(&mut self) -> &mut DrawParameters<'a>