Skip to content

Commit

Permalink
Merge pull request #1641 from martinlindhe/master
Browse files Browse the repository at this point in the history
fixed some typos
  • Loading branch information
tomaka committed Nov 19, 2017
2 parents d671f3a + 2911825 commit 63577da
Show file tree
Hide file tree
Showing 24 changed files with 42 additions and 42 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Expand Up @@ -3,7 +3,7 @@
## Version 0.14.0 (2016-04-11)

- Updated glutin to version 0.5.
- Various bufixes.
- Various bugfixes.

## Version 0.13.5 (2016-02-04)

Expand All @@ -13,7 +13,7 @@
## Version 0.13.4 (2016-01-21)

- Added support for shader subroutines.
- Added various functions to `Context` to retreive information (like the content of `GL_VENDOR` or `GL_RENDERER` for example).
- Added various functions to `Context` to retrieve information (like the content of `GL_VENDOR` or `GL_RENDERER` for example).
- Added additional dimensions getters to the various texture types.

## Version 0.13.3 (2016-01-08)
Expand Down Expand Up @@ -159,7 +159,7 @@

- Textures are now inside submodules (for example `Texture2d` is in `texture::texture2d::Texture2d`) and reexported from `texture`.
- Added `Context::flush()` and `Context::finish()`. Deprecated `Context::synchronize`.
- Removed `Sized` contraint for `Surface` that was preventing one from using `&Surface` or `&mut Surface`.
- Removed `Sized` constraint for `Surface` that was preventing one from using `&Surface` or `&mut Surface`.
- Added `TextureAnyMipmap::raw_upload_from_pixel_buffer`.
- Moved the `pixel_buffer` module to `texture::pixel_buffer` (the old module still exists for backward compatibility).

Expand Down
2 changes: 1 addition & 1 deletion book/tuto-04-matrices.md
Expand Up @@ -11,7 +11,7 @@ All the geometrical operations that we need can be done with some maths:

But what if we want to do a rotation, then a translation, then a rescale? Or a skew and a rotation? Even though it's possible to do this with maths, things become very complex to handle.

Instead, programers use **matrices**. A matrix is a two-dimensional table of numbers which *can represent a geometrical transformation*. In computer graphics, we use 4x4 matrices.
Instead, programmers use **matrices**. A matrix is a two-dimensional table of numbers which *can represent a geometrical transformation*. In computer graphics, we use 4x4 matrices.

Let's get back to our moving triangle. We are going to change the vertex shader to use a matrix. Instead of adding the value of `t` to the coordinates, we are going to apply the matrix to them by multiplying it. This applies the transformation described by our matrix to the vertex's coordinates.

Expand Down
2 changes: 1 addition & 1 deletion book/tuto-07-shape.md
Expand Up @@ -2,7 +2,7 @@

Instead of drawing a triangle, we are now going to draw a more complex shape: a teapot.
The Utah teapot is a famous 3D model that is often considered as one of the "hello world"s of
graphics programing.
graphics programming.

In a real application, complex models (by "complex" I mean anything more than a few vertices)
are loaded from files at runtime. But for the purpose of this tutorial, we are going to use a Rust
Expand Down
2 changes: 1 addition & 1 deletion examples/info.rs
Expand Up @@ -15,7 +15,7 @@ fn main() {
Version(Api::GlEs, _, _) => "OpenGL ES"
};

println!("{} context verson: {}", api, display.get_opengl_version_string());
println!("{} context version: {}", api, display.get_opengl_version_string());

print!("{} context flags:", api);
if display.is_forward_compatible() {
Expand Down
2 changes: 1 addition & 1 deletion examples/picking.rs
Expand Up @@ -125,7 +125,7 @@ fn main() {
camera.update();


// determing which object has been picked at the previous frame
// determine which object has been picked at the previous frame
let picked_object = {
let data = picking_pbo.read().map(|d| d[0]).unwrap_or(0);
if data != 0 {
Expand Down
2 changes: 1 addition & 1 deletion examples/screenshot-asynchronous.rs
Expand Up @@ -235,7 +235,7 @@ fn main() {

// The parameter sets the amount of frames between requesting the image
// transfer and picking it up. If the value is too small, the main thread
// will block waiting for the image to finish transfering. Tune it based on
// will block waiting for the image to finish transferring. Tune it based on
// your requirements.
let mut screenshot_taker = screenshot::AsyncScreenshotTaker::new(5);

Expand Down
2 changes: 1 addition & 1 deletion src/buffer/mod.rs
Expand Up @@ -213,7 +213,7 @@ pub enum BufferMode {
///
Default,

/// The mode to use when you modify a buffer multiple times per frame. Simiar to `Default` in
/// The mode to use when you modify a buffer multiple times per frame. Similar to `Default` in
/// that it is suitable for most usages.
///
/// Use this if you do a quick succession of modify the buffer, draw, modify, draw, etc. This
Expand Down
8 changes: 4 additions & 4 deletions src/buffer/view.rs
Expand Up @@ -1118,14 +1118,14 @@ impl BufferAny {
}

/// Returns the size in bytes of each element in the buffer.
// TODO: clumbsy, remove this function
// TODO: clumsy, remove this function
#[inline]
pub fn get_elements_size(&self) -> usize {
self.elements_size
}

/// Returns the number of elements in the buffer.
// TODO: clumbsy, remove this function
// TODO: clumsy, remove this function
#[inline]
pub fn get_elements_count(&self) -> usize {
self.size / self.elements_size
Expand Down Expand Up @@ -1301,14 +1301,14 @@ impl<'a> BufferAnySlice<'a> {
}

/// Returns the size in bytes of each element in the buffer.
// TODO: clumbsy, remove this function
// TODO: clumsy, remove this function
#[inline]
pub fn get_elements_size(&self) -> usize {
self.elements_size
}

/// Returns the number of elements in the buffer.
// TODO: clumbsy, remove this function
// TODO: clumsy, remove this function
#[inline]
pub fn get_elements_count(&self) -> usize {
self.get_size() / self.elements_size
Expand Down
2 changes: 1 addition & 1 deletion src/context/capabilities.rs
Expand Up @@ -168,7 +168,7 @@ pub enum ReleaseBehavior {
pub unsafe fn get_capabilities(gl: &gl::Gl, version: &Version, extensions: &ExtensionsList)
-> Capabilities
{
// GL_CONTEXT_FLAGS are only avaialble from GL 3.0 onwards
// GL_CONTEXT_FLAGS are only available from GL 3.0 onwards
let (debug, forward_compatible) = if version >= &Version(Api::Gl, 3, 0) {
let mut val = mem::uninitialized();
gl.GetIntegerv(gl::CONTEXT_FLAGS, &mut val);
Expand Down
8 changes: 4 additions & 4 deletions src/context/mod.rs
Expand Up @@ -83,7 +83,7 @@ pub struct Context {
/// is a normal situation.
framebuffer_objects: Option<fbo::FramebuffersContainer>,

/// We maintain a list of vertex array objecs.
/// We maintain a list of vertex array objects.
vertex_array_objects: vertex_array_object::VertexAttributesSystem,

/// We maintain a list of samplers for each possible behavior.
Expand Down Expand Up @@ -409,7 +409,7 @@ impl Context {
/// # Implementation
///
/// If it has been determined that the context has been lost before, then the function
/// immediatly returns true. Otherwise, calls `glGetGraphicsResetStatus`. If this function
/// immediately returns true. Otherwise, calls `glGetGraphicsResetStatus`. If this function
/// is not available, returns false.
pub fn is_context_lost(&self) -> bool {
if self.state.borrow().lost_context {
Expand Down Expand Up @@ -437,7 +437,7 @@ impl Context {

/// Returns the behavior when the current OpenGL context is changed.
///
/// The most common value is `Flush`. In order to get `None` you must explicitely request it
/// The most common value is `Flush`. In order to get `None` you must explicitly request it
/// during creation.
#[inline]
pub fn get_release_behavior(&self) -> ReleaseBehavior {
Expand Down Expand Up @@ -597,7 +597,7 @@ impl Context {
///
/// This is helpful to understand where you are when you have big applications.
///
/// Returns `Err` if the backend doesn't support this functionnality. You can choose whether
/// Returns `Err` if the backend doesn't support this functionality. You can choose whether
/// to call `.unwrap()` if you want to make sure that it works, or `.ok()` if you don't care.
pub fn insert_debug_marker(&self, marker: &str) -> Result<(), ()> {
let ctxt = self.make_current();
Expand Down
2 changes: 1 addition & 1 deletion src/debug.rs
Expand Up @@ -158,7 +158,7 @@ impl TimestampQuery {

/// Queries the counter to see if the timestamp is already available.
///
/// It takes some time to retreive the value, during which you can execute other
/// It takes some time to retrieve the value, during which you can execute other
/// functions.
pub fn is_ready(&self) -> bool {
use std::mem;
Expand Down
8 changes: 4 additions & 4 deletions src/draw_parameters/blend.rs
Expand Up @@ -89,7 +89,7 @@ pub enum BlendingFunction {
destination: LinearBlendingFactor,
},

/// For each individual component (red, green, blue, and alpha), a weighted substraction
/// For each individual component (red, green, blue, and alpha), a weighted subtraction
/// of the source by the destination.
///
/// The result is equal to `source_component * source_factor - dest_component * dest_factor`,
Expand All @@ -103,7 +103,7 @@ pub enum BlendingFunction {
destination: LinearBlendingFactor,
},

/// For each individual component (red, green, blue, and alpha), a weighted substraction
/// For each individual component (red, green, blue, and alpha), a weighted subtraction
/// of the destination by the source.
///
/// The result is equal to `-source_component * source_factor + dest_component * dest_factor`,
Expand Down Expand Up @@ -168,14 +168,14 @@ pub enum LinearBlendingFactor {
/// in `Blend::const_value`.
ConstantColor,

/// Multiply the source or destination compoent by `1.0` minus the corresponding
/// Multiply the source or destination component by `1.0` minus the corresponding
/// value in `Blend::const_value`.
OneMinusConstantColor,

/// Multiply the source or destination component by the alpha value of `Blend::const_value`.
ConstantAlpha,

/// Multiply the source or destination componet by `1.0` minus the alpha value of
/// Multiply the source or destination component by `1.0` minus the alpha value of
/// `Blend::const_value`.
OneMinusConstantAlpha,
}
Expand Down
4 changes: 2 additions & 2 deletions src/draw_parameters/query.rs
Expand Up @@ -618,7 +618,7 @@ impl QueryExt for RawQuery {
}
}

// de-activating the existing conditionnal render first
// de-activating the existing conditional render first
if ctxt.state.conditional_render.is_some() {
RawQuery::end_conditional_render(ctxt);
}
Expand Down Expand Up @@ -749,7 +749,7 @@ macro_rules! impl_helper {
/// This function doesn't block. Instead it submits a commands to the GPU's commands
/// queue and orders the GPU to write the result of the query to a buffer.
///
/// This operation is not necessarly supported everywhere.
/// This operation is not necessarily supported everywhere.
#[inline]
pub fn to_buffer_u32(&self, target: BufferSlice<u32>)
-> Result<(), ToBufferError>
Expand Down
2 changes: 1 addition & 1 deletion src/index/mod.rs
Expand Up @@ -107,7 +107,7 @@ impl<'a> IndicesSource<'a> {
/// type](https://msdn.microsoft.com/en-us/library/windows/desktop/bb205124%28v=vs.85%29.aspx).
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum PrimitiveType {
/// Each vertex is an invidiual point.
/// Each vertex is an individual point.
Points,

/// Vertices are grouped by chunks of two vertices. Each chunk represents a line.
Expand Down
10 changes: 5 additions & 5 deletions src/lib.rs
Expand Up @@ -194,7 +194,7 @@ pub trait GlObject {
// TODO: Handle(null()) is equal to Id(0)
#[derive(PartialEq, Eq, Copy, Clone, Debug, Hash)]
pub enum Handle {
/// A numberic identifier.
/// A numeric identifier.
Id(gl::types::GLuint),
/// A `GLhandleARB`.
Handle(gl::types::GLhandleARB),
Expand Down Expand Up @@ -473,7 +473,7 @@ pub struct BlitTarget {
/// # What does the GPU do when you draw?
///
/// This is a summary of everything that happens when you call the `draw` function. Note that
/// this is not necessarly *exactly* what happens. Backends are free to do whatever they want
/// this is not necessarily *exactly* what happens. Backends are free to do whatever they want
/// as long as it always matches the expected outcome.
///
/// ## Step 1: Vertex shader
Expand Down Expand Up @@ -894,7 +894,7 @@ pub enum DrawError {

},

/// A non-existant subroutine was referenced.
/// A non-existent subroutine was referenced.
SubroutineNotFound {
/// The stage the subroutine was searched for.
stage: program::ShaderStage,
Expand Down Expand Up @@ -972,7 +972,7 @@ impl Error for DrawError {
SubroutineUniformMissing { .. } =>
"Not all subroutine uniforms of a shader stage were set",
SubroutineNotFound { .. } =>
"A non-existant subroutine was referenced",
"A non-existent subroutine was referenced",
UnsupportedVerticesPerPatch =>
"The number of vertices per patch that has been requested is not supported",
TessellationNotSupported =>
Expand All @@ -986,7 +986,7 @@ impl Error for DrawError {
VerticesSourcesLengthMismatch =>
"If you don't use indices, then all vertices sources must have the same size",
TransformFeedbackNotSupported =>
"Requested not to draw primitves, but this is not supported by the backend",
"Requested not to draw primitives, but this is not supported by the backend",
WrongQueryOperation =>
"Wrong query operation",
SmoothingNotSupported =>
Expand Down
2 changes: 1 addition & 1 deletion src/program/compute.rs
Expand Up @@ -67,7 +67,7 @@ impl ComputeShader {

/// Executes the compute shader.
///
/// `x * y * z` work groups will be started. The current work group can be retreived with
/// `x * y * z` work groups will be started. The current work group can be retrieved with
/// `gl_WorkGroupID`. Inside each work group, additional local work groups can be started
/// depending on the attributes of the compute shader itself.
#[inline]
Expand Down
4 changes: 2 additions & 2 deletions src/program/mod.rs
Expand Up @@ -35,7 +35,7 @@ pub fn is_tessellation_shader_supported<C: ?Sized>(ctxt: &C) -> bool where C: Ca
shader::check_shader_type_compatibility(ctxt, gl::TESS_CONTROL_SHADER)
}

/// Returns true if the backend supports creating and retreiving binary format.
/// Returns true if the backend supports creating and retrieving binary format.
#[inline]
pub fn is_binary_supported<C: ?Sized>(ctxt: &C) -> bool where C: CapabilitiesSource {
ctxt.get_version() >= &Version(Api::Gl, 4, 1) || ctxt.get_version() >= &Version(Api::GlEs, 2, 0)
Expand Down Expand Up @@ -170,7 +170,7 @@ impl From<ProgramCreationError> for ProgramChooserCreationError {
}
}

/// Error while retreiving the binary representation of a program.
/// Error while retrieving the binary representation of a program.
#[derive(Copy, Clone, Debug)]
pub enum GetBinaryError {
/// The backend doesn't support binary.
Expand Down
2 changes: 1 addition & 1 deletion src/program/reflection.rs
Expand Up @@ -37,7 +37,7 @@ pub struct Uniform {
/// Information about a uniform block (except its name).
#[derive(Debug, Clone)]
pub struct UniformBlock {
/// Indentifier of the block.
/// Identifier of the block.
///
/// This is internal information, you probably don't need to use it.
pub id: i32,
Expand Down
2 changes: 1 addition & 1 deletion src/sync.rs
Expand Up @@ -10,7 +10,7 @@ use std::rc::Rc;

use std::thread;

/// Error that happens when sync functionnalities are not supported.
/// Error that happens when sync functionalities are not supported.
#[derive(Copy, Clone, Debug)]
pub struct SyncNotSupportedError;

Expand Down
2 changes: 1 addition & 1 deletion src/texture/get_format.rs
Expand Up @@ -35,7 +35,7 @@ impl Error for GetFormatError {

/// Internal format of a texture.
///
/// The actual format of a texture is not necessarly one of the predefined ones, so we have
/// The actual format of a texture is not necessarily one of the predefined ones, so we have
/// to use a very generic description.
// TODO: change bits to be u16 for consistency with the rest of the library
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
Expand Down
2 changes: 1 addition & 1 deletion src/uniforms/mod.rs
Expand Up @@ -3,7 +3,7 @@ A uniform is a global variable in your program. In order to draw something, you
give `glium` the values of all your uniforms. Objects that implement the `Uniform` trait are
here to do that.
There are two primarly ways to do this. The first one is to create your own structure and put
There are two primarily ways to do this. The first one is to create your own structure and put
the `#[uniforms]` attribute on it. See the `glium_macros` crate for more infos.
The second way is to use the `uniform!` macro provided by glium:
Expand Down
2 changes: 1 addition & 1 deletion src/utils/range.rs
@@ -1,6 +1,6 @@
use std::ops::{Range, RangeTo, RangeFrom, RangeFull};

/// Temporary re-implemenation of RangeArgument from stdlib while
/// Temporary re-implementation of RangeArgument from stdlib while
/// waiting for it to become stable
pub trait RangeArgument<T> {
/// Get the (possible) requested first element of a range.
Expand Down
4 changes: 2 additions & 2 deletions src/vertex/mod.rs
Expand Up @@ -67,7 +67,7 @@ Each source can be:
- A reference to a `VertexBuffer`.
- A slice of a vertex buffer, by calling `vertex_buffer.slice(start .. end).unwrap()`.
- A vertex buffer where each element corresponds to an instance, by
caling `vertex_buffer.per_instance()`.
calling `vertex_buffer.per_instance()`.
- The same with a slice, by calling `vertex_buffer.slice(start .. end).unwrap().per_instance()`.
- A marker indicating a number of vertex sources, with `glium::vertex::EmptyVertexAttributes`.
- A marker indicating a number of instances, with `glium::vertex::EmptyInstanceAttributes`.
Expand Down Expand Up @@ -118,7 +118,7 @@ Note that if you use `index::EmptyIndices` as indices the length of all vertex s
be the same, or a `DrawError::VerticesSourcesLengthMismatch` will be produced.
In all situation, the length of all per-instance sources must match, or
`DrawError::InstancesCountMismatch` will be retured.
`DrawError::InstancesCountMismatch` will be returned.
# Transform feedback
Expand Down
2 changes: 1 addition & 1 deletion tests/query.rs
Expand Up @@ -160,7 +160,7 @@ fn time_elapsed() {
}

#[test]
#[ignore] // not sure about the interaction between pritmives_generated and no geometry shader
#[ignore] // not sure about the interaction between primitives_generated and no geometry shader
fn primitives_generated() {
let display = support::build_display();

Expand Down

0 comments on commit 63577da

Please sign in to comment.