Re: [Fwd: [Crystal-cvs] SF.net SVN: crystal:[38136] CS/branches/soc2012/editor]
Andrei Bârsan <[email protected]>
| Newsgroups | gmane.comp.graphics.crystalspace.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello Christian,
Thanks for chiseling out my so far quite rough code! I really appreciate
it! I just have a few more questions regarding the edits, on top of
those I was about to send when I got this new e-mail. :P
The returned pointers make more sense now, since they're created right
in those functions anyway.
Right now, the csVariant* from graphMain, line 393 seems to be leaking.
I know it's not much but still... Was there a problem with unique_ptr<>?
Also, thanks for the previous guiding message, I've also implemented
what you suggested there. I'd also like to thank Mat for the extra tips! :)
Right now, I'm looking to convert this app to a CS app, in order to get
some real CS rendering going on in a panel, much like in cseditor and
wxTest. However, I've hit some problems running wxTest. It just crashes
upon startup, and there are usually two things that go wrong.
First off, it prints out
Error: Can't create window of class wxGLCanvasClassNR (error 0: the
operation completed successfully.)
on the console. Afterwards, either one of the following two things occur:
1) The app soon crashes after printing that out, in csGLCanvas' ctor,
when calling wxGLCanvas' ctor with some parameters that end up causing a
division by zero.
2) That section seems to work right, but a later call to glGetString
returns null, crashing the application soon after. (I can't seem to be
able to replicate this anymore, but a glGetString returning 0 is usually
a sign that the gl context wasn't initialized)
Also, once I get that in place, how would I make, say, a particle
system/ particle type iModifiable? I believe it would make sense to edit
all the code itself, since I don't think that merging it back into the
trunk with just the added implementation of iModifiable would break
anything. What's your view on this?
My final question might sound a tad vague, but anyway, do you think
there is a way to avoid pieces of code like the following?
if(id == id_name) {
name = value.GetString();
return true;
} else if(id == id_job) {
job = value.GetString();
return true;
} else if ...
...
} else if(id == id_color) {
color = value.GetColor();
return true;
}
Maybe have a set of basic pre-implemented iModifiableProperties for
strings and such, that hold pointers to the actual values they're
controlling? Not very pretty, I know, but it could reduce the volume of
code required to make a class iModifiable. Or some sort of macro,
provided that each varName has a corresponding id_varName, maybe?
Regards,
Andrei Bârsan
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Crystal-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-develop