Re: [sdljava-users] Problem with sdl_gfx -> aaPolygonRGBA
Status: Beta
Brought to you by:
ivan_ganza
From: Ivan Z. G. <iva...@ya...> - 2005-02-18 02:55:17
|
Greetings Goliat. Welcome to the list. Thanks for finding this. I've been able to reproduce it and something is defiantly wrong here. I'm not quite sure why it happends. I've just realized that all this SDLGfx code needs to be changed to transfer the co-ordinates via NIO Direct Buffers -- so I've tried a quick change to this method with an NIO buffer, and this seems to be working properly. I'm going to change all the methods to use this method instead of java arrays. This will also allow it to be MUCH faster as no copy has to occur between java and C -- also the possibility exists to reuse already created ByteBuffers.... For example the method now looks like this: public static int polygonRGBA(SDLSurface dst, ShortBuffer vx, ShortBuffer vy, short r, short g, short b, short a) I would like to get this in with the release. I'm going to check in the above change incase you want to try that one method and your on CVS. If you have a chance let me know if it works for you. -Ivan/ Goliat Skipson wrote: > First hello to the list :) > > i've played around with sdljava for some time and now i have a little > problem ... > the method aaPolygonRGBA in SDLGfx seems to be broken somehow > > by using this (sample) call to the method: > > short[] sx = { 10, 10, 105, 10 }; > short[] sy = { 5, 7, 100, 5 }; > SDLGfx.aapolygonRGBA( surface , sx, sy, (short)255, (short)255, > (short)255, (short)255 ); > > i get my gamescreen but no drawn polygon and after a while some lines > which cover the whole surface appear, additionally they seem to appear > spontaniously after some frames more or less everytime i restart the > whole thing > > unfortunatly i just tried to do a screenshot of the lines ... but they > didn't appear at all ... neither the polygon was drawn > > i'm using sdljava-0.9.0 and the sun jdk 5.0 running on a gentoo system > with a current 2.6.10 kernel (with those thousand gentoo patches) > > greetz Goliat > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > sdljava-users mailing list > sdl...@li... > https://lists.sourceforge.net/lists/listinfo/sdljava-users |