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
arr = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] | |
for row in arr | |
for col in row | |
print col |
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
print sizeOf(GLfloat) | |
print sizeOf(GLushort) |
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
import VertexShader | |
import FragmentShader | |
Shader | |
init my.vertexShader, my.fragmentShader | |
# Shader info | |
my.program = flua.createGLSLProgram(my.vertexShader.handle, my.fragmentShader.handle) | |
my.attr = flua.createGLSLProgramAttribute(my.program, "coord3d".data) | |
my.colorAttr = flua.createGLSLProgramUniform(my.program, "f_color".data) | |
my.texCoordAttr = flua.createGLSLProgramAttribute(my.program, "texcoord".data) |
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
import flua.Graphics.Flua | |
import flua.Collection.Vector | |
import VertexBuffer | |
import IndexBuffer | |
Mesh | |
init | |
on my | |
# Buffers |
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
import flua.Graphics.Flua | |
VertexBuffer | |
init my.isDynamic = false | |
my.handle = flua.createBuffer() | |
if my.isDynamic | |
my.type = GL_DYNAMIC_DRAW | |
else | |
my.type = GL_STATIC_DRAW |
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
(08:16:14 PM) japro: probably some offset issue with padding bytes or so? | |
(08:16:14 PM) Diniden left the room (quit: Read error: Connection reset by peer). | |
(08:16:33 PM) Bloodust: :DDD | |
(08:16:33 PM) exphc left the room (quit: Quit: Leaving). | |
(08:16:36 PM) Bloodust: nice | |
(08:16:43 PM) Diniden [~Adium@rrcs-50-84-122-158.sw.biz.rr.com] entered the room. | |
(08:18:19 PM) japro: yay finally some structure | |
(08:18:37 PM) japro: now my main "only" has the fbo setup, loop and draw code in it | |
(08:19:04 PM) eurbach: japro: You mean offsets for the VBO? | |
(08:19:24 PM) Yaniel: eurbach: yes |
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
# Creates a cube | |
createCube | |
obj = Mesh() | |
on obj | |
# front | |
addVertex -1.0, -1.0, 1.0, 0.0, 0.0 | |
addVertex 1.0, -1.0, 1.0, 1.0, 0.0 | |
addVertex 1.0, 1.0, 1.0, 1.0, 1.0 | |
addVertex -1.0, 1.0, 1.0, 0.0, 1.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
// This constructor is used by C++ internally. | |
// init | |
inline BPVector3(Int __x, Int __y, Int __z) { | |
this->_x = __x; | |
this->_y = __y; | |
this->_z = __z; | |
} | |
// This constructor is used by C++ internally. | |
// init |
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 python3 python3-pyqt4 git g++ build-essential xorg-dev libx11-dev libxt-dev libxext-dev libgl1-mesa-dev libglu1-mesa-dev libxrandr-dev | |
git clone git://github.com/blitzprog/flua.git | |
./flua/flua-studio.py |
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 python3 python3-pyqt4 git g++ | |
git clone git://github.com/blitzprog/flua.git | |
./flua/flua-studio.py |