MCPcopy Create free account
hub / github.com/17cupsofcoffee/nova / rebind

Method rebind

src/graphics.rs:249–258  ·  view source on GitHub ↗

Rebind everything to the current state. You should never need to call this, unless you're manipulating `.gl()` directly

(&self)

Source from the content-addressed store, hash-verified

247 ///
248 /// You should never need to call this, unless you're manipulating `.gl()` directly
249 pub fn rebind(&self) {
250 unsafe {
251 self.state.gl.bind_vertex_array(Some(self.state.vao));
252 }
253 self.bind_vertex_buffer(self.state.current_vertex_buffer.take());
254 self.bind_index_buffer(self.state.current_index_buffer.take());
255 self.bind_shader(self.state.current_shader.take());
256 self.bind_texture(self.state.current_texture.take());
257 self.bind_canvas(self.state.current_canvas.take());
258 }
259}
260
261pub trait Target {

Callers

nothing calls this directly

Calls 5

bind_vertex_bufferMethod · 0.80
bind_index_bufferMethod · 0.80
bind_shaderMethod · 0.80
bind_textureMethod · 0.80
bind_canvasMethod · 0.80

Tested by

no test coverage detected