Hi Michele,

  sorry for late response.

On Mon, Jan 23, 2006 at 01:04:47PM +0100, Michele Puccini wrote:
 > Dmitri,
 >
 > I've managed to create a simple class (VideoUtils) that implements Vertical
 > Blanking synchronization with multimonitor support through directdraw calls
 > in a separate jni dll. Note: the jawt.dll is delayloaded from my jni
 > implementation.

  Wow, nice.

 > Anyway I have a strange runtime problem with JAWT:
 >
 > - if the class extends java.awt.Canvas then it can load and initialize JAWT
 > and everything works.
 >
 > - if it doesn't, JAWT will not be loaded I get an error
 > "java.lang.UnsatisfiedLinkError:
 > C:\Programmi\Java\jdk1.5.0_06\jre\bin\jawt.dll: Can't find dependent
 > libraries" at <clinit>.

  Well, it's hard to tell exactly why this happens w/o seeing the
  code.

 > The class is an helper class and should not be Canvas.

  I'm not sure why do you need to load jawt.dll yourself.

  Can't you use something like this in your native lib:
    JAWT awt;
    awt.version = JAWT_VERSION_1_4;
    if (JAWT_GetAWT(env, &awt) == JNI_FALSE) {
       // error
    }

  Then later:
    JAWT_DrawingSurface* ds = awt.GetDrawingSurface(env, canvas);
    // do stuff with the drawing surface

  where 'canvas' is the canvas that you need to pass from java
  level. You'll need to get one (either create it yourself or traverse
  the hierarchy to find the one already there).

  And in your java class just load your native lib.

  Thanks,
    Dmitri

 >
 > Thanks,
 >
 > Mik
 > ============================================================================
 > >ClassX Development Italy  Via Francesca, 368/I I-56030 S.M. a Monte (PI) <
 > >Tel.(+39)-0587-705153  Fax.(+39)-0587-705153  WEB: http://www.classx.it  <
 > ============================================================================
 >
 >
 >
 > From: "Dmitri Trembovetski" <[EMAIL PROTECTED]>
 > To: <[EMAIL PROTECTED]>
 > Sent: Wednesday, January 18, 2006 5:52 PM
 > Subject: Re: [JAVA2D] FullScreen, BufferStrategy, Vertical Blanking
 >
 >
 >
 > > I realize that. What I'm saying is that since a Vsynched windowed
 > > buffer strategy would be implemented in the same way the
 > > FlipBufferStrategy is, there won't be a problem with the cpu usage.
 >
 >

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to