Mark Sibly

Forum Replies Created

Viewing 15 posts - 316 through 330 (of 1,431 total)
  • Author
    Posts
  • in reply to: Is there certain MonkeyX2 file types? #11870

    Mark Sibly
    Keymaster

    will LoadString also work everywhere?

    Yes, because it uses Stream itself – well, it uses DataBuffer.Load which uses Stream.

    There should be no real reason to use FileStream directly. Stream.Open will return a FileStream when appropriate but you shouldn’t need to ‘know’ this.

    in reply to: GLSL shader: set material uniforms #11869

    Mark Sibly
    Keymaster

    Would need to see more code, it looks like it can’t find a uniform but I can’t really see how you’re setting things up etc.

    It’s the right general idea though.

    [edit]The shader related error message REALLY need some work! I’ll see what I can do here.[/edit]

    in reply to: Is there certain MonkeyX2 file types? #11846

    Mark Sibly
    Keymaster

    Actually, you shouldn’t really use FileStream for opening assets, instead use Stream.Open(…).

    This is because assets are not necessarily files (eg: on android) so FileStream.Open( “asset::….” ) will NOT work everywhere, but Stream.Open( “asset::…” ) WILL.

    I also added filesystem support for asset::, desktop:: etc so people could go FileType( “asset::blah…” ) but I now think this was a mistake, because “asset::” and co. are really nothing to do with any native filesystems at all, they are purely monkey2 constructs.

    in reply to: Draw Text without filtering? #11836

    Mark Sibly
    Keymaster

    I’ve added a textureFlags param to Font.Load in develop branch, although TextureFilteringEnabled is fine here too.

    in reply to: Is there certain MonkeyX2 file types? #11835

    Mark Sibly
    Keymaster

    > It seems it doesn’t accept “asset::”

    Oops, bug, fixed in develop.

    in reply to: Operator From() #11764

    Mark Sibly
    Keymaster

    >Yes, I want this! But don’t want to use Set or properties.:)

    So you do want assignment overloading…as I’ve said above, this is not happening sorry!

    in reply to: Operator From() #11757

    Mark Sibly
    Keymaster

    Any ideas how to get what I want?

    I’m not actually sure what you want.

    If you want a function to be called when a value is modified, you’ll need a ‘Set’ style method for assignments because, well, there is no assignment overloading. This is pretty trivial to implement though so I suspect you mean something else (or that you really *do* want assignment overloading!).

    in reply to: Operator From() #11750

    Mark Sibly
    Keymaster

    No, I will not  supporting assignment overloading in the near future, if ever.

    There are a lot of complications involved with assignment overloading which I’m not going to go into right now (email me if you want to discuss further…) but that I don’t want to weigh the language down with.

    in reply to: Operator From() #11734

    Mark Sibly
    Keymaster

    I don’t like having 1001 ways to convert values as it can easily get too confusing how things work when the compiler does a ton of implicit/magic stuff behind your back. C++ is a bit like this – there’re copy ctors, assignments and cast operators (at least, probably more since c++11) all of which can result in type conversions but it’s not always obvious which one gets called or even when.

    So the monkey2 equivalent might be: if ‘operator from’ WAS supported, and a dst type implemented ‘operator from’ and a src type implemented ‘operator to’, which would get used when converting from src type to dst type?

    IMO, operator to plus type extensions allows you to do pretty much anything without everything getting too confusing. If there’s something you can’t do this way, let me know and we can try to come up with a solution.

    For example, it allows me use std.geom types like Vec3f with assimp and bullet and have them automatically convert correctly from the native assimp/bullet geom types like aiVector3D.

    And there is no overloadable assignment operator in monkey2 (or copy ctor).

    in reply to: Consistent "Can't find Main:Void()" #11732

    Mark Sibly
    Keymaster

    Next time this happens, check to see if you haven’t accidentally ‘locked’ a file (filename will have a ‘+’ before it in the tabview).

    in reply to: Compile error – file name too long? #11731

    Mark Sibly
    Keymaster

    Thanks Angus, I will take a look soon-ish

    in reply to: RemoveIf example #11729

    Mark Sibly
    Keymaster

    …just wanted to see if this would work really (it does!), getting a bit ‘c++’-ish for my liking though…

    in reply to: Compile error – file name too long? #11724

    Mark Sibly
    Keymaster

    The code that generated the error was this,

    I think there may be something weird  going on here in general.

    What was the full path of the monkey2 source file?

    What was the full path of the monkey2 installation?

    in reply to: Compilation issues #11702

    Mark Sibly
    Keymaster

    Monkey1 is no longer under development any more. You could try this 3rd party fork, although I have nothing to do with it:

    Home

    in reply to: RemoveIf example #11689

    Mark Sibly
    Keymaster

    The parameter for RemoveIf should be a function:

    …you can use a lambda to write the function ‘inline’ too:

Viewing 15 posts - 316 through 330 (of 1,431 total)