Skip to content

Instantly share code, notes, and snippets.

Paul Rouget paulrouget

Block or report user

Report or block paulrouget

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@paulrouget
paulrouget / demo.html
Created Sep 4, 2019
babylonjs webxr basic demo
View demo.html
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/pep/0.4.2/pep.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.6.2/dat.gui.min.js"></script>
<script src="https://preview.babylonjs.com/ammo.js"></script>
<script src="https://preview.babylonjs.com/cannon.js"></script>
<script src="https://preview.babylonjs.com/Oimo.js"></script>
<script src="https://preview.babylonjs.com/gltf_validator.js"></script>
<script src="https://preview.babylonjs.com/earcut.min.js"></script>
View bindgen output
Bindgen generates this struct:
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pthread_mutex_t {
pub value: ::std::os::raw::c_int,
}
That's valid and it works, but everytime I want to use
this `pthread_mutex_t` type with `libc::pthread_mutex_lock()`
View VRExternalDisplay.rs
impl VRDisplay for VRExternalDisplay {
fn data(&self) -> VRDisplayData {
let mut data = VRDisplayData::default();
let state: &mozgfx::VRDisplayState = &self.shmem().state.displayState;
data.display_name = state.mDisplayName.iter().map(|x| *x as char).collect();
data.display_id = self.display_id;
data.connected = state.mIsConnected;
// FIXME: better option than != 0?
View gist:bfc4fe27b8924094c89d0d77643e4c29
mozconfig:
# Build Firefox for Android Artifact Mode:
ac_add_options --enable-application=mobile/android
ac_add_options --target=arm-linux-androideabi
ac_add_options --enable-artifact-builds
# With the following java and javac:
ac_add_options --with-java-bin-path="/Library/Java/Home/bin"
# With the following Android SDK:
ac_add_options --with-android-sdk="/Users/paul/.mozbuild/android-sdk-macosx"
View gist:d6e3d62c5fd03af96b3338cf9414335d
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
* frame #0: 0x00007fff7301dbf2 libsystem_kernel.dylib`__munmap + 10
frame #1: 0x000000010a0cbf93 cargo`p_munmap + 19
frame #2: 0x000000010a08af89 cargo`append_to_pack + 233
frame #3: 0x000000010a08a516 cargo`git_indexer_append + 70
frame #4: 0x000000010a09af63 cargo`write_one + 835
frame #5: 0x000000010a099357 cargo`write_pack + 1079
frame #6: 0x000000010a0bfc6d cargo`local_download_pack + 829
frame #7: 0x000000010a0aa462 cargo`git_remote_download + 1170
frame #8: 0x000000010a0aa5c4 cargo`git_remote_fetch + 196
View cargo.lock.diff
diff --git a/rust/Cargo.lock b/rust/Cargo.lock
index a49640b..9d60f18 100644
--- a/rust/Cargo.lock
+++ b/rust/Cargo.lock
@@ -4,7 +4,7 @@ version = "0.1.0"
dependencies = [
"gl_generator 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)",
- "libservo 0.0.1",
+ "libservo 0.0.1 (git+https://github.com/servo/servo?rev=2a179cec2b)",
View keybase.md

Keybase proof

I hereby claim:

  • I am paulrouget on github.
  • I am paulrouget (https://keybase.io/paulrouget) on keybase.
  • I have a public key whose fingerprint is 5BC6 7A83 E845 BDE7 8675 869B 7B8F D971 72B4 5100

To claim this, I am signing this object:

View api.rs
// Embedder implements:
// Main thread only
pub trait GLPlatormMethods {
fn get_gl(&self) -> Rc<gl::Gl>;
fn make_current(&self) -> Result<(),()>;
fn swap_buffers(&self);
}
// Thread safe
View ports.patch
diff --git a/ports/glutin/window.rs b/ports/glutin/window.rs
index ddd5398845..0f69b30a9e 100644
--- a/ports/glutin/window.rs
+++ b/ports/glutin/window.rs
@@ -1179,7 +1179,15 @@ impl WindowMethods for Window {
}
fn prepare_for_composite(&self, _width: usize, _height: usize) -> bool {
- true
+ match self.kind {
View test.rs
extern crate synchro_servo;
extern crate synchro_glwindows;
use synchro_glwindows::{GLWindow, GLWindowId};
use synchro_servo::{Constellation, Compositor, DrawableGeometry, View, Browser, ServoUrl};
fn main() {
let url = ServoUrl::parse("http://example.com").unwrap();
You can’t perform that action at this time.