instantreality forum
news: Welcome to the instantreality forums!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 24, 2018, 03:41:54 am


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Why is EAI not working with Java in my case?  (Read 1875 times)
soedenitel
Newbie
*
Posts: 9


View Profile
« on: November 17, 2011, 10:02:03 am »

There is a simple scene
Code:
#VRML V2.0 utf8

DEF SPHERE_HOLDER Transform {
  children Shape {
    appearance Appearance {
      material Material {
        diffuseColor .61 .61 .61
        specularColor .77 .76 .76
        ambientIntensity .14
        shininess .9
      }
    }
    geometry Sphere {}
  }
}

DEF ENGINE Script {
  field SFNode object USE SPHERE_HOLDER
  eventIn SFTime tact

  url "Root.class"
}

DEF TIMER TimeSensor {
  loop TRUE
  enabled FALSE
  cycleInterval .01
}

ROUTE TIMER.cycleTime TO ENGINE.tact

Source code of the Root.class
Code:
import vrml.*;
import vrml.field.*;
import vrml.node.*;


public class Root extends Script {
  private SFNode obj = null;
  
  @Override
  public void initialize() {
    obj = (SFNode) this.getField( "object" );
  }
  
  @Override
  public void processEvent( Event e ){
    if( e.getName().equals( "tact" ) ){
      SFRotation rotation = (SFRotation)( (Node)obj.getValue() ).getExposedField( "rotation" );
      float[] rot = null;
      rotation.getValue( rot );
      rotation.setValue( rot[0], rot[1], rot[2], (float)(rot[3] + 0.01) );
    }
  }
}

There are some errors in Instant Player's console:
Code:
LOG Avalon Init: 12/230, V2.1.0 build: R-22826 Nov 16 2011
WARNING OpenSG Window::getFunctionByName: Couldn't get function 'glTexSubImage3DEXT' for Window 0479A6D8.
WARNING OpenSG Window::getFunctionByName: Couldn't get function 'glPointParameterfEXT' for Window 0479A6D8.
WARNING OpenSG Window::getFunctionByName: Couldn't get function 'glPointParameterfvEXT' for Window 0479A6D8.
LOG Avalon CDF parsing (0.015s): 618 Node-Types defined
LOG Avalon Set Two sided Lighting to 1
LOG Avalon Set Spec Texture Lighting to 1
LOG Avalon Set Global Ambient light
WARNING OpenSG Window::getFunctionByName: Couldn't get function 'glTexSubImage3DEXT' for Window 29A81268.
WARNING OpenSG Window::getFunctionByName: Couldn't get function 'glPointParameterfEXT' for Window 29A81268.
WARNING OpenSG Window::getFunctionByName: Couldn't get function 'glPointParameterfvEXT' for Window 29A81268.
LOG Avalon Remove RenderAction
Error occurred during initialization of VM
Could not reserve enough space for object heap
FATAL JAVA Failed to initialize the Java virtual machine
WARNING Avalon Cannot create ScriptEvaluator for Script ENGINE
LOG Avalon Set Two sided Lighting to 1
LOG Avalon Set Spec Texture Lighting to 1
LOG Avalon Set Global Ambient light
Why Java does not work?
Another Java applications on this computer work properly.
« Last Edit: November 18, 2011, 06:07:16 am by soedenitel » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.15 | SMF © 2011, Simple Machines