Yeah, that's actually the thread where I figured out how to do mine. Here's my basic code if you want to see it.
It might look a little odd, but it works, and it makes sense to me.
http://cs.selu.edu/~soconnell/code.txt
Also, have you guys noticed the new gamedev forum doesn't email you when somebody replies to your thread?
HALLELUJIA !!!!!!!
I got the tesellation working in the end with triangle strips. Just a day or two of algorithm debugging :-). Now I just have to work up the energy to finish my terrain editing tools... no rest for the wicked, but thanks for the replies.
I just thought I'd point out, making an inline function as a member of a class but not defining it in the header has a habit of not working. It might work in the same compilation unit, but beware if that's a public function.
Well, you posted the topic; it'd be unfortunate if you didn't figure out how to do it [wink]
Quote:Original post by oconnellseanm
Yeah, that's actually the thread where I figured out how to do mine.
Well, you posted the topic; it'd be unfortunate if you didn't figure out how to do it [wink]
Quote:Original post by Promit
I just thought I'd point out, making an inline function as a member of a class but not defining it in the header has a habit of not working. It might work in the same compilation unit, but beware if that's a public function.
not strickly true, it is possible to do Link-time inlining as well as compile time, although it requires a switch to be passed to the linker and works with the VC7.0.
more info here
and here
the important bit being
Quote:
To use LTCG from the Visual Studio .NET IDE is as simple as ensuring that the Whole Program Optimization option is set to Yes. This can be found in the project's Configuration Properties | General pane.
Quote:Original post by _the_phantom_
not strickly true, it is possible to do Link-time inlining as well as compile time, although it requires a switch to be passed to the linker and works with the VC7.0.
though i would still argue that inline functions, just like templates should/must be known at compile time and belong into the header, as the source files arent supposed to know each other.
and just think how much you will hate yourself if you need to switch to a compiler without that feature ,-)
yes, it does make sense at compile time, true, however as pointed out in the first article I linked at link time the system has alot more infomation about the calling site so can make a much more informed choice about inlining code in the long run.
Tbh, i'm hoping that other compilers/linkers will offer this as it could help speed up sections of code by being able to do better inlining across object files.
Tbh, i'm hoping that other compilers/linkers will offer this as it could help speed up sections of code by being able to do better inlining across object files.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement