Refactor differing resolutions somewhat
This commit is contained in:
@@ -4,6 +4,7 @@ module Preload.Update (
|
||||
pdataResizeUpdate,
|
||||
) where
|
||||
|
||||
import Dodge.Data.Config
|
||||
import Control.Lens
|
||||
import qualified Data.ByteString as BS
|
||||
import qualified Data.ByteString.Char8 as BSC
|
||||
@@ -14,6 +15,7 @@ import Shader.Compile
|
||||
import Shader.Data
|
||||
|
||||
pdataResizeUpdate ::
|
||||
Configuration ->
|
||||
-- | Scaled width
|
||||
Int ->
|
||||
-- | Scaled height
|
||||
@@ -24,11 +26,12 @@ pdataResizeUpdate ::
|
||||
Int ->
|
||||
PreloadData ->
|
||||
IO PreloadData
|
||||
pdataResizeUpdate xsize ysize xfull yfull pdata = do
|
||||
rd <- renderDataResizeUpdate xsize ysize xfull yfull (_renderData pdata)
|
||||
pdataResizeUpdate cfig xsize ysize xfull yfull pdata = do
|
||||
rd <- renderDataResizeUpdate cfig xsize ysize xfull yfull (_renderData pdata)
|
||||
return (pdata{_renderData = rd})
|
||||
|
||||
renderDataResizeUpdate ::
|
||||
Configuration ->
|
||||
-- | Scaled width
|
||||
Int ->
|
||||
-- | Scaled height
|
||||
@@ -39,8 +42,8 @@ renderDataResizeUpdate ::
|
||||
Int ->
|
||||
RenderData ->
|
||||
IO RenderData
|
||||
renderDataResizeUpdate xsize ysize xfull yfull rdata = do
|
||||
rdata' <- sizeFBOs xsize ysize xfull yfull rdata
|
||||
renderDataResizeUpdate cfig xsize ysize xfull yfull rdata = do
|
||||
rdata' <- sizeFBOs cfig rdata
|
||||
bbVert <- BS.readFile "shader/texture/bloomBlur.vert"
|
||||
bbFrag <- BS.readFile "shader/texture/bloomBlur.frag"
|
||||
let (bh, bmid) = BS.breakSubstring "(" bbFrag
|
||||
|
||||
Reference in New Issue
Block a user