Skip to content

Commit

Permalink
Fixed the typo “{,un}binded” to “{,un}bound”.
Browse files Browse the repository at this point in the history
  • Loading branch information
hadronized committed Mar 7, 2017
1 parent 862be85 commit c242d63
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@
- Deprecated `.into_vertex_buffer_any()` in favor of `.into()`.
- Added `.get_total_bits()` to `texture::InternalFormat`.
- Fixed values in uniform blocks being required to implement the `Default` trait.
- Fixed buffer sometimes not always correctly unbinded.
- Fixed buffer sometimes not always correctly unbound.

## Version 0.5.1 (2015-05-30)

Expand Down
26 changes: 13 additions & 13 deletions src/buffer/alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ impl Alloc {
}
}

/// Makes sure that the buffer is binded to the `GL_PIXEL_PACK_BUFFER` and calls
/// Makes sure that the buffer is bound to the `GL_PIXEL_PACK_BUFFER` and calls
/// `glMemoryBarrier(GL_PIXEL_BUFFER_BARRIER_BIT)` if necessary.
pub fn prepare_and_bind_for_pixel_pack(&self, mut ctxt: &mut CommandContext) {
self.assert_unmapped(ctxt);
Expand All @@ -254,13 +254,13 @@ impl Alloc {
unsafe { bind_buffer(ctxt, self.id, BufferType::PixelPackBuffer); }
}

/// Makes sure that nothing is binded to `GL_PIXEL_PACK_BUFFER`.
/// Makes sure that nothing is bound to `GL_PIXEL_PACK_BUFFER`.
#[inline]
pub fn unbind_pixel_pack(ctxt: &mut CommandContext) {
unsafe { bind_buffer(ctxt, 0, BufferType::PixelPackBuffer); }
}

/// Makes sure that the buffer is binded to the `GL_PIXEL_UNPACK_BUFFER` and calls
/// Makes sure that the buffer is bound to the `GL_PIXEL_UNPACK_BUFFER` and calls
/// `glMemoryBarrier(GL_PIXEL_BUFFER_BARRIER_BIT)` if necessary.
pub fn prepare_and_bind_for_pixel_unpack(&self, mut ctxt: &mut CommandContext) {
self.assert_unmapped(ctxt);
Expand All @@ -274,13 +274,13 @@ impl Alloc {
unsafe { bind_buffer(ctxt, self.id, BufferType::PixelUnpackBuffer); }
}

/// Makes sure that nothing is binded to `GL_PIXEL_UNPACK_BUFFER`.
/// Makes sure that nothing is bound to `GL_PIXEL_UNPACK_BUFFER`.
#[inline]
pub fn unbind_pixel_unpack(ctxt: &mut CommandContext) {
unsafe { bind_buffer(ctxt, 0, BufferType::PixelUnpackBuffer); }
}

/// Makes sure that the buffer is binded to the `GL_QUERY_BUFFER` and calls
/// Makes sure that the buffer is bound to the `GL_QUERY_BUFFER` and calls
/// `glMemoryBarrier(GL_PIXEL_BUFFER_BARRIER_BIT)` if necessary.
pub fn prepare_and_bind_for_query(&self, mut ctxt: &mut CommandContext) {
assert!(ctxt.version >= &Version(Api::Gl, 4, 4) ||
Expand All @@ -298,13 +298,13 @@ impl Alloc {
unsafe { bind_buffer(ctxt, self.id, BufferType::QueryBuffer); }
}

/// Makes sure that nothing is binded to `GL_QUERY_BUFFER`.
/// Makes sure that nothing is bound to `GL_QUERY_BUFFER`.
#[inline]
pub fn unbind_query(ctxt: &mut CommandContext) {
unsafe { bind_buffer(ctxt, 0, BufferType::QueryBuffer); }
}

/// Makes sure that the buffer is binded to the `GL_DRAW_INDIRECT_BUFFER` and calls
/// Makes sure that the buffer is bound to the `GL_DRAW_INDIRECT_BUFFER` and calls
/// `glMemoryBarrier(GL_COMMAND_BARRIER_BIT)` if necessary.
pub fn prepare_and_bind_for_draw_indirect(&self, mut ctxt: &mut CommandContext) {
self.assert_unmapped(ctxt);
Expand All @@ -318,7 +318,7 @@ impl Alloc {
unsafe { bind_buffer(ctxt, self.id, BufferType::DrawIndirectBuffer); }
}

/// Makes sure that the buffer is binded to the `GL_DISPATCH_INDIRECT_BUFFER` and calls
/// Makes sure that the buffer is bound to the `GL_DISPATCH_INDIRECT_BUFFER` and calls
/// `glMemoryBarrier(GL_COMMAND_BARRIER_BIT)` if necessary.
pub fn prepare_and_bind_for_dispatch_indirect(&self, mut ctxt: &mut CommandContext) {
self.assert_unmapped(ctxt);
Expand All @@ -332,7 +332,7 @@ impl Alloc {
unsafe { bind_buffer(ctxt, self.id, BufferType::DispatchIndirectBuffer); }
}

/// Makes sure that the buffer is binded to the indexed `GL_UNIFORM_BUFFER` point and calls
/// Makes sure that the buffer is bound to the indexed `GL_UNIFORM_BUFFER` point and calls
/// `glMemoryBarrier(GL_UNIFORM_BARRIER_BIT)` if necessary.
pub fn prepare_and_bind_for_uniform(&self, ctxt: &mut CommandContext, index: gl::types::GLuint,
range: Range<usize>)
Expand All @@ -348,7 +348,7 @@ impl Alloc {
self.indexed_bind(ctxt, BufferType::UniformBuffer, index, range);
}

/// Makes sure that the buffer is binded to the indexed `GL_SHARED_STORAGE_BUFFER` point and calls
/// Makes sure that the buffer is bound to the indexed `GL_SHARED_STORAGE_BUFFER` point and calls
/// `glMemoryBarrier(GL_SHADER_STORAGE_BARRIER_BIT)` if necessary.
pub fn prepare_and_bind_for_shared_storage(&self, ctxt: &mut CommandContext, index: gl::types::GLuint,
range: Range<usize>)
Expand All @@ -375,7 +375,7 @@ impl Alloc {
self.indexed_bind(ctxt, BufferType::TransformFeedbackBuffer, index, range);
}

/// Makes sure that the buffer is binded to a specific bind point.
/// Makes sure that the buffer is bound to a specific bind point.
///
/// The bind point is the value passed to `ty`.
///
Expand All @@ -388,7 +388,7 @@ impl Alloc {
unsafe { bind_buffer(ctxt, self.id, ty); }
}

/// Makes sure that the buffer is binded to a specific indexed bind point.
/// Makes sure that the buffer is bound to a specific indexed bind point.
///
/// The bind point is the value passed to `ty`.
///
Expand Down Expand Up @@ -1553,7 +1553,7 @@ unsafe fn copy_buffer(ctxt: &mut CommandContext, source: gl::types::GLuint,
let source_bind_point = match find_bind_point(ctxt, source) {
Some(p) => p,
None => {
// if the source is not binded and the destination is binded to COPY_READ,
// if the source is not bound and the destination is bound to COPY_READ,
// we bind the source to COPY_WRITE instead, to avoid a state change
if ctxt.state.copy_read_buffer_binding == dest {
bind_buffer(ctxt, source, BufferType::CopyWriteBuffer)
Expand Down
2 changes: 1 addition & 1 deletion src/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub struct Context {
/// Contains the pointers to OpenGL functions.
gl: gl::Gl,

/// The current state of the OpenGL state machine. Contains for example which buffer is binded
/// The current state of the OpenGL state machine. Contains for example which buffer is bound
/// to which bind point, whether depth testing is activated, etc.
state: RefCell<GlState>,

Expand Down
22 changes: 11 additions & 11 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,40 +213,40 @@ trait BufferExt {
/// Binds the buffer to `GL_ELEMENT_ARRAY_BUFFER` regardless of the current vertex array object.
fn bind_to_element_array(&self, &mut CommandContext);

/// Makes sure that the buffer is binded to the `GL_PIXEL_PACK_BUFFER` and calls
/// Makes sure that the buffer is bound to the `GL_PIXEL_PACK_BUFFER` and calls
/// `glMemoryBarrier(GL_PIXEL_BUFFER_BARRIER_BIT)` if necessary.
fn prepare_and_bind_for_pixel_pack(&self, &mut CommandContext);

/// Makes sure that nothing is binded to `GL_PIXEL_PACK_BUFFER`.
/// Makes sure that nothing is bound to `GL_PIXEL_PACK_BUFFER`.
fn unbind_pixel_pack(&mut CommandContext);

/// Makes sure that the buffer is binded to the `GL_PIXEL_UNPACK_BUFFER` and calls
/// Makes sure that the buffer is bound to the `GL_PIXEL_UNPACK_BUFFER` and calls
/// `glMemoryBarrier(GL_PIXEL_BUFFER_BARRIER_BIT)` if necessary.
fn prepare_and_bind_for_pixel_unpack(&self, &mut CommandContext);

/// Makes sure that nothing is binded to `GL_PIXEL_UNPACK_BUFFER`.
/// Makes sure that nothing is bound to `GL_PIXEL_UNPACK_BUFFER`.
fn unbind_pixel_unpack(&mut CommandContext);

/// Makes sure that the buffer is binded to the `GL_QUERY_BUFFER` and calls
/// Makes sure that the buffer is bound to the `GL_QUERY_BUFFER` and calls
/// `glMemoryBarrier(GL_PIXEL_BUFFER_BARRIER_BIT)` if necessary.
fn prepare_and_bind_for_query(&self, &mut CommandContext);

/// Makes sure that nothing is binded to `GL_QUERY_BUFFER`.
/// Makes sure that nothing is bound to `GL_QUERY_BUFFER`.
fn unbind_query(&mut CommandContext);

/// Makes sure that the buffer is binded to the `GL_DRAW_INDIRECT_BUFFER` and calls
/// Makes sure that the buffer is bound to the `GL_DRAW_INDIRECT_BUFFER` and calls
/// `glMemoryBarrier(GL_COMMAND_BARRIER_BIT)` if necessary.
fn prepare_and_bind_for_draw_indirect(&self, &mut CommandContext);

/// Makes sure that the buffer is binded to the `GL_DISPATCH_INDIRECT_BUFFER` and calls
/// Makes sure that the buffer is bound to the `GL_DISPATCH_INDIRECT_BUFFER` and calls
/// `glMemoryBarrier(GL_COMMAND_BARRIER_BIT)` if necessary.
fn prepare_and_bind_for_dispatch_indirect(&self, &mut CommandContext);

/// Makes sure that the buffer is binded to the indexed `GL_UNIFORM_BUFFER` point and calls
/// Makes sure that the buffer is bound to the indexed `GL_UNIFORM_BUFFER` point and calls
/// `glMemoryBarrier(GL_UNIFORM_BARRIER_BIT)` if necessary.
fn prepare_and_bind_for_uniform(&self, &mut CommandContext, index: gl::types::GLuint);

/// Makes sure that the buffer is binded to the indexed `GL_SHARED_STORAGE_BUFFER` point and calls
/// Makes sure that the buffer is bound to the indexed `GL_SHARED_STORAGE_BUFFER` point and calls
/// `glMemoryBarrier(GL_SHADER_STORAGE_BARRIER_BIT)` if necessary.
fn prepare_and_bind_for_shared_storage(&self, &mut CommandContext, index: gl::types::GLuint);

Expand Down Expand Up @@ -339,7 +339,7 @@ trait TextureExt {
/// Returns the bind point of the texture.
fn get_bind_point(&self) -> gl::types::GLenum;

/// Makes sure that the texture is binded to the current texture unit and returns the
/// Makes sure that the texture is bound to the current texture unit and returns the
/// bind point to use to access the texture (eg. `GL_TEXTURE_2D`, `GL_TEXTURE_3D`, etc.).
fn bind_to_current(&self, &mut CommandContext) -> gl::types::GLenum;
}
Expand Down
2 changes: 1 addition & 1 deletion src/texture/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ pub enum CubeLayer {
}

impl CubeLayer {
/// In some situations whole cubemaps can be binded at once. If this is the case, each layer
/// In some situations whole cubemaps can be bound at once. If this is the case, each layer
/// of the cubemap has a specific index.
///
/// For example, if you bind a whole cubemap array, then the index `8` will correspond to the
Expand Down
2 changes: 1 addition & 1 deletion src/uniforms/bind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl<U> UniformsExt for U where U: Uniforms {
let mut uniform_buffer_bind_points = Bitsfield::new();
let mut shared_storage_buffer_bind_points = Bitsfield::new();

// Subroutine uniforms must be binded all at once, so we collect them first and process them at the end.
// Subroutine uniforms must be bound all at once, so we collect them first and process them at the end.
// The vec contains the uniform we want to set and the value we want to set it to.
let mut subroutine_bindings: HashMap<program::ShaderStage, Vec<(&program::SubroutineUniform, &str)>, _>
= HashMap::with_hasher(Default::default());
Expand Down
2 changes: 1 addition & 1 deletion src/uniforms/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ pub enum UniformType {
#[derive(Copy)]
pub enum UniformValue<'a> {
/// Contains a handle to the buffer, and a function that indicates whether this buffer
/// can be binded on a block with the given layout.
/// can be bound on a block with the given layout.
/// The last parameter is a sender which must be used to send a `SyncFence` that expires when
/// the buffer has finished being used.
Block(BufferAnySlice<'a>, fn(&program::UniformBlock) -> Result<(), LayoutMismatchError>),
Expand Down
2 changes: 1 addition & 1 deletion src/vertex_array_object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ impl VertexAttributesSystem {
}
}

/// Tells the VAOs system that the currently binded element array buffer will change.
/// Tells the VAOs system that the currently bound element array buffer will change.
pub fn hijack_current_element_array_buffer(ctxt: &mut CommandContext) {
let vaos = ctxt.vertex_array_objects.vaos.borrow_mut();

Expand Down

0 comments on commit c242d63

Please sign in to comment.