Permalink
Browse files

Merge branch 'master' of github.com:fserb/glix

Conflicts:
	TODO
  • Loading branch information...
fserb committed Aug 28, 2011
2 parents 02dd07c + 7b1aad2 commit 00082bd6a7a93c5595a0cb8b1c024b191bc9dda2
Showing with 7 additions and 5 deletions.
  1. +5 −0 objects.js
  2. +2 −5 shader.js
View
@@ -5,4 +5,9 @@ glix.module.objects = function(gl) {
b.bind();
return b.assign();
};
+ gl.remove = function(objectName) {
+ delete gl._objects[objectName];
+ return gl;
+ };
+
};
View
@@ -1,7 +1,4 @@
glix.module.shader = function(gl) {
- // contains all programs currently loaded.
- var programs = {};
-
var loadShader = function(type, name) {
var data;
if (name[0] == "#") {
@@ -102,9 +99,9 @@ glix.module.shader = function(gl) {
gl.program = function(shaderName) {
if (shaderName === undefined) shaderName = "";
- var p = programs[shaderName];
+ var p = gl._objects[shaderName];
if (!p) {
- p = programs[shaderName] = {
+ p = gl._objects[shaderName] = {
_attached: 0,
val: gl.createProgram(),
attrib: {},

0 comments on commit 00082bd

Please sign in to comment.