So I'm working with OpenGL, and DevIL to load some JPEG into my program, and I've had some trouble, I've isolated the program in a simple sample program (uploaded), the program is, that when I load the standard file, that came with the guide ("Geeks3D.jpg") it loades instantly and runs with a CPU usage of 0%, however if I load my own file, I'm getting like a heavy lag, before it loads, and then 100% CPU usage.. My question is, WHY!?

I've uploaded the source code, to change between using: "Geeks3D.jpg" and "Test.jpg", simply comment out "#define _PICTUREONE", in "cdemo.cpp".

The project is made in DevC++, and if you're wanting to use help me out, and only got VC laying around, simply compile with;

freeglut (glut will do)
glu32 
opengl32 
winmm 
gdi32

devil
ilut
ilu

Any help, or idea is welcome, kinda hoping to get this to work soon! :)

So it works, if I fix the resolution into a byte like value, like 128, or 256, ect.

However it still seems like it memory leaks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.