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
;32bit x86 code | |
[bits 32] | |
[section .text] | |
global _start | |
_start: | |
;linux specific | |
;interrupt 80hex for system calls |
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
extern crate sdl2; | |
extern crate gl; | |
extern crate image; | |
use sdl2::video::GLProfile; | |
use gl::types::*; | |
use image::GenericImageView; | |
static WIN_W : u32 = 800; | |
static WIN_H : u32 = 800; |
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
test.com: test.asm | |
%.com: %.asm | |
nasm -o $@ -f bin $< | |
.PHONY: clean | |
clean: | |
rm -f test.com |
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
; vi:filetype=nasm: | |
bits 16 | |
; DOS loads COM programs at offset 100h (256) of the program segment | |
; therefore we need to let the assembler know, that everything should | |
; start from address 100h | |
org 100h | |
; video bios (10h) call 00h: set video mode | |
; ah: 00h, al: video mode number | |
mov ax, 13h ; mode 13h (320x200 8bpp) |
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
bits 16 | |
; DOS loads COM programs at offset 100h (256) of the program segment | |
; therefore we need to let the assembler know, that everything should | |
; start from address 100h | |
org 100h | |
; video bios (10h) call 00h: set video mode | |
; ah: 00h, al: video mode number | |
mov ax, 13h ; mode 13h (320x200 8bpp) | |
int 10h |
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
[require] | |
fbsize 800 600 | |
[vertex shader passthrough] | |
[fragment shader] | |
#version 450 | |
layout(location = 0) out vec4 out_color; |
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
#!/bin/bash | |
PS1="[isolated] $PS1" | |
export VK_ICD_FILENAMES=$HOME/igalia/install/share/vulkan/icd.d/intel_icd.x86_64.json | |
#export VK_ICD_FILENAMES=$HOME/igalia/install/share/vulkan/icd.d/radeon_icd.x86_64.json | |
export PATH=$PATH:$HOME/igalia/install/bin | |
export LD_LIBRARY_PATH=$HOME/igalia/install/lib | |
export LD_RUN_PATH=$HOME/igalia/install/lib | |
export XDG_DATA_DIRS=$XDG_DATA_DIRS:$HOME/igalia/install/share |
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
{ | |
unsigned char pix[160 * 160 * 4]; | |
FILE *fp; | |
int i; | |
glBindTexture(GL_TEXTURE_2D, gl_tex); | |
glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, pix); | |
if ((fp = fopen("/tmp/foo.ppm", "wb"))) { | |
//fprintf(fp, "P6\n160 160\n255\n"); |
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 430 | |
#extension GL_ARB_separate_shader_objects : enable | |
const vec2 vdata[] = vec2[] ( | |
vec2(1.0, 1.0), | |
vec2(1.0, 0.0), | |
vec2(0.0, 1.0), | |
vec2(0.0, 0.0)); | |
void main() |
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
#!/bin/bash | |
PS1="[isolated] $PS1" | |
export PATH=$PATH:/home/eleni/igalia/install/bin | |
export LD_LIBRARY_PATH=/home/eleni/igalia/install/lib:/home/eleni/igalia/install/lib/x86_64-linux-gnu | |
export LD_RUN_PATH=/home/eleni/igalia/install/lib:/home/eleni/igalia/install/lib/x86_64-linux-gnu | |
export XDG_DATA_DIRS=$XDG_DATA_DIRS:/home/eleni/igalia/install/share | |
export LIBGL_DRIVERS_PATH=/home/eleni/igalia/install/lib/x86_64-linux-gnu/dri/ | |
export MESA_DEBUG=1 | |
#intel specific |