fabric-engine/JSSceneGraph — Issue #76: When creating render targets, texture types should be specified using OGL constants.
Author: phtaylor
Created: 2011-11-17 16:03:23+00:00
State: open

e.g.

```

FABRIC.RT.oglDepthRenderTarget = function(size){
return new FABRIC.RT.OGLRenderTarget(
size,
size,
[
new FABRIC.RT.OGLRenderTargetTextureDesc(
1,
new FABRIC.RT.OGLTexture2D(
FABRIC.SceneGraph.OpenGLConstants.GL_DEPTH_COMPONENT,
FABRIC.SceneGraph.OpenGLConstants.GL_DEPTH_COMPONENT,
FABRIC.SceneGraph.OpenGLConstants.GL_FLOAT)
),
new FABRIC.RT.OGLRenderTargetTextureDesc(
2,
new FABRIC.RT.OGLTexture2D(
FABRIC.SceneGraph.OpenGLConstants.GL_RGBA8,
FABRIC.SceneGraph.OpenGLConstants.GL_RGBA,
FABRIC.SceneGraph.OpenGLConstants.GL_UNSIGNED_BYTE)
)
]
)
}
```

the values '1', and '2' are rather mysterious.