Not sure if this is the right place to post this, but I am trying to write a game using SWT and its OpenGL Plugin. I am running into problems when I try to load textures and enable alpha blending. I am loading textures from a PNG file that has an alpha channel defined. The image is loaded by a ImageLoader object into a ImageData object. So far so good. Then when I try to create the texture through the glTexImage2D()
call, an exception is thrown. The following is the exact call:
GL.glTexImage2D(GL.GL_TEXTURE_2D, 0, 4, source.width, source.height, 0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, source.data);
And I get the following error:
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x69042298
NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.
Current Java thread:
at org.eclipse.swt.opengl.GL.glTexImage2D(Native Method)
0x76AC0000 - 0x76ADD000 C:\WINDOWS\SYSTEM\IMAGEHLP.DLL
Local Time = Mon Jun 23 03:25:11 2003
Elapsed Time = 6
# The exception above was detected in native code outside the VM
# Java VM: Java HotSpot(TM) Client VM (1.4.1_03-b02 mixed mode)
# An error report file has been saved as hs_err_pid4293977641.log.
# Please refer to the file for further information.
I don't get this error if the 3rd argument of lTexImage2D is changed from 4 to 3, and when GL.GL_RGBA is changed to GL.GL_RGB.
I am wondering if anyone has came across this problem, or have a clue why this is happening.
Any help is greatly appreciated! Thanks!
btw, I am using Windows 98.