Steve132 / uraster

Micro simple Rasterizer in a single C++11 header file.
MIT License
347 stars 25 forks source link

missing CImg.h in bunnyanim.cpp #2

Open kaarrot opened 9 years ago

kaarrot commented 9 years ago

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 commented 9 years ago

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

kaarrot commented 9 years ago

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

Steve132 commented 9 years ago

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.

kaarrot commented 9 years ago

Thanks, indeed resolution was the problem.