To see how useful WebGLU can be, check out my 50 line demo.
I need feedback. If you want to do something with WebGL and WebGLU can't help, or using it hurts performance, please let me know!
- Added WGLUShader
- Added WGLUShaderProgram
- Added WGLUTimer
- Added WGLUFPSTracker
- Updated WGLU
- Updated WGLUObject
- Updated WGLUAnimation (still a kludge though)
- Added camera property to store various rendering data (position, target, aspect ratio, etc.)
- Added an internal timer and fps tracker
WGLU.draw()which covers the standard use case (Identity modelview matrix ;perspective and lookAt multiplied projection matrix, params for the perspective and lookAt matricies is taken from the camera propery. Then calls
WGLU.update()which covers the standard use case (tick the timer, update the fps tracker, update all objects)
WGLU.newProgram(name)which initializes a new WGLUShaderProgram and stores it in
- Added logging calls to code, using callbacks instead of
- Added logging callbacks for Firebug, example output below.
- Removed makeQuad and makePyramid until I've updated them
- Removed calculateNormals as I've never actually used it, I'll add it back when I do
- Automatically tracks and manages its compilation status and notifies any shader programs using it if it needs recompilation
- Parses attribute and uniform names and type specific length from the shader source automatically
- Assumes uniforms named 'ModelViewMatrix' and 'ProjectionMatrix' are just that and assigns per object actions to them accordingly. You can also set them yourself with
WGLUShader.getGLShader()[re]compiles the shader if needed, then returns the WebGL shader object usable in WebGL calls.
- Automatically tracks and manages its link status and the compile status of all attached shaders, [re]linking/compiling if needed.
- Keeps track of its shader's attributes, including their name, location from
getAttribLocation, length, and a buffer.
- Keeps track of its shader's uniforms, including their name, and action to perform per object.
- Calls to attach shaders by id (from a script tag), by source code, or as a WGLUShader
- Any created objects are automatically added to WGLU's object list, don't know if I'm going to keep it this way though
- Keeps track of the shader program to use when rendering.
WGLUObject.setElements(elementArray)switches the object to using
WGLUObject.setElements(false)to switch back.
Well, that's the biggest stuff anyway, there's tons of little things though. As promised, here's some logging output.