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".