removed dysfunctional code
This commit is contained in:
parent
324d7037bf
commit
fe73c3a6b0
@ -281,81 +281,6 @@ initRendering = do
|
|||||||
glCullFace gl_BACK
|
glCullFace gl_BACK
|
||||||
checkError "initRendering"
|
checkError "initRendering"
|
||||||
|
|
||||||
{-renderOverview :: Pioneers ()
|
|
||||||
renderOverview = do
|
|
||||||
liftIO $ do
|
|
||||||
---- RENDER OVERVIEW MAP ------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
bindFramebuffer Framebuffer $= (state ^. gl.glFramebuffer)
|
|
||||||
bindRenderbuffer Renderbuffer $= (state ^. gl.glRenderbuffer)
|
|
||||||
framebufferRenderbuffer
|
|
||||||
Framebuffer
|
|
||||||
DepthAttachment
|
|
||||||
Renderbuffer
|
|
||||||
(state ^. gl.glRenderbuffer)
|
|
||||||
textureBinding Texture2D $= Just (state ^. gl.glMap.renderedMapTexture)
|
|
||||||
|
|
||||||
framebufferTexture2D
|
|
||||||
Framebuffer
|
|
||||||
(ColorAttachment 0)
|
|
||||||
Texture2D
|
|
||||||
(state ^. gl.glMap.renderedMapTexture)
|
|
||||||
0
|
|
||||||
|
|
||||||
-- Render to FrameBufferObject
|
|
||||||
drawBuffers $= [FBOColorAttachment 0]
|
|
||||||
checkError "setup Render-Target"
|
|
||||||
|
|
||||||
clear [ColorBuffer, DepthBuffer]
|
|
||||||
checkError "clear buffer"
|
|
||||||
|
|
||||||
|
|
||||||
currentProgram $= Just (state ^. gl.glMap.mapProgram)
|
|
||||||
|
|
||||||
checkError "setting up buffer"
|
|
||||||
--set up projection (= copy from state)
|
|
||||||
with (distribute frust) $ \ptr ->
|
|
||||||
glUniformMatrix4fv proj 1 0 (castPtr (ptr :: Ptr (L.M44 CFloat)))
|
|
||||||
checkError "copy projection"
|
|
||||||
|
|
||||||
--set up camera
|
|
||||||
let ! cam = getCam camPos zDist' xa ya
|
|
||||||
with (distribute cam) $ \ptr ->
|
|
||||||
glUniformMatrix4fv vmat 1 0 (castPtr (ptr :: Ptr (L.M44 CFloat)))
|
|
||||||
checkError "copy cam"
|
|
||||||
|
|
||||||
--set up normal--Mat transpose((model*camera)^-1)
|
|
||||||
let normal' = (case L.inv33 (fmap (^. L._xyz) cam ^. L._xyz) of
|
|
||||||
(Just a) -> a
|
|
||||||
Nothing -> L.eye3) :: L.M33 CFloat
|
|
||||||
nmap = collect id normal' :: L.M33 CFloat --transpose...
|
|
||||||
|
|
||||||
with (distribute nmap) $ \ptr ->
|
|
||||||
glUniformMatrix3fv nmat 1 0 (castPtr (ptr :: Ptr (L.M33 CFloat)))
|
|
||||||
|
|
||||||
checkError "nmat"
|
|
||||||
|
|
||||||
glUniform1f tli (fromIntegral tessFac)
|
|
||||||
glUniform1f tlo (fromIntegral tessFac)
|
|
||||||
|
|
||||||
bindBuffer ArrayBuffer $= Just map'
|
|
||||||
vertexAttribPointer ci $= fgColorIndex
|
|
||||||
vertexAttribArray ci $= Enabled
|
|
||||||
vertexAttribPointer ni $= fgNormalIndex
|
|
||||||
vertexAttribArray ni $= Enabled
|
|
||||||
vertexAttribPointer vi $= fgVertexIndex
|
|
||||||
vertexAttribArray vi $= Enabled
|
|
||||||
checkError "beforeDraw"
|
|
||||||
|
|
||||||
glPatchParameteri gl_PATCH_VERTICES 3
|
|
||||||
|
|
||||||
cullFace $= Just Front
|
|
||||||
|
|
||||||
glDrawArrays gl_PATCHES 0 (fromIntegral numVert)
|
|
||||||
checkError "draw map"
|
|
||||||
-}
|
|
||||||
|
|
||||||
|
|
||||||
-- | renders an IQM-Model at Position with scaling
|
-- | renders an IQM-Model at Position with scaling
|
||||||
renderIQM :: IQM -> L.V3 CFloat -> L.V3 CFloat -> IO ()
|
renderIQM :: IQM -> L.V3 CFloat -> L.V3 CFloat -> IO ()
|
||||||
|
Loading…
Reference in New Issue
Block a user