Jump to content
  • Advertisement
Sign in to follow this  

[.net] Attempted to read or write protected memory with Ilut.ilutGLBindTexImage()

This topic is 4203 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I have an app which uses OpenGL to make a 3D slidshow. I pass it a directory and it processes all the files present in it. I'm having problems with this function by the second time its's called. The result is: [System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at Tao.DevIl.Ilut.ilutGLBindTexImage() My loading function is: bool loadImages() { images = new int[2]; Il.ilGenImages(2, imageIds); // Generate Image Ids for (int i = 0; i < 2; i++) { Console.WriteLine("Loading images!"); Il.ilBindImage(imageIds); // Bind Image Id to Be Current if (!Il.ilLoadImage(imagesName)) { Il.ilDeleteImages(2, imageIds); return false; } Console.WriteLine( "Image name: " + imagesName + " Width: " + Il.ilGetInteger(Il.IL_IMAGE_WIDTH) + " Height: " + Il.ilGetInteger(Il.IL_IMAGE_HEIGHT)); Console.WriteLine("images[" + i + "]"); images = Ilut.ilutGLBindTexImage(); if (Il.ilGetError() != 0) { Console.WriteLine("Image loading error report: " + Ilu.iluErrorString(Il.ilGetError())); Il.ilDeleteImages(2, imageIds); return false; } } return true; } My guess is that the texture that is being updated is being used by the render process, but by the time i do that, i think they are not being used. Can anyone help me finding what is wrong with this? Many thx, Nuno

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!