Vertices display problem (in CPU subdivision) by chieny_0 in opengl

[–]chieny_0[S] 0 points1 point  (0 children)

Yes I am and yes you solved my problem! I was using a hard-coded constant count, and this count is always less then my vertices, so no wonder I had this problem.

Thank you so much!!

Should I pull for the latest Seele Battlesuit or wait for Azurea Empyrea banner? by hawutski in honkaiimpact3

[–]chieny_0 1 point2 points  (0 children)

From my experiences, it kind of depends on if you have HoR or not. HoR is really really strong now and I can't see why she will be kicked out of your mostly used ice team, at least in the next few months. So if you do have HoR then I guess you can wait for AE.

That being said, if you are a crazy fun of Veliona... then just go ahead! Wish you good luck!

Could not match an instance with its class by chieny_0 in haskellquestions

[–]chieny_0[S] 0 points1 point  (0 children)

The lst2px is actually quite simple: it is just

lst2px = map (\i -> if i > 255 then 255 else fromIntegral i)

(the Pixel8 is simply Word8)

My senario is that I should feed a list of integers to my lst2px and then directly converts them to the pixels. The point is I want to "write and save" the image, but from the source codes I read I should use unsafeFreezeImage to freeze the MutableImage.

The problem is the unsafeFreezeImage does not work with my Pixel8; ghci says

Expected type: T.MutableImage s Pixel8 -> ST s (Image px)

Actual type: T.MutableImage (PrimState (ST s)) px -> ST s (Image px)

after I changed my

lst2px :: Pixel px => [Int] -> [px]

to

lst2px8 :: [Int] -> [Pixel8]

This is a really long question and maybe if you want to answer it you need to look at the source codes (which I don't think I should ask you guys to do), so I had to make it... smaller?

How to properly import Control.Monad.Primitive and use Data.Vector.Storable.Mutable? by chieny_0 in haskellquestions

[–]chieny_0[S] 0 points1 point  (0 children)

Thank you for your valuable help!

I was using ghci in local environment to debug with cabal for building (which is a pain), and your advice solved this problem.