ilGetInteger Height/Width not Working Right

Help
8bit
2010-03-14
2013-05-02
  • 8bit

    8bit - 2010-03-14

    I'm using DevIL to load my images that I'm using to bind as textures. I am also using ilGetInteger( IL_IMAGE_WIDTH ) and ilGetInteger( IL_IMAGE_HEIGHT ) to get the width and height. For some reason, though, every image I call, no matter its original size, is always set to the same size.

    I want them to be the size of the original images.

    Here is my graphics header:

    http://codepad.org/FFxqmjGL

    Here is my common header:

    http://codepad.org/xh9p2z2Q

    Here is my main cpp file:

    http://codepad.org/3bch9WPm

    Here are the images I'm trying to load/bind:




    Here is my output:

     
  • 8bit

    8bit - 2010-03-14

    Nevermind, I solved it.

    I just removed these lines:

    ILuint texid;
    ilGenImages( 1, &texid );
    ilBindImage( texid );

           ilDeleteImages(1, &texid);

    And it worked.

    I have no idea what those did, or how my code can work without them, though. If anyone reading this knows, I'd love if you'd enlighten me.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks