Some issues that i would love to hear your opinion about

View: New views
1 Messages — Rating Filter:   Alert me  

Some issues that i would love to hear your opinion about

by sinosoidal :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I have modified SimpleOpenGLControl to implement an OpenGL visualization
system that i had already done under a control, to make it possible to
use inside forms.

Well, i have acomplished that, and now i''m integrating it in another
bigger application which will call it inside a form. This invocation is
done by a thread.

Well, i'm having some kind of initial "glitch and bleeps" for about 2
seconds. Then the images stabalizes and everything perfect.

The application says, i want to open this form (which contains the
opengl control i have created, docked) with this size, and then put it
palying. Well, it really happens, but during those 2 seconds i can see
some kind of black frames alterning between the opengl frames as some
kind of refresh activity was happening to the form.

I would love to hear opinions about this particular issue, as i had no
trouble with the test application that i created for this control.

I also have another problem, but this one is texture related.

When i ported the control, my sample pictures were just two, and always
the same.

Now, before playing, i tell the control to load a set of pictures.

The picture loading mechanism is this:

bool loadImages()
        {
            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));

                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;
        }

In the second time the control is called, something happens:

[System.AccessViolationException: Attempted to read or write protected
memory. This is often an indication that other memory is corrupt.
   at Tao.DevIl.Ilut.ilutGLBindTexImage()
   at Tao.Platform.Windows.OGL.loadImages() in D:\Os meus
documentos\Visual
Studio\Situaction\Situaction\Control\OGLControl\OGl.cs:line 838

But i can't understand why this happens.

Thx for the help,

Best regards,

Nuno
_______________________________________________
Tao-list mailing list
Tao-list@...
http://galactus.ximian.com/mailman/listinfo/tao-list