Sign in to follow this  

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

This topic is 3864 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[i]); // Bind Image Id to Be Current if (!Il.ilLoadImage(imagesName[i])) { Il.ilDeleteImages(2, imageIds); return false; } Console.WriteLine( "Image name: " + imagesName[i] + " Width: " + Il.ilGetInteger(Il.IL_IMAGE_WIDTH) + " Height: " + Il.ilGetInteger(Il.IL_IMAGE_HEIGHT)); Console.WriteLine("images[" + i + "]"); images[i] = 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

This topic is 3864 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this