Skip to main content

Codes work on Applet but not on Application

3 replies [Last post]
gzdillon
Offline
Joined: 2010-10-18

My code worked well before I clean regedit, now the problem is the same code work well on Applet, but not on Application. I get the messages:

DefaultRenderingErrorListener.errorOccurred:
CONTEXT_CREATION_ERROR: Renderer: Error creating Canvas3D graphics context
graphicsDevice = Win32GraphicsDevice[screen=0]
canvas = javax.media.j3d.Canvas3D[canvas0,0,0,400x300]
Java 3D ERROR : Canvas3D_createNewContext: Failed in SetPixelFormat - invalid pixel format

I guess the display driver may crash after regedit, but it keeps not working even if I reinstall the display driver.
Any one help me?

My code use this:
new MainFrame(new first(),400,300);
it did work before.

Message was edited by: gzdillon

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gzdillon
Offline
Joined: 2010-10-18

Ok, I found a reason for this problem.
I run the same code in another computer, whose screen is rotated 270 degree for displaying more lines, then I get this:

DefaultRenderingErrorListener.errorOccurred:
CONTEXT_CREATION_ERROR: Renderer: Error creating Canvas3D graphics context
graphicsDevice = Win32GraphicsDevice[screen=0]
canvas = javax.media.j3d.Canvas3D[canvas0,0,0,200x200]

[Java3D]: Using D3DDEVTYPE_REF mode.

from org.jdesktop.j3d.examples.package_info.QueryProperties, I get:

j3d.version = 1.5.2 fcs (build4)
j3d.vendor =
j3d.specification.version = 1.5
j3d.specification.vendor =
j3d.pipeline = NATIVE_D3D
j3d.renderer = DirectX

native.renderer = ATI FireGL 8800
native.vendor = ATI Technologies Inc.
native.version = DirectX 9.0 or above
doubleBufferAvailable = true
stereoAvailable = false
sceneAntialiasingAvailable = true
sceneAntialiasingNumPasses = 1
compressedGeometry.majorVersionNumber = 1
compressedGeometry.minorVersionNumber = 0
compressedGeometry.minorMinorVersionNumber = 2
textureUnitStateMax = 6
textureWidthMax = 2048
textureHeightMax = 2048
shadingLanguageCg = false
shadingLanguageGLSL = false
stencilSize = 0
texture3DAvailable = true
texture3DDepthMax = 256
texture3DHeightMax = 2048
texture3DWidthMax = 2048
textureAnisotropicFilterDegreeMax = 16.0
textureAutoMipMapGenerationAvailable = true
textureBoundaryWidthMax = 0
textureColorTableSize = 0
textureCombineDot3Available = true
textureCombineSubtractAvailable = true
textureCoordSetsMax = 8
textureCubeMapAvailable = true
textureDetailAvailable = false
textureEnvCombineAvailable = true
textureFilter4Available = false
textureImageUnitsCombinedMax = 0
textureImageUnitsMax = 0
textureImageUnitsVertexMax = 0
textureLodOffsetAvailable = false
textureLodRangeAvailable = false
textureNonPowerOfTwoAvailable = false
textureSharpenAvailable = false
vertexAttrsMax = 0

If I rotate the screen to normal state, then run Applet or run Application well.

gzdillon
Offline
Joined: 2010-10-18

After a whole day's test, I found the trick finally. I installed some system optimization tools, that clean my register table and other things, including jdk environment. Then I reinstall my jdk 1.5.04. All come back!
Thanks everyone!
But the weird thing is Applet OK but Application not working!

run the demo org.jdesktop.j3d.examples.package_info.QueryProperties

j3d.version = 1.5.2 fcs (build4)
j3d.vendor =
j3d.specification.version = 1.5
j3d.specification.vendor =
j3d.pipeline = NATIVE_OGL
j3d.renderer = OpenGL

native.renderer = Intel 965/963 Graphics Media Accelerator
native.vendor = Intel
native.version = 1.5.0 - Build 6.14.10.4859
doubleBufferAvailable = true
stereoAvailable = false
sceneAntialiasingAvailable = true
sceneAntialiasingNumPasses = 8
compressedGeometry.majorVersionNumber = 1
compressedGeometry.minorVersionNumber = 0
compressedGeometry.minorMinorVersionNumber = 2
textureUnitStateMax = 8
textureWidthMax = 2048
textureHeightMax = 2048
shadingLanguageCg = false
shadingLanguageGLSL = false
stencilSize = 0
texture3DAvailable = true
texture3DDepthMax = 128
texture3DHeightMax = 128
texture3DWidthMax = 128
textureAnisotropicFilterDegreeMax = 2.0
textureAutoMipMapGenerationAvailable = true
textureBoundaryWidthMax = 1
textureColorTableSize = 0
textureCombineDot3Available = true
textureCombineSubtractAvailable = true
textureCoordSetsMax = 8
textureCubeMapAvailable = true
textureDetailAvailable = false
textureEnvCombineAvailable = true
textureFilter4Available = false
textureImageUnitsCombinedMax = 0
textureImageUnitsMax = 0
textureImageUnitsVertexMax = 0
textureLodOffsetAvailable = false
textureLodRangeAvailable = true
textureNonPowerOfTwoAvailable = false
textureSharpenAvailable = false
vertexAttrsMax = 0

Message was edited by: gzdillon

tmilard
Offline
Joined: 2004-03-25

> DefaultRenderingErrorListener.errorOccurred:
> CONTEXT_CREATION_ERROR: Renderer: Error creating
> Canvas3D graphics context
> graphicsDevice = Win32GraphicsDevice[screen=0]
> canvas =
> javax.media.j3d.Canvas3D[canvas0,0,0,400x300]
> Java 3D ERROR : Canvas3D_createNewContext: Failed in
> SetPixelFormat - invalid pixel format

1) In think your Intyel OpenGl driver has sadly a "driver parameter" equals 16bits depth.
Put it to 24 bits.
See this Thread :
http://markmail.org/message/q6tsrsox2cnjiz5y#query:Java%203D%20ERROR%20%...

2) See here how to do.
http://www.intel.com/support/graphics/sb/CS-030506.htm

Thierry