uraster icon indicating copy to clipboard operation
uraster copied to clipboard

missing CImg.h in bunnyanim.cpp

Open kaarrot opened this issue 10 years ago • 4 comments

Hi there, Thanks for sharing, I really like the brevity and clarity of the code. I stumble on a small issue with missing header bunnyanim.cpp. Can you point me the source please? Or should I skip it? Thanks

kaarrot avatar Mar 16 '15 05:03 kaarrot

Seems I resloved my problem by downloading the header from link below: http://cimg.sourceforge.net/download.shtml

kaarrot avatar Mar 16 '15 05:03 kaarrot

Wonder if copying the CImg.h is sufficient or should I also include plugins diirectory? At this point

  • triagle example works properly

  • bunny example is leaking and never complets

  • bunnyanim complains about wood texture format:

    CImg] *** CImgIOException *** [instance(0,0,0,0,(nil),non-shared)] CImg::load(): Failed to recognize format of file 'example/woodgrain.jpg'. terminate called after throwing an instance of 'cimg_library::CImgIOException' what(): [instance(0,0,0,0,(nil),non-shared)] CImg::load(): Failed to recognize format of file 'example/woodgrain.jpg'

kaarrot avatar Mar 16 '15 05:03 kaarrot

Hi there

bunny example is leaking and never complets

Try editing the size of the framebuffer. It's not leaking memory to my knowledge, but by default it generates an absolutely giant framebuffer which takes time to render. https://github.com/Steve132/uraster/blob/master/example/bunnystatic.cpp#L126 Change that from 640<<5,480<<5 (which is like 20,000 by 15000) to just 640x480

I'm actually gonna change this in the code now.

bunnyanim complains about wood texture format:

2 possibilities: either the way you are installing CImg is wrong (I don't know how to correctly install CImg under windows, you need to read their documentation for that).

The other possibility is that you need to run bunnyanim from the root source directory so it can find example/woodgrain.jpg. It builds in some other directory so you either need to move it or invoke it from the root source dir.

Steve132 avatar Mar 16 '15 17:03 Steve132

Thanks, indeed resolution was the problem.

kaarrot avatar Mar 17 '15 07:03 kaarrot