Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing CImg.h in bunnyanim.cpp #2

Open
kaarrot opened this issue Mar 16, 2015 · 4 comments
Open

missing CImg.h in bunnyanim.cpp #2

kaarrot opened this issue Mar 16, 2015 · 4 comments

Comments

@kaarrot
Copy link

kaarrot commented Mar 16, 2015

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
Copy link
Author

kaarrot commented Mar 16, 2015

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

@kaarrot kaarrot closed this as completed Mar 16, 2015
@kaarrot
Copy link
Author

kaarrot commented Mar 16, 2015

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 kaarrot reopened this Mar 16, 2015
@Steve132
Copy link
Owner

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
Copy link
Author

kaarrot commented Mar 17, 2015

Thanks, indeed resolution was the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants