Hi Karsten,

This code appears to be drawing a raster image directly into
the stencil buffer.  Java 3D does not currently support directly
rendering into stencil buffers.  We are looking into possibly
supporting this in a future release.

Doug Twilleager
Sun Microsystems


>X-Accept-Language: en
>MIME-Version: 1.0
>Content-Transfer-Encoding: 7bit
>Subject: [JAVA3D] 3D display support
>To: [EMAIL PROTECTED]
>
>Hi there,
>
>have a look at this display http://www.desden3d.com/
>You can find the follwing C code snippet somewhere
>in the documentation:
>
>/*
> * Fill the stencil mask by a memory bitmap
> */
>void SetStencilMaskDrawPixels()
>{
>  BYTE *Mask=0,*MaskRunner=0;
>  int ByteAlignment=0,AddBytes=0;
>
>  glGetIntegerv(GL_PACK_ALIGNMENT,&ByteAlignment);
>  if(!ByteAlignment) return;
>
>  AddBytes=D4DWindowW%ByteAlignment;
>  if(AddBytes) AddBytes=ByteAlignment-AddBytes;
>
>  Mask=(BYTE*)malloc((Width+AddBytes)* Height);
>  MaskRunner=Mask;
>
>  for(int i=0;i<(int)Height;i++){
>    for(int j=0;j<(int)Width;j++) *MaskRunner++=j%2;
>    MaskRunner+=AddBytes;
>  }
>
>  glMatrixMode(GL_PROJECTION);
>  glLoadIdentity();
>  glMatrixMode(GL_MODELVIEW);
>  glLoadIdentity();
>  glRasterPos2i(-1,-1);
>  glPixelZoom(1.0f,1.0f);
>
>
>    // imporant line
>  glDrawPixels(Width,Height,GL_STENCIL_INDEX,GL_UNSIGNED_BYTE,Mask)
>
>
>  free(Mask);
>}
>
>
>I'm wondering wheter there is direct Java3D support for this. Would be
>very interesting for me??
>
>
>Cheers,
>Karsten
>
>===========================================================================
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff JAVA3D-INTEREST".  For general help, send email to
>[EMAIL PROTECTED] and include in the body of the message "help".

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

Reply via email to