PDA

View Full Version : c++ wrapper?


Katachi
03-23-2006, 10:23 AM
Hi,

is there a C++ wrapper for the LW SDK? I have seen an old one (by Graham?) for LW 5.6 but thatīs apparently out of date. :) Does anyone know about one? Why doesnīt NewTek include a C++ wrapper?

Thanks
Katachi

Freak!!
03-23-2006, 07:45 PM
Hi,

is there a C++ wrapper for the LW SDK? I have seen an old one (by Graham?) for LW 5.6 but thatīs apparently out of date. :) Does anyone know about one? Why doesnīt NewTek include a C++ wrapper?

Thanks
Katachi

Happylib is Grahams C++ wrapper and it works fine with LW6.0+ i believe....

There is another one in development over at www.splinecage.com (http://www.splinecage.com)
By Lightwolf, Carl and a few other peoples, it's going slowely and don't know when it will be finished...

Newtek does not include a C++ version of the SDK, because LW is written in C, so the SDK is C Based..... Why can't you use the C version?

Katachi
03-23-2006, 08:44 PM
Happylib is Grahams C++ wrapper and it works fine with LW6.0+ i believe....

ah I see. Thanks for the info.

There is another one in development over at www.splinecage.com (http://www.splinecage.com)
By Lightwolf, Carl and a few other peoples, it's going slowely and don't know when it will be finished...

That sounds promising. Thx and Iīll be watching the development. :)

Newtek does not include a C++ version of the SDK, because LW is written in C, so the SDK is C Based..... Why can't you use the C version?

Because C sucks?! :) Really, I was shocked to hear LW is still C. Going the OO way would definetly open up the SDK, make LW faster and more stable and fixes/updates would definetly also come faster as itīs much easier to maintain code when you can program OO.

Using C would be like a step backward to me.

Anyway, thanks for your reply and help!
Best
Katachi

PetterSundnes
03-24-2006, 12:06 AM
C++ is faster in terms of development time than C, but not in terms of application speed as C is closer to native machine code than C++

When comes to actual application speed assembly is faster than C which is faster than C++

Niklas Collin
03-24-2006, 06:12 AM
As far as I understand, LightWave is currently been ported to C++ and everything within it will be completely object orientated. It'll take some time though and I'm guessing that with luck we'll see complete transformation in 9.x cycle (propably not until 10 though).

Anyway, I'm completely agreeing that this is a great thing. C-based SDK and it's macros just aren't the same thing as a completely OO based SDK. I think we won't get a new SDK for 9 (since there is already LW9 SDK out...) but propably in the 9.x cycle (I sure hope so!)? I've been stalling my jump into LW SDK world because of this lack and I'm waiting for the new SDK before I'll get myself really involved with it.

To Petterns:
That is a bit generalistic way of looking at things. You can optimize C++ code quite far since you can actually use assembler instructions within it (and in C too). Bitwise operations can be used for binary level modifications and you can take just about anything out of your computer with C++. But in general, yes C can be used to make more efficient code. But in the real world, when program is as large as LW the OO based program will work faster than the C mess with billions of macros, wierd solutions to make things work since you just couldn't think about in the development phase etc... If you want to spend time to rewrite the part you'll understand that would need changes to make something work then yes, it'll be faster :) But in the real world there is no time for it and the program will end up using stupid solutions which just barely hold together.

So yes, C can be used to create faster programs than with C++. But in reality, it'll often turn otherwise when the program increases in size.

ps. Oh and yes, I'm one of these "next gen programmers" who has been taught into OO way of thinking almost from the very beginning :) The traditional way is quite understandable and I can program in that way too, but I just don't *want* to :p

Freak!!
03-24-2006, 06:22 AM
ah I see. Thanks for the info.

That sounds promising. Thx and Iīll be watching the development. :)

Because C sucks?! :) Really, I was shocked to hear LW is still C. Going the OO way would definetly open up the SDK, make LW faster and more stable and fixes/updates would definetly also come faster as itīs much easier to maintain code when you can program OO.

Using C would be like a step backward to me.

Anyway, thanks for your reply and help!
Best
Katachi

No worries, the Lightwrap C++ wrapper does look promising, a lot of people are trying to do the best methods and ideas for writing it, so it's still taking it's time... But looks good.
Meantime Happylib contains a fair few classes already, and was updated late last year i think.

Yeah everytime i program in C i wish it was C++, but then there are those time i'm in C++ i wish i was programming in C..... So i understand and agree with your comments.

Anyway i hope you find a wrapper, or do port Dpit Nature Spirit to LW, i think many people
would like to see a port.. Good luck..

If you need to ask any questions in the future Jarno on the LW-P list is an asset to the LW Development and a great aid in getting plugins completed. I bug him often, and his contracted to NT to help out in these areas..

Katachi
03-24-2006, 10:07 AM
C++ is faster in terms of development time than C, but not in terms of application speed as C is closer to native machine code than C++

When comes to actual application speed assembly is faster than C which is faster than C++

Without turning this into a programming discussion and beside the fact that Niklas already said much about the topic (I agree btw. :) ), itīs not necessarily faster than C++. Thatīs something people most of the time think but it doesnīt have to be the case! (and the produced overhead of certain functions in C++ would be the same when youīd tried to recreate them in C)

If you believe it or not, itīs all about how you are writing. In itīs simplest case, C is faster, true that, but you can make lots of code optimizations and get even faster benchmarks with C++ versus C. (I am not talking compiler optimizations)

Seek the net for examples, there are tons of them available. :)

Best
Katachi

Katachi
03-24-2006, 10:09 AM
As far as I understand, LightWave is currently been ported to C++ and everything within it will be completely object orientated. It'll take some time though and I'm guessing that with luck we'll see complete transformation in 9.x cycle (propably not until 10 though).

cool, great and glad to hear. Thatīs the right way to go. :)

Anyway, I'm completely agreeing that this is a great thing. C-based SDK and it's macros just aren't the same thing as a completely OO based SDK. I think we won't get a new SDK for 9 (since there is already LW9 SDK out...) but propably in the 9.x cycle (I sure hope so!)? I've been stalling my jump into LW SDK world because of this lack and I'm waiting for the new SDK before I'll get myself really involved with it.

yep, same here! Thanks for the valuable information.

Katachi

Katachi
03-24-2006, 10:11 AM
No worries, the Lightwrap C++ wrapper does look promising, a lot of people are trying to do the best methods and ideas for writing it, so it's still taking it's time... But looks good.
Meantime Happylib contains a fair few classes already, and was updated late last year i think.

Iīll be digging in it when I have time.

Anyway i hope you find a wrapper, or do port Dpit Nature Spirit to LW, i think many people would like to see a port.. Good luck..

yep, thatīs the plan. :)

If you need to ask any questions in the future Jarno on the LW-P list is an asset to the LW Development and a great aid in getting plugins completed. I bug him often, and his contracted to NT to help out in these areas..

Thanks Freak. Will remember this guy when I run into problems.

Katachi

lightwolf
03-27-2006, 07:53 AM
Hi Guys,
No worries, the Lightwrap C++ wrapper does look promising, a lot of people are trying to do the best methods and ideas for writing it, so it's still taking it's time... But looks good.

Which reminds me, I should release some code some time.
One thing I found hard to do in the public discussion about lwpp was to find a common approach to the different aspects of development.
For my plugins I currently use a wrapper for most the globals, but don't wrap the LW plugins themselves into C++ classes.

Cheers,
Mike

CGTalk Moderation
03-27-2006, 07:53 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.