Skip to content

Instantly share code, notes, and snippets.

View jacres's full-sized avatar

James Acres jacres

  • Sudbury, Canada
View GitHub Profile
inline lc::vr::InitResult FromOpenVRInitError( ::vr::EVRInitError _error )
{
switch ( _error )
{
case ::vr::VRInitError_None: return InitResult::Success;
case ::vr::VRInitError_Init_HmdNotFound: return InitResult::Hmd_Not_Found;
case ::vr::VRInitError_Driver_NotLoaded: return InitResult::Library_Load_Failure; // Couldn't load LibOVRRT
case ::vr::VRInitError_Driver_RuntimeOutOfDate: return InitResult::Library_Version_Incompat; // LibOVRRT version incompatibility
<!-- Landing Page v0.0.2, james -->
<widget type="page" id="landing_page">
<widget type="widget_slide_show" id="slideshow">
<!-- Collation menu -->
<widget type="sprite" id="collation" x="0" y="0" hitrect="n">
<widget type="widget_texture_multi_lang" id="title" filename="pe/images/landing/landing_menu_collation_title_%s.png" x="960" y="172" align="center" />
<widget type="sprite" id="buttons" x="1160.5" y="440.5" hitrect="n" hidden="y">
<widget type="widget_texture_multi_lang" id="btn_market_trends" filename="pe/images/landing/landing_nav_market_trends_%s.png" x="0" y="0" align="center" />
switch ( GL_TEXTURE_CUBE_MAP_POSITIVE_X + dir ) {
case GL_TEXTURE_CUBE_MAP_POSITIVE_X:
view = glm::lookAt(lightPos, lightPos + glm::vec3(+1, +0, 0), glm::vec3(0, -1, 0));
break;
case GL_TEXTURE_CUBE_MAP_NEGATIVE_X:
view = glm::lookAt(lightPos, lightPos + glm::vec3(-1, +0, 0), glm::vec3(0, -1, 0));
break;
#!/bin/bash
for ((i=0; i < $3; i++)); do
HEX_COLOR=`od -vAn -N3 -tx1 /dev/urandom | tr -cd 0123456789abcdef`
echo "color: $HEX_COLOR"
curl -L -o "$1x$2_$i.$4" "http://placehold.it/$1x$2/$HEX_COLOR.$4"
done
#!/bin/sh
echo -std=c++11 -I /home/james/development/projects/renderer/external/include -I /home/james/development/projects/renderer/deferred_demo/src -I /usr/lib/gcc/x86_64-unknow
n-linux-gnu/4.8.2/../../../../include/c++/4.8.2 -I /usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../../../include/c++/4.8.2/x86_64-unknown-linux-gnu -I /usr/lib/gcc/x86_
64-unknown-linux-gnu/4.8.2/../../../../include/c++/4.8.2/backward -I /usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/include -I /usr/local/include -I /usr/lib/gcc/x86_64-unkn
own-linux-gnu/4.8.2/include-fixed -I /usr/include
;;; glsl-mode.el --- major mode for Open GLSL shader files
;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
;; Copyright (C) 2011 Jim Hourihan
;;
;; Authors: Xavier.Decoret@imag.fr,
;; Jim Hourihan <jimhourihan ~at~ gmail.com> (updated for 4.3, etc)
;; Keywords: languages
;; Version: 2.0
;; X-URL: http://artis.inrialpes.fr/~Xavier.Decoret/resources/glsl-mode/
clEnqueueReadBuffer(m_clCmdQueue, m_clDeviceLightsPerTile, CL_TRUE, 0, sizeof(cl_int) * skMaxLightsPerTile * globalWorkSize[0] *globalWorkSize[1], m_clHostLightsPerTile, 0, NULL, NULL);
/*
for (int y=0; y<globalWorkSize[1]; ++y) {
for (int x=0; x<globalWorkSize[0]; ++x) {
int tile_index = y * globalWorkSize[0] + x;
for (int i=0; i<skMaxLightsPerTile; ++i) {
@jacres
jacres / gist:6190686
Created August 9, 2013 02:23
unused variable
Window x11Window = glfwGetX11Window( ofAppGLFWWindow::windowP );
Window root, child;
unsigned int mask;
int rootX, rootY, childX, childY;
if(x11Window) { printf("...\n"); }
XQueryPointer( glXGetCurrentDisplay(), x11Window, &root, &child, &rootX, &rootY, &childX, &childY, &mask);
XWarpPointer( glXGetCurrentDisplay(), None, x11Window, 0, 0, 0, 0, m_windowWidth/2, m_windowHeight/2 );
Window x11Window = glfwGetX11Window( ofAppGLFWWindow::windowP );
Window root, child;
unsigned int mask;
int rootX, rootY, childX, childY;
XQueryPointer( glXGetCurrentDisplay(), x11Window, &root, &child, &rootX, &rootY, &childX, &childY, &mask);
XWarpPointer( glXGetCurrentDisplay(), None, x11Window, 0, 0, 0, 0, m_windowWidth/2, m_windowHeight/2 );
(setq package-archives '(("ELPA" . "http://tromey.com/elpa/")
("gnu" . "http://elpa.gnu.org/packages/")
("marmalade" . "http://marmalade-repo.org/packages/")))
(add-to-list 'load-path (expand-file-name "~/.emacs.d"))
(add-to-list 'load-path (expand-file-name "~/.emacs.d/cedet-1.1"))
;; CEDET settings
(load-file "~/.emacs.d/cedet-1.1/common/cedet.el")
(global-ede-mode 1) ; Enable the Project management system