Function is not support? I don't understand

Started by dubodog, August 20, 2006, 07:54:56

Previous topic - Next topic

dubodog

Exception such as:
java.lang.IllegalStateException: Function is not supported
at org.lwjgl.BufferChecks.checkFunctionAddress(BufferChecks.java:66)
at org.lwjgl.opengl.GL14.glBlendColor(GL14.java:63)
at cn.edu.zju.AnoleGrid.RenderEngine.RenderEngine.init_opengl(RenderEngine.java:165)
at cn.edu.zju.AnoleGrid.RenderEngine.RenderEngine.initRenderEngine(RenderEngine.java:70)
at cn.edu.zju.AnoleGrid.Views.trying.testNewWay.initRenderEnviroment(testNewWay.java:105)
at cn.edu.zju.AnoleGrid.Views.trying.testNewWay.<init>(testNewWay.java:76)
at cn.edu.zju.AnoleGrid.Views.LWJGLView.createPartControl(LWJGLView.java:22)
at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:332)
at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:197)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:566)
at org.eclipse.ui.internal.WorkbenchPage$ActivationList.setActive(WorkbenchPage.java:3842)
at org.eclipse.ui.internal.WorkbenchPage.restoreState(WorkbenchPage.java:2871)
at org.eclipse.ui.internal.WorkbenchWindow.restoreState(WorkbenchWindow.java:1932)
at org.eclipse.ui.internal.Workbench.doRestoreState(Workbench.java:2857)
at org.eclipse.ui.internal.Workbench.access$14(Workbench.java:2805)
at org.eclipse.ui.internal.Workbench$19.run(Workbench.java:1681)
at org.eclipse.ui.internal.Workbench.runStartupWithProgress(Workbench.java:1421)
at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1679)
at org.eclipse.ui.internal.Workbench.access$12(Workbench.java:1650)
at org.eclipse.ui.internal.Workbench$17.run(Workbench.java:1529)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1473)
at org.eclipse.ui.internal.WorkbenchConfigurer.restoreState(WorkbenchConfigurer.java:183)
at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:702)
at org.eclipse.ui.internal.Workbench.init(Workbench.java:1085)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1847)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:169)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
My lwjgl's version is 0.99, I found  the GL14_glBlendColor_pointer system initialized always is 0,I think maybe I have miss some dll file ?
Have somebody meet this exception?or give me some cue? :cry:

Matzon

what graphics card and drivers do you have ?

dubodog

I haven't notice,because this problem has be found in some computers

dubodog

My display card is NVIDIA Riva Tnt2,driver is supported by windows--NVIDIA Riva Tnt2 Model 64/Model 64 pro(nv4_disp.dll)

Matzon

thats only an opengl1.2 card, it does not support GL_ARB_imaging of which glBlendColor is a part of

dubodog

I selected other device of which diplay card is NVIDIA Geforce2 MX/MX 400, but same problem ,why? NVIDIA Geforce2 MX/MX 400 can't supported?

darkprophet

if (GLContext.getCapabilities().OpenGL14) {
  use14();	
}
if (GLContext.getCapabilities().GL_ARB_imaging) {
  useARB_Imaging();
}


DP

dubodog

I regreted that  when i modify the call of the function of GL14,the other function display exception too, such as:
java.lang.IllegalStateException: Function is not supported
   at org.lwjgl.BufferChecks.checkFunctionAddress(BufferChecks.java:67)
   at org.lwjgl.opengl.ARBPointParameters.glPointParameterARB(ARBPointParameters.java:28)
   at cn.edu.zju.AnoleGrid.RenderEngine.ParticleSystem.ParticleSystem.begineParticleRender(ParticleSystem.java:147)
   at cn.edu.zju.AnoleGrid.Views.trying.testNewWay.renderScene(testNewWay.java:130)
   at cn.edu.zju.AnoleGrid.Views.trying.testNewWay$1.run(testNewWay.java:315)
   at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)

So, What  Can I do? thanks

Matzon

you can stop using functions your graphics card doesn't support...
and like darkprophet wrote, you could also try and test for ARB_imaging and try that instead of the 1.4 methods

dubodog

I am a freshman of lwjgl and openGL ,can you speak particularly or can you give me a example?thanks

Matzon

usually before a function becomes an official method like GL14.glBlendColor it is added via an extension like GL_ARB_Imaging.
So a method may be accessible through its extension or later versions via the core methods.
So if GL14.glBlendColor isn't available, maybe ARBImaging.glBlendColor is. However this isn't guarenteed.
The ARB_Imaging subset is an optional part of OpenGL 1.2, so some cards may not support it.
Therefore before using it you must test for ARB_Imaging availability. If it isn't available, then there is nothing to do - but use another way to do it.

http://www.opengl.org/documentation/specs/version1.2/opengl1.2.1.pdf  page 76

dubodog

Thanks very much to Matzon and darkprophet! I altered my display card to Geforce4MX400 or Geforce6200 ,then my program run successfully . But I have to take money to buy a new card! :cry:
I have a question : May I deal with this problem by updating my display card's driver ?If that ,I would be very happy ! :P
thanks again!

Matzon

drivers wont help you, no - you need a new card, or stop using that funnction :)

dubodog

Thanks all! I take it! It is windows display card driver's problem! I replaced the XP display card driver with TNT2 driver,then my program runs successfully!

Evil-Devil

Quote from: "dubodog"I replaced the XP display card driver with TNT2 driver,then my program runs successfully!
Note, NEVER use Windows default drivers. The only handle common features, if they do.