r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!REBOL3 Extensions] REBOL 3 Extensions discussions

Janko
18-Sep-2009
[167]
what will you be making?
Maxim
18-Sep-2009
[168x3]
ElixirOS and some other commercial stuff which needs serious scalable 
views rendering tens of thousands of objects in real-time.
the first piece of the cake is building GLASS with whatever 3D engine 
I can extension.
GLASS is a general purpose GUI using advanced dataflow programming 
at its core.  I've got some prototypes of various pieces of GLASS 
using R2 and AGG which work really well, but I've been waiting to 
be able to do HW gfx before Investing time on the real GLASS, which 
integrates the prototypes and new stuff too.
NickA
19-Sep-2009
[171x3]
I
Max
(Oops).  Max, I experimented with OGRE in Purebasic a few years ago. 
 Frederic Laboureur built a very nice interface to it, which comes 
built in native to Purebasic.  He'd likely be a good person to chat 
with, and he's very active on the purebasic forums...
Maxim
20-Sep-2009
[174x3]
noted  :-)  I'm starting to really look into this right now... taking 
a break from my "serious" programming.
will start by playing around with the C++ stuff, basically building 
a simple scene.... when that is working, I'll try to build an extension, 
allowing me to do the same calls via R3
btw, some of the picks from apps make with Ogre are damned beautifull!
Pekr
20-Sep-2009
[177]
what is so special about the Ogre? Just a 3D engine, no? Is it used 
mostly for games? What would you use it for?
Maxim
20-Sep-2009
[178x5]
programming for a 3D rendering engine and for a scene engine is a 
totally different affaire... just like using DRAW vs using AGG directly.
Ogre is probably the most complete open source scene engine, which 
can use both OpenGL and DirectX.
its a complete hardware abstraction, so the exact same code will 
run under any hardware/OS implementation.
This layer handles all of the nasties for complex math like shadows 
and even some of the SW & HW shader/texture manipulations at a higher-level.
but since its all open source, you can fix specific issues or optimise 
parts of the engine to suit your needs, if you really have to.
Pekr
20-Sep-2009
[183x2]
so Ogre is in 3D kind of what AGG is for use in 2D - an cross platform 
abstraction?
use=us
Maxim
20-Sep-2009
[185x5]
yes.
and its VERY clean.  Its EXTREMELY documented and there are many 
FANTASTIC plugings from all sorts of authors.   (using apple type 
marketing hype here ;-)
and next version will be MIT which means total licensing freedom.
just the fact that you can retarget the whole 3D engine to direct 
X, OpenGL (or another if you wanted to do so) is really impressive.
I guess this comes with some visual difference, but it means you 
can make it as optimised as you need it depending on platform.
Pekr
20-Sep-2009
[190x2]
I wonder how well does REBOL work with such kind of stuff. What will 
you use? Kind of direct linking to functions? Or kind of dialect 
abstraction as we use for AGG (draw)?
What is the best method to hold data/config to external systems and 
their data structure? Is that an object? Or utypes? :-)
Maxim
20-Sep-2009
[192x5]
both, scene creation will be dialect based, with a full mapping of 
EVERY single public class, member & method
utypes would allow us to abstract the interface, so that would be 
my preference.  

otherwise I usually use objects or nested blocks for complex structures.
above: "with a full mapping"  I meant that  "there will *also* be 
a full mapping"
with vector support this will make it very fast to xfer data between 
3D apps & rebol, since the data will be usable AS-IS in both directions 
 :-)
which always part of the point of implementing vectors AFAIK.
Pekr
20-Sep-2009
[197]
do we have multidimensional vectors?
Maxim
20-Sep-2009
[198]
I don't remember... Not in the first releas IIRC
Pavel
22-Sep-2009
[199]
Probably to BrianH: is it possible to open file in Rebol and transfer 
the filehandle to extension C routine? Or is it neccessry to give 
the filename as parameter and reopen in extension subroutine?
Pekr
22-Sep-2009
[200]
I forwarded the question to R3 Chat IIRC, but no reply. We will see, 
once we get back to the Extensions topic. Now there are some big 
changes to 'parse happening, so I would probably not disturb Carl 
with additional questions :-)
Pavel
22-Sep-2009
[201x3]
Is it even possible to unload extension? IE where and when RX_Quit 
comes into action?
Practically when you want to restart/exchande extension you have 
to close whole rebol process.
exchande=exchange
Maxim
22-Sep-2009
[204]
I've seen no documented way,  so far, but I am assuming this will 
possible when extensions will be fully done.
BrianH
22-Sep-2009
[205x2]
I would guess that they unload when collected by the GC, and definitely 
when R3 quits.
Answers to Pavel: 1) Don't know, but I doubt it. I'll check the port 
model. 2) Probably.
Maxim
22-Sep-2009
[207]
but we *should* be allowed to unload extensions ... eventually... 
if only for testing purposes. even if its "dangerous".  its up to 
the developper to be clean if he wants to  attempt unloading... I 
woudn't want R3 to prevent me.... "for my own protection"
BrianH
22-Sep-2009
[208]
Actually, you don't want to be able to load extensions without freeing 
references to them, as memory corruption would result. Memory references 
including all of the exported commands.
Maxim
22-Sep-2009
[209]
I know... but we can build code around the fact that its symbols 
won't be used for a long time.  like I say, its not something you 
do without knowing what you are doing.  any commands refereing to 
the old lib, can be replaced with no-ops raising errors... this would 
make it safe.
Gregg
24-Sep-2009
[210]
I haven't read everything here--just trying to clear a few groups 
so it's not as overwhelming next time I make it back here, but shouldn't 
it be possible to write the equivalent of R2's library interface 
*as* an extension in R3?
Pavel
24-Sep-2009
[211]
IMO probably yes when you are satisfied with types extensions are 
able to work with so far.
Maxim
24-Sep-2009
[212]
yes, its the way I think it should be done. we could provide pseudo 
type middle ware in the extension to accomodate incompatible types 
like Unsigned integers or structs, much better.


I plan on building a block->struct interface when I start doing my 
more serious extension development... (waiting for next extension 
enhanced release.)
BrianH
24-Sep-2009
[213]
If you are willing to give up support for MAKE, MOLD, built-in reflectors 
and path access, you can implement structs as handles. You would 
access them through accessor commands, and struct and routine declarations 
would be a dialect that would be compiled to calls to extension code.
Maxim
25-Sep-2009
[214x2]
yeah, that's the idea... using a block to struct dialect to build 
the structs from scratch, then just refer to them after.
but the hard part actually is to resolve all the different macros 
which define the types and the enums.
BrianH
25-Sep-2009
[216]
That's what SWIG is for, or human analysis. Or you could reimplement 
SWIG in REBOL if you like.