Warp3D: how to get started?

5 posts / 0 new
Last post
Massi
Massi's picture
Offline
Last seen: 4 years 6 months ago
Joined: 2012-03-28 17:16
Warp3D: how to get started?

Hello,
I want to render some graphics into a window using Warp3D.
The target is C language / AmigaOS 4.1 Update 1.
Any help (source code example, tutorial, hint, ...) is more than welcome :)

Thanks, regards

thellier
thellier's picture
Offline
Last seen: 5 years 11 months ago
Joined: 2014-03-04 12:43
See

See in
http://aminet.net/package/dev/src/Cow3D
the source is
Cow3D5/CoW3D-5.c
it draw a 3d model in a window with Warp3D

Alain Thellier

Alain Thellier - Wazp3D

Hans
Hans's picture
Offline
Last seen: 3 months 3 weeks ago
Joined: 2010-12-09 22:04
Re: Warp3D: how to get started?

@Massi

Documentation and examples for Warp3D are a bit patchy. I recommend downloading the old Warp3D v4.2 developer kit:
http://aminet.net/package/dev/misc/Warp3DDev-4.2a

The Warp3D_devel.guide in this package gives you an introduction and overview of Warp3D. While it is out-of-date, the basics remain the same. Ignore the section about "indirect mode" though, as that isn't supported any more.

Use the Autodocs that come with the AmigaOS 4.x SDK. Plus, in "SDK:Documentation/Developer Info/Warp3D" you'll find a PDF describing the new features in version 5, including multitexturing.

Between these documents and the Cow3D code that thellier linked to, you should be able to figure it out.

EDIT: Please bear in mind that the example code in Warp3D_devel.guide is out of date, so just use it as a rough guide. For example, Warp3D now has a W3D_BestModeID() function, which simplifies opening a screen.

Hans

Join the Kea Campus - upgrade your skills; support my work; enjoy the Amiga corner.
https://keasigmadelta.com/ - see more of my work

kas1e
kas1e's picture
Offline
Last seen: 3 months 1 week ago
Joined: 2010-11-30 15:30
@Massi I dig in on my old

@Massi

I dig in on my old os3 hdd , and found bunch of warp3d examples i do for myself years ago when i was in big interest of warp3d. So, i adapt the better ones to os4, do recompiles them and check that they work, and put it in one archvie for you: http://kas1e.mikendezign.com/aos4/warp3d/for_massi_warp3d_examples.lha

It containt 5 reallife example, simple ones and not so:

simple:

w3d_get_mode_list.c : that how to get mode/size you need
w3d_requester.c : just a simple example how to spawn video mode requester of resolution/depth you need.

more interesting:

simple_draw_texture: just create w3d context, open screen, and draw some simple texture take from a file (texture.raw), wich a bit modified chords so it will draw a triangle. No window opened, no double-buffering, just pure as pure.

texture_move_up_down: that one create w3d context, open screen, open window, load textures, and do some animation with it to up/down. There you can see how double-buffering implemented (see function SwitchScreens).

texture_3d_rotate: that one more nice looking, its create w3d context, open screen, window, do all init/loading, and then via matrises to calcualtion and rotation of some object in 3d, together with double-buffering.

Of course, source codes aren't perfect, there is ouch "goto metodology", as well as i didn't close interfaces, as well as some includes which added just not need it, as well as if i do all now from scratch, i will do all better commented and structured, but for first tests, just to see reallife working examples, that will be pretty helpfull. Wish that back in days someone give me the same kind of tiny examples :)

If you want go real heavy with warp3d, and then make window modes for your apps too, as well as double-buffering, as well as anything else, you may check sources of diskamg "The Vague" which i code years back:

http://os4depot.net/share/demo/magazine/thevague/the_vague_1.lha
http://os4depot.net/share/demo/magazine/thevague/the_vague_1_src.lha
http://os4depot.net/share/demo/magazine/thevague/the_vague_2.lha
http://os4depot.net/share/demo/magazine/thevague/the_vague_2_src.lha

Sources of course kind of sucky a bit, as done years ago, and it was learn process, but it have some interesting parts for beginners. Diskmag itself also contain few articles about warp3d too (check binary versions of both issues,in the coding section). Those articles also not high-science of course, but also ok for getting basics.

Also as Hans say be aware about "indirect" mode on os4: its not just it deprecated , it will just lockup your machine if you will try to create context with it and mix it with other options. I.e. just never use it on os4 anymore and skip any example where inderect mode in use.

Massi
Massi's picture
Offline
Last seen: 4 years 6 months ago
Joined: 2012-03-28 17:16
@thellier @Hans @kas1e Thank

@thellier
@Hans
@kas1e

Thanks for your precious reply and support.
It seems like a good start :)

Log in or register to post comments