Drawing lines in fullscreen - the fastest way? (hires)

C and PASCAL (or any other high-level languages) in here please

Moderators: exxos, simonsunnyboy, Mug UK, Zorro 2, Moderator Team

franc#
Atarian
Atarian
Posts: 8
Joined: Tue Sep 20, 2011 3:30 pm

Drawing lines in fullscreen - the fastest way? (hires)

Postby franc# » Mon Oct 24, 2011 8:30 am

Hi all!
I want to write simple app for displaying 3d objects using just lines (wireframe). I am using PURE C and hi res (ok, i can do in lo res too).
First of all which library should i use (which .h)? Or maybe any lib i have now (linea.h, graphics.h) should not be used as it is too slow? I saw GodLib only handles lores - is that true and should i try this lib?

I do not want to use GEM windows - I can do it and paint with VDI without any problems, but VDI seems to be slow. I am thinking about some more asm/LineA way and want to use FULL SCREEN.

Thanks in advance!
Last edited by franc# on Tue Oct 25, 2011 7:56 am, edited 1 time in total.

franc#
Atarian
Atarian
Posts: 8
Joined: Tue Sep 20, 2011 3:30 pm

Re: Drawing lines in MONO/Fullscreen the fastest way?

Postby franc# » Mon Oct 24, 2011 10:42 pm

OK, so I found vdi is using linea internally and is some kind of wrapper/higher level of api. So basically it should be slightly slower... Weird but it is not. Maybe conditions in which i am testing are causing this. For now this is STEEM/8Mhz but i am going to test this on MegaSTE with/wo NVDI.

So ST is capable of animating hundreds of lines 50fps in lo-res - saw in demos - but cant that many in hires? Of course i cannot measure this with anything but my eye but still it is visible. Is it possible that hires is some kind of a slower mode... :/ Logically should be (bigger space) but it is 2 colors only :/

Just thinking as i see still 0 responses to my question.

User avatar
DarkLord
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4184
Joined: Mon Aug 16, 2004 12:06 pm
Location: Prestonsburg, KY - USA
Contact:

Re: Drawing lines in MONO/Fullscreen the fastest way?

Postby DarkLord » Mon Oct 24, 2011 11:36 pm

I don't think too many people are doing much in mono any more. :(

There were a few mono demo's released though. If you could find one with
the source code, maybe you could use what they did as an example?

http://www.pouet.net/topic.php?which=3812

http://www.pouet.net/topic.php?which=38 ... 1&x=36&y=8

HTHs.
Welcome To DarkForce! http://www.darkforce.org "The Fuji Lives.!"
Atari SW/HW based BBS - Telnet:darkforce-bbs.dyndns.org 520

franc#
Atarian
Atarian
Posts: 8
Joined: Tue Sep 20, 2011 3:30 pm

Re: Drawing lines in MONO/Fullscreen the fastest way?

Postby franc# » Tue Oct 25, 2011 7:55 am

I totally realize that lo-res / colour demos is 90% of the ST "business" :) now. But actually if i cut "hires" from my question rest stays the same... You can draw with line-a, vdi some asm perhaps etc. in 320x200 as well.
Maybe what i am missing now is the "supervisor mode" :/ I dont know how it works and what it can provide. So if i turn this mode on will drawing routines be faster or what?

Anyway thanks DarkLord for these links!

User avatar
Cyprian
Atari God
Atari God
Posts: 1405
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Drawing lines in fullscreen - the fastest way? (hires)

Postby Cyprian » Tue Oct 25, 2011 11:27 am

franc# check "Segmented Line by Kalms / TBL" from DHS site http://dhs.nu/files.php?t=democreation
Here on AD were topic about drawing line routine and it seems that Kalms' is the fastest
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

franc#
Atarian
Atarian
Posts: 8
Joined: Tue Sep 20, 2011 3:30 pm

Re: Drawing lines in fullscreen - the fastest way? (hires)

Postby franc# » Tue Oct 25, 2011 3:07 pm

Thanks Cyprian! I totally forgot they have some usefull stuff there, but definitely i wouldnt notice there is something for 1 bitplane mode.

So this looks like 1500 lines/s (avg. 370px length) is possible and assuming my 3d model's lines are 5-10x shorter this would give a 5-7k lines - cooool.
Assuming/hopefully there is almost linear dependency in speed, ie. time taken to draw 100 x 20px lines is same as 10 x 200px.

OK, now need to incorporate this asm code into my pure c app. I assume i'm going to have problems with that and will be asking you again for help guys...


Social Media

     

Return to “C / PASCAL etc.”

Who is online

Users browsing this forum: No registered users and 2 guests