- graphics (@bvssvni)
- interpolation (@bvssvni)
- texture (@bvssvni)
- viewport (@bvssvni)
- float (@bvssvni)
- read_color (@bvssvni)
- vecmath (@bvssvni)
- piston_window (@bvssvni)
- glutin_window (@bvssvni)
- input (@bvssvni)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root] | |
name = "piston-examples" | |
version = "0.0.0" | |
dependencies = [ | |
"camera_controllers 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", | |
"find_folder 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", | |
"gfx 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", | |
"gfx_device_gl 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", | |
"image 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", | |
"piston-ai_behavior 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[(Range { offset: 20, length: 0, phantom: PhantomData }, StartNode("materials")), (Range { offset: 45, length: 0, phantom: PhantomData }, StartNode("material")), (Range { offset: 45, length: 7, phantom: PhantomData }, String("name", "metal")), (Range { offset: 86, length: 3, phantom: PhantomData }, F64("reflectivity", 1)), (Range { offset: 45, length: 59, phantom: PhantomData }, EndNode("material")), (Range { offset: 118, length: 0, phantom: PhantomData }, StartNode("material")), (Range { offset: 118, length: 9, phantom: PhantomData }, String("name", "plastic")), (Range { offset: 161, length: 3, phantom: PhantomData }, F64("reflectivity", 0.5)), (Range { offset: 118, length: 61, phantom: PhantomData }, EndNode("material")), (Range { offset: 20, length: 170, phantom: PhantomData }, EndNode("materials")), (Range { offset: 200, length: 0, phantom: PhantomData }, StartNode("entities")), (Range { offset: 224, length: 0, phantom: PhantomData }, StartNode("entity")), (Range { offset: 248, length: 6, phantom: Phantom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
whitespace { optional }: | |
whitespace? | |
token("whitespace") | |
select( | |
token("?") as optional | |
token("!") as !optional | |
) | |
whitespace? | |
parameter { name, args, value }: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0 CGLSetOption(pname = kCGLGOUseErrorHandler, param = 0) = kCGLNoError | |
1 CGLChoosePixelFormat(attribs = {kCGLPFAOpenGLProfile, kCGLOGLPVersion_3_2_Core, kCGLPFAColorSize, 32, kCGLPFADepthSize, 16, kCGLPFADoubleBuffer, kCGLPFADisplayMask, 4, 0}, pix = &0x7ff0c9d00f10, npix = &2) = kCGLNoError | |
2 CGLSetOption(pname = kCGLGOUseErrorHandler, param = 0) = kCGLNoError | |
3 CGLCreateContext(pix = 0x7ff0c9d00f10, share = NULL, ctx = &0x7ff0ca803600) = kCGLNoError | |
4 CGLSetParameter(ctx = 0x7ff0ca803600, pname = 1236, params = &-909113104) = kCGLNoError | |
5 CGLReleasePixelFormat(pix = 0x7ff0c9d00f10) | |
6 CGLSetSurface(ctx = 0x7ff0ca803600, cid = 0xd97b, wid = 68112, sid = 1642141264) = kCGLNoError | |
8 CGLUpdateContext(ctx = 0x7ff0ca803600) = kCGLNoError | |
9 CGLSetCurrentContext(ctx = 0x7ff0ca803600) = kCGLNoError | |
10 glViewport(x = 0, y = 0, width = 600, height = 600) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rustc examples/draw_state_test.rs | |
--crate-name draw_state_test | |
--crate-type bin | |
-g | |
--out-dir /Users/sven/rust/gfx_graphics/target/debug/examples | |
--emit=dep-info,link | |
-L dependency=/Users/sven/rust/gfx_graphics/target/debug | |
-L dependency=/Users/sven/rust/gfx_graphics/target/debug/deps | |
--extern graphics=/Users/sven/rust/gfx_graphics/target/debug/deps/libgraphics-3ec65f4f2805722e.rlib | |
--extern image=/Users/sven/rust/gfx_graphics/target/debug/deps/libimage-85c07ef1cf5314da.rlib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
impl<'a> ToIndex<usize, &'a [usize]> for Permutation<Data> { | |
fn to_index(&self, dim: usize, pos: &'a [usize]) -> usize { | |
let mut index = 0; | |
let mut count = self.count(dim); | |
for (i, &x) in pos.iter().enumerate() { | |
count /= dim - i; | |
let lower = pos[..i].iter().fold(0, |a, &y| | |
if y < x { a + 1 } else { a }); | |
index += count * (x - lower); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
current! { | |
FOO: bar | |
=> { | |
print_text(); | |
print_text(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Calls closure with a texture constructor enabled. | |
/// This is required to render characters. | |
pub fn with_texture_constructor<'a>(&mut self, texture_constructor: TextureConstructor<'a, T>, f: |&mut UiContext<T>|) { | |
use std::mem::transmute; | |
self.glyph_cache.texture_constructor = | |
Some(unsafe { transmute(texture_constructor) }); | |
f(self); | |
self.glyph_cache.texture_constructor = None; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Failed to run custom build command for `cocoa v0.1.0 (https://github.com/DavidPartouche/rust-cocoa#b9cbbd50)` | |
Process didn't exit successfully: `make -f makefile.msgsend` (status=2) | |
--- stdout | |
cc -Wall src/msgsend.m -o /Users/sven/rust/glutin/target/native/cocoa-ebcc268ffcd672e2/msgsend.o -c | |
--- stderr | |
src/msgsend.m:82:9: warning: incompatible pointer to integer conversion returning 'id' from a function with result type 'char' [-Wint-conversion] | |
return objc_msgSend(theReceiver, theSelector, a); | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
src/msgsend.m:86:15: warning: incompatible pointer types initializing 'NSPoint (*)(id, SEL, NSPoint)' with an expression of type 'NSPoint *' (aka 'struct CGPoint *') [-Wincompatible-pointer-types] |