Slight improvement to light sources and shadows
This commit is contained in:
@@ -315,11 +315,6 @@ renderPicture' pdata rot zoom (tranx,trany) (winx,winy) wallPoints lightPoints p
|
||||
bindVertexArrayObject $= Just (_vao $ _triVAO pdata)
|
||||
bindArrayBuffers nTriVs $ _vaoBufferTargets $ _triVAO pdata
|
||||
drawArrays Triangles (fromIntegral firstIndex) (fromIntegral $ nTriVs)
|
||||
-- draw lines, don't need to change the program or vaos, just need to bind the
|
||||
-- vbos and draw
|
||||
bindVertexArrayObject $= Just (_vao $ _lineVAO pdata)
|
||||
bindArrayBuffers nTriVs $ _vaoBufferTargets $ _lineVAO pdata
|
||||
drawArrays Lines (fromIntegral firstIndex) (fromIntegral $ nLineVs)
|
||||
-- draw circles
|
||||
currentProgram $= Just (_circShader pdata)
|
||||
uniform (_uniWinSize pdata) $= Vector2 winx winy
|
||||
@@ -334,6 +329,15 @@ renderPicture' pdata rot zoom (tranx,trany) (winx,winy) wallPoints lightPoints p
|
||||
bindVertexArrayObject $= Just (_vao $ _arcVAO pdata)
|
||||
bindArrayBuffers nArcVs $ _vaoBufferTargets $ _arcVAO pdata
|
||||
drawArrays Points (fromIntegral firstIndex) (fromIntegral $ nArcVs)
|
||||
|
||||
-- reset blend so that light map doesn't apply
|
||||
blendFunc $= (SrcAlpha,OneMinusSrcAlpha)
|
||||
|
||||
-- draw lines
|
||||
currentProgram $= Just (_basicShader pdata)
|
||||
bindVertexArrayObject $= Just (_vao $ _lineVAO pdata)
|
||||
bindArrayBuffers nTriVs $ _vaoBufferTargets $ _lineVAO pdata
|
||||
drawArrays Lines (fromIntegral firstIndex) (fromIntegral $ nLineVs)
|
||||
-- draw text
|
||||
currentProgram $= Just (_textShader pdata)
|
||||
bindVertexArrayObject $= Just (_vao $ _textVAO pdata)
|
||||
|
||||
Reference in New Issue
Block a user