From: Andy L. <do...@ya...> - 2003-03-28 16:49:28
|
Thanks, it was indeed the byte order. :) Andy --- "Kenneth B. Russell" <kbr...@al...> wrote: > > > From: Andy Lubbers <do...@ya...> > > > > Has anyone sucessfully used a direct > > java.nio.ByteBuffer in a glVertexPointer > > statement. I have been able to get something > > drawn on the screen if i pass a float[] into > > glVertexPointer, but nothing shows up if I > pass a > > Buffer into it. > > Yes. See > http://java.sun.com/products/jfc/tsc/articles/jcanyon/ > ; > links to the source code are near the bottom of > the page. > > It's probably the byte ordering; you need to > call > ByteBuffer.order(ByteOrder.nativeOrder()) when > your ByteBuffer is > first created. I have made this mistake in 100% > of my own > java.nio programs which is why I recommend > making a > BufferFactory class which does it up front; see > the slides of > http://servlet.java.sun.com/javaone/sf2002/conf/sessions/display-3167.en.jsp > > -Ken > > > ------------------------------------------------------- > This SF.net email is sponsored by: > The Definitive IT and Networking Event. Be > There! > NetWorld+Interop Las Vegas 2003 -- Register > today! > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > _______________________________________________ > gl4java-usergroup mailing list > gl4...@li... > https://lists.sourceforge.net/lists/listinfo/gl4java-usergroup __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com |