Loadimage with OpenGL on intel chipset

BlitzMax Forums/BlitzMax Programming/Loadimage with OpenGL on intel chipset

sebas76(Posted 2011) [#1]
It seems there is a problem with Loadimage on Intel Chipset G31/33 ?
Because a customer has contacted me for my software crashes ( stop directly) when he loads an image ?
I use first gl driver to display it.

Strange because it works fine on other platform.

Then I made some tests and the result is :
- it works with D3D7Max2DDriver but not with GLMax2Ddriver ?
I don't what it the difference between loadimage in dx or gl mode ?

Please I need some help.

Last edited 2011


GaryV(Posted 2011) [#2]
Has your customer actually installed drivers for his graphics card that support OpenGL?


AdamRedwoods(Posted 2011) [#3]
Intel takes their sweet time making OpenGL drivers, so updating to the latest would be my first recommendation. I can tell you Intel G41 series works fine with LoadImage.

Offhand, I can't think of any reason LoadImage would have OpenGL problems since gfx older than the G31 have worked just fine with this.


GfK(Posted 2011) [#4]
You don't want to be using OpenGL for Windows apps - its far too flakey on various hardware to be reliable (as you've found out).

Use DX9.


sebas76(Posted 2011) [#5]
Yes my customer updates to last drivers without any change.
My software works fine on Intel G41 but not with G31/33 ?

The problem is that I use antialiasing lines that works easy and fine in OpenGL but not with directx7 driver.
So if someone knows how to make antialiasing lines with DX7, it would be fine because the result I get doesn't work at all !

DX9 has strange bugs with my software : the canvas isn't redraw as in opengl or dx7 mode. I just change the driver from dx7 to dx9 and bugs appear !

So for the moment I move to DX7 driver but without antialiasing lines...

Last edited 2011


sebas76(Posted 2011) [#6]
No solution for me ?


AdamRedwoods(Posted 2011) [#7]
It's a difficult problem to pinpoint seeing how LoadImage for opengl works on a large number of chipsets. I assume you have access to an Intel G31 chipset to test, and I'm assuming this is on a Windows OS, you should let us know which version.

Do you have sample code that isolates the problem?
Do you have latest version of BlitzMax/Mingw?

Have you tried loading an image through LoadPixmap? Does that work?
Have you tried drawing simple boxes on the Intel G31/33? Does that work?
Have you tried different flags/turning off flags for LoadImage (DYNAMICIMAGE|MIPMAPPING)?

Is the image loaded through incbin? Maybe it's a problem not with LoadImage but with something else.
Are the images corrupt?

What type of crash? Can it be caught in debug mode?
Have you checked for OpenGL errors? (use glGetError() )

Last edited 2011


SLotman(Posted 2011) [#8]
Also, try using GLShareContexts() before initializing the video... may help out.


sebas76(Posted 2011) [#9]
Yes I know it's difficult to find the bug because I haven't access to an intel G31, it's a customer of my software that has the problem.

I use of course GLsharecontexts()...
I have latest version bmax/mingw.

The only thing I know : my app crashes when loadimage is called.
The images isn't corrupt because it works fine with other graphci card or with dx7 driver.
Maybe I could test with loadpixmap...


SLotman(Posted 2011) [#10]
Are you checking if the image loaded isnt NULL?

Maybe there is an error while loading the image on that computer, and it being NULL for certain will crash your program.


col(Posted 2011) [#11]
Hiya. I would do some kind of hardware capability checks first using opengl. It won't cure the problem but it'll help find where the issue relates.


xlsior(Posted 2011) [#12]
What is image is being loaded?

Is it something that's part of your program, or something that the user supplies on his own?

Other potential issues:
- Unsupported file format?
- Corrupted image file?
- Image too large for videocard to handle? (e.g. >4096 pixels wide or something)

Does the crash happen when you attempt to load, or when you attempt to draw the image?