Oxygen Basic

Programming => Example Code => Topic started by: Peter on May 31, 2013, 04:17:28 AM

Title: OpenGl Mandel
Post by: Peter on May 31, 2013, 04:17:28 AM
Deleted
Title: Re: OpenGl Mandel
Post by: JRS on May 31, 2013, 08:54:15 AM
Thanks Peter for the sw/gl library updates!

Title: Re: OpenGl Mandel
Post by: JRS on May 31, 2013, 06:06:25 PM
Peter,

Is there a reason that you go into full screen mode but only use a 800x600 drawing area?

Pretty fast!

John
Title: Re: OpenGl Mandel
Post by: JRS on June 01, 2013, 08:06:21 AM
The JAPI interface is much slower because it's a socket interface to Java. The confusing part is why does the JAPI generated image seem to have more color depth than the Simple Window image?

Title: Re: OpenGl Mandel
Post by: JRS on June 01, 2013, 09:28:54 AM
What color depth does it have ?  32Bit ; 24Bit?

 ???
Title: Re: OpenGl Mandel
Post by: JRS on June 01, 2013, 11:59:59 AM
 ???  =  I have no idea what Java is using for color depth with their rendering engine. My point was that the SW version looked low resolution or faded out compared to the Java generated version. Its no big thing. I was just curious in the difference seeing the code was the same.


(http://files.allbasic.info/ScriptBasic/mandeljit.png)     (http://files.allbasic.info/ScriptBasic/swmadeljit.png)
Title: Re: OpenGl Mandel
Post by: JRS on June 01, 2013, 09:46:23 PM
Looks great Peter!

I notice that you use a new SW function call HLS() rather than the old RGB() function. Without any documentation and only a include file as a clue, it makes it difficult at times to use Simple Window.

(http://files.allbasic.info/O2/swdj.png)
Title: Re: OpenGl Mandel
Post by: JRS on June 01, 2013, 11:19:29 PM
I thought I would zoom in on the issue and increased the canvas size to 600 x 450. I was surprised that the JAPI version was actually faster at this higher resolution. I'll let others decided which version they think looks better.

(http://files.allbasic.info/ScriptBasic/swm600x450.png)

(http://files.allbasic.info/ScriptBasic/japim600x450.png)

C:\SB22\japi_dllc>scriba swmandeldllc.sb  (Simple Window)
78.5967

C:\SB22\japi_dllc>scriba mandel_dllc2.sb  (JAPI)
66.8535

C:\SB22\japi_dllc>

Removing the Simple Window Redraw from the loop.

C:\SB22\japi_dllc>scriba swmandeldllc.sb
3.50063

C:\SB22\japi_dllc>
Title: Re: OpenGl Mandel
Post by: JRS on June 02, 2013, 08:20:03 AM
Quote
It seems that Japi 2.0 has a better Mathematics.

I'm confused!

I'm not asking Simple Window to do any math. I create a canvas and ask SW to place a pixel at a x/y position with a certain color value. I do the same for the JAPI version. SB & O2 is doing all the math stuff.