Skip to content

Commit 46d197f

Browse files
committed
Exports
1 parent ff7e6ab commit 46d197f

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

src/Graphics/WebGLAll.purs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
-----------------------------------------------------------------------------
1414

1515
module Graphics.WebGLAll (
16-
module Graphics.WebGL
17-
, module Graphics.WebGLFramebuffer
18-
, module Graphics.WebGLTexture
19-
, module Control.Monad.Eff.WebGL
16+
module X1,
17+
module X2,
18+
module X3,
19+
module X4
2020
) where
2121

22-
import Graphics.WebGL (Bool, Buffer, ContextAttributes, Float, Mat2, Mat3, Mat4, Sampler2D, Vec2, Vec3, Vec4, WebGLContext, WebGLProg, Attribute(Attribute), BlendEquation(BLEND_EQUATION, BLEND_EQUATION_ALPHA, BLEND_EQUATION_RGB, FUNC_ADD, FUNC_REVERSE_SUBTRACT, FUNC_SUBTRACT), BlendingFactor(BLEND_COLOR, BLEND_DST_ALPHA, BLEND_DST_RGB, BLEND_SRC_ALPHA, BLEND_SRC_RGB, CONSTANT_ALPHA, CONSTANT_COLOR, DST_ALPHA, DST_COLOR, ONE, ONE_MINUS_CONSTANT_ALPHA, ONE_MINUS_CONSTANT_COLOR, ONE_MINUS_DST_ALPHA, ONE_MINUS_DST_COLOR, ONE_MINUS_SRC_ALPHA, ONE_MINUS_SRC_COLOR, SRC_ALPHA, SRC_ALPHA_SATURATE, SRC_COLOR, ZERO), BufferTarget(ARRAY_BUFFER, ELEMENT_ARRAY_BUFFER), Capacity(BLEND, CULL_FACE, DEPTH_TEST, POLYGON_OFFSET_FILL, SCISSOR_TEST), Func(ALWAYS, EQUAL, GEQUAL, GREATER, LEQUAL, LESS, NEVER, NOTEQUAL), Mask(COLOR_BUFFER_BIT, DEPTH_BUFFER_BIT, STENCIL_BUFFER_BIT), Mode(LINES, LINE_LOOP, LINE_STRIP, POINTS, TRIANGLES, TRIANGLE_FAN, TRIANGLE_STRIP), Shaders(Shaders), Uniform(Uniform), bindBuf, bindBufAndSetVertexAttr, blendColor, blendEquation, blendEquationSeparate, blendFunc, blendFuncSeparate, clear, clearColor, clearDepth, clearStencil, colorMask, defContextAttributes, depthFunc, disable, disableVertexAttribArray, drawArr, drawElements, enable, enableVertexAttribArray, fillBuffer, getCanvasHeight, getCanvasWidth, isContextLost, isEnabled, makeBuffer, makeBufferDyn, makeBufferFloat, makeBufferFloatDyn, requestAnimationFrame, runWebGL, runWebGLAttr, setUniformBoolean, setUniformFloats, vertexPointer, viewport, withShaders)
23-
import Graphics.WebGLFramebuffer (AttachementPoint(COLOR_ATTACHMENT0, DEPTH_ATTACHMENT, DEPTH_STENCIL_ATTACHMENT, STENCIL_ATTACHMENT), RenderbufferFormat(DEPTH_COMPONENT16, RGB565, RGB5_A1, RGBA4), WebGLBuf(WebGLBuf), WebGLRendBuf(WebGLRendBuf), bindFramebuffer, bindRenderbuffer, checkFramebufferStatus, createFramebuffer, createRenderbuffer, framebufferRenderbuffer, framebufferTexture2D, readPixels, renderbufferStorage, unbindFramebuffer, unbindRenderbuffer)
24-
import Graphics.WebGLTexture (InternalFormat(IF_ALPHA, IF_LUMINANCE, IF_LUMINANCE_ALPHA, IF_RGB, IF_RGBA), SymbolicParameter(PACK_ALIGNMENT, UNPACK_ALIGNMENT, UNPACK_COLORSPACE_CONVERSION_WEBGL, UNPACK_FLIP_Y_WEBGL, UNPACK_PREMULTIPLY_ALPHA_WEBGL), TargetType(TEXTURE_2D, TEXTURE_CUBE_MAP_NEGATIVE_X, TEXTURE_CUBE_MAP_NEGATIVE_Y, TEXTURE_CUBE_MAP_NEGATIVE_Z, TEXTURE_CUBE_MAP_POSITIVE_X, TEXTURE_CUBE_MAP_POSITIVE_Y, TEXTURE_CUBE_MAP_POSITIVE_Z), TexFilterSpec(LINEAR, MIPMAP, NEAREST), TexParName(TEXTURE_MAG_FILTER, TEXTURE_MIN_FILTER, TEXTURE_WRAP_S, TEXTURE_WRAP_T), TexTarget(TTEXTURE_2D, TTEXTURE_CUBE_MAP), TextureType(FLOAT, RGBA, UNSIGNED_BYTE, UNSIGNED_SHORT_4_4_4_4, UNSIGNED_SHORT_5_5_5_1, UNSIGNED_SHORT_5_6_5), WebGLTex(WebGLTex), activeTexture, bindTexture, createTexture, handleLoad2D, newTexture, targetTypeToConst, texture2DFor, unbindTexture, withTexture2D)
25-
import Control.Monad.Eff.WebGL (EffWebGL, WebGl, runWebGl_)
22+
import Graphics.WebGL as X1
23+
import Graphics.WebGLFramebuffer as X2
24+
import Graphics.WebGLTexture as X3
25+
import Control.Monad.Eff.WebGL as X4

src/Graphics/WebGLTexture.purs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,13 @@ texParameteri target pname param = runFn3 texParameteri_ (texTargetToConst targe
190190
pixelStorei :: forall eff. SymbolicParameter -> Int -> EffWebGL eff Unit
191191
pixelStorei symbolicParameter num = runFn2 pixelStorei_ (symbolicParameterToConst symbolicParameter) num
192192

193-
withTexture2D :: forall eff typ. WebGLTex -> Int -> Uniform typ -> Int -> EffWebGL eff Unit
194-
withTexture2D texture index (Uniform sampler) pos = do
193+
withTexture2D :: forall eff typ. WebGLTex -> Int -> Uniform typ -> Int -> EffWebGL eff Unit -> EffWebGL eff Unit
194+
withTexture2D texture index (Uniform sampler) pos continuation = do
195195
activeTexture index
196196
bindTexture TEXTURE_2D texture
197197
uniform1i sampler.uLocation pos
198+
continuation
199+
unbindTexture TEXTURE_2D
198200

199201
bindTexture :: forall eff. TargetType -> WebGLTex -> EffWebGL eff Unit
200202
bindTexture tt (WebGLTex texture) = runFn2 bindTexture_ (targetTypeToConst tt) texture

0 commit comments

Comments
 (0)