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
// avxSupport uses CPUID to check if the CPU supports AVX | |
// func avxSupport() bool | |
// Return: +0(FP) | |
TEXT ·avxSupport(SB),$0 | |
MOVL $0x1, AX | |
CPUID | |
// AND ECX, 0x18000000 | |
BYTE $0x81; BYTE $0xE1; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x18; |
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
package main | |
import ( | |
"image" | |
"azul3d.org/gfx.v1" | |
"azul3d.org/gfx/window.v2" | |
"azul3d.org/keyboard.v1" | |
"azul3d.org/lmath.v1" | |
"azul3d.org/mouse.v1" |
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
package main | |
import ( | |
"fmt" | |
"github.com/gopherjs/gopherjs/js" | |
) | |
var MainLoopChan = make(chan func(), 1) | |
type Window struct{} |
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
sudo apt-get install autoconf | |
wget http://xcb.freedesktop.org/dist/xcb-proto-1.11.tar.gz | |
tar xzvf xcb-proto-1.11.tar.gz | |
cd xcb-proto-1.11 | |
./autogen.sh | |
./configure | |
sudo make install | |
cd .. |
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
*** Loading state from LOZ.nst | |
nes.state is Running | |
runtime: goroutine stack exceeds 1000000000-byte limit | |
fatal error: stack overflow | |
runtime stack: | |
runtime.throw(0xfe6a19) | |
/home/stephen/go/src/runtime/panic.go:491 +0xad | |
runtime.newstack() | |
/home/stephen/go/src/runtime/stack.c:784 +0x555 |
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
#version 120 | |
varying vec2 tc0; | |
uniform sampler2D Texture0; | |
uniform vec4 palette[64]; | |
void main() { | |
vec4 t = texture2D(Texture0, tc0); | |
int i = int(t.b * 15.0) * 16 + int(t.a * 15.0); |
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
var glslVert = []byte(` | |
#version 120 | |
attribute vec3 Vertex; | |
attribute vec2 TexCoord0; | |
uniform mat4 MVP; | |
uniform vec3 shift; | |
uniform vec3 scale; |
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
gc1(1): 3+2+186+4 us, 2 -> 128 MB, 1016 (1016-0) objects, 12 goroutines, 57/0/0 sweeps, 0(0) handoff, 0(0) steal, 0/0/0 yields | |
gc2(1): 405+2+174+1 us, 128 -> 128 MB, 1016 (1016-0) objects, 12 goroutines, 57/0/0 sweeps, 0(0) handoff, 0(0) steal, 0/0/0 yields | |
gc3(1): 4+4+263+2 us, 0 -> 2 MB, 958 (1416-458) objects, 13 goroutines, 58/1/0 sweeps, 0(0) handoff, 0(0) steal, 0/0/0 yields | |
gc4(1): 474+2+192+2 us, 2 -> 2 MB, 958 (1416-458) objects, 13 goroutines, 58/0/0 sweeps, 0(0) handoff, 0(0) steal, 0/0/0 yields | |
gc5(1): 2+2+198+2 us, 2 -> 10 MB, 2564 (3125-561) objects, 13 goroutines, 67/3/0 sweeps, 0(0) handoff, 0(0) steal, 0/0/0 yields | |
gc6(1): 404+2+182+1 us, 10 -> 10 MB, 2564 (3125-561) objects, 13 goroutines, 67/0/0 sweeps, 0(0) handoff, 0(0) steal, 0/0/0 yields | |
^^^^^ Application initializes ^^^^^ | |
-- Runs without GC here for ~5s -- |
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
GL | |
== | |
This repository holds Go bindings to various OpenGL versions. They are auto-generated using [Glow](github.com/go-gl/glow). | |
Features: | |
- Go functions that mirror the C specification using Go types. | |
- Support for multiple OpenGL APIs (GL/GLES/EGL/WGL/GLX/EGL), versions, and profiles. | |
- Support for extensions (including debug callbacks). |
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
// Copyright 2014 The Azul3D Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style | |
// license that can be found in the LICENSE file. | |
// Example - Demonstrates receiving window events. | |
package main | |
import ( | |
"azul3d.org/gfx.v1" | |
"azul3d.org/gfx/window.v2" |
OlderNewer