Mark Sibly

Forum Replies Created

Viewing 15 posts - 361 through 375 (of 1,431 total)
  • Author
    Posts
  • in reply to: Monkey2 Bunnymark (github) #11475

    Mark Sibly
    Keymaster

    Or is it to do with drawing different textures?

    More than likely – changing some rendering ‘state’ (blendmode, shader, material etc – NOT color or matrix) will cause an internal ‘flush’ which will slow things down. Worse case would be something like…

    …where image1 and image2 used entirely different textures.

    This would not be able to queue ANY draw ops, ie: each: DrawImage would effectively be doing a Flush.

    Sorting drawing ops ‘by texture’ (ie: ‘by image’ ) will minimize these problems. Ditto, sorting by blendmode, ie: draw all opaque objects, then all transparent objects.

    Using a texture atlas will also help a great deal, as an atlas allows you to draw different images from the same texture.

    Perhaps the above test could be modified to include a togglable ‘sort by texture’ mode to show the difference?

    in reply to: v1.0.08 too many sections error #11438

    Mark Sibly
    Keymaster

    Just did a few experiments, and -Os seems to be fastest and produces smallest output file sizes. I think I’ll change debug opts to this.

    The main overhead once everything’s built the first 2 times is linking. Switching to MSVC can greatly reduce link times, but can be a bit fiddly to get going.

    in reply to: v1.0.08 too many sections error #11436

    Mark Sibly
    Keymaster

    This can happen in mingw when using reflection in debug mode – the compiler is generating too many symbols and is hitting some kind of built-in hard limit. I can do the same thing to ted2go by adding #import “<reflection>”.

    The reflection system needs some mechanism to prevent it generating reflection info for *everything*, which is something I hope to work on soon. This should both speed up compile times for apps that use reflection and hopefully fix this problem in general.

    In the meantime, you can try using MX2_CPP_OPTS_WINDOWS_DEBUG=-O2 in bin/env_windows.txt, or building in release mode. This fixes the problem for ted2go anyway.

    in reply to: Rendering to views in mojox #11421

    Mark Sibly
    Keymaster

    Yuck! But it works…

    What’s probably needed is something like SetStyle in the Theme class, so you can programmatically set any style used by the gui internals that you don’t get to directly create, like MenuButton etc. Will look into adding this.

    A theme json file is still IMO the best way to do all styling…

    (hmm…does F1 no longer show docs? It shows the status bar quick-help but it used to open actual docs I think?)

    in reply to: Is SDL_GetPrefPath the best place to store settings? #11420

    Mark Sibly
    Keymaster

    It looks nifty, so I’m wondering: Is that not a good cross-platfom choice?

    It looks OK, though I’d prefer something that didn’t need ‘org’ and ‘app’ params, so it could be used like ‘intern::blah’ etc.

    Mobile app always ‘know’ their own name, so this is only really a problem on desktop. Perhaps some global vars could be added here for desktop apps to set before they Run()? Other ideas?

    in reply to: 3d – CreateTerrain is in yet? #11419

    Mark Sibly
    Keymaster

    There is no specialized terrain class as yet (I am working on one), however there are Mesh.CreateTerrain and Model.CreatTerrain extensions for creating plain mesh based terrains. Here’s a quick, somewhat ropey demo:

    Stick this in mojo3d tests/ dir. It would of course look a lot better with textures and there’s no easy way to do collisions yet (possible-ish though, see mojo3d-physics tests).

    in reply to: Rendering to views in mojox #11401

    Mark Sibly
    Keymaster

    Have a look at this thread for a similar discussion re: mojox and how layout works in general (near the end).

    MojoX GUI questions

    Use window method UpdateWindow( False ) in window ctor to force a full window layout which will update all view sizes. Views aren’t normally resized until just before rendering during a layout phase – more info here:

    http://monkeycoder.co.nz/forums/reply/10228/

    In general, mojox is designed to automate layout as much as possible, making it highly reactive. However, people who are used to maxgui etc and having to do layout ‘by hand’ might find it a bit confusing.

    How do I change the font of the menus?

    There may actually be no programmatic way to do that right now, I will have a closer look at some point. You should be able to do this by setting the MenuButton{} style in a theme file though. I would actually recommend using a theme file anyway, but it really should be possible to set menu button font programmatically too.

    in reply to: Tiny reflection bug? #11400

    Mark Sibly
    Keymaster

    Pretty sure I know what’s going on here.

    Skin extends Resource which extends BBResource which…is a native class, and native classes cannot be reflected (yet?).

    There is a simple fix for this though that has unfortunately failed to make the v1.1.08 release of about half an hour ago! Oh well, next time…

    in reply to: Class GameController – how to use? #11390

    Mark Sibly
    Keymaster

    Woah, had forgotten completely about that – please ignore it, I’ll probably remove it for the 1.1.08 release.

    An SDL style GameController would be nice though IMO, and I think this is what I started out with but ended up getting a bit carried away.

    in reply to: How is it going? #11376

    Mark Sibly
    Keymaster

    Hi Danilo, glad to see you back.

    Monkey2 v1.1.08 should be released very soon, this week sometime I hope. It’s pretty much the same as the current develop branch which should be easy to build if yer curious.

    in reply to: Structs and reflection #11375

    Mark Sibly
    Keymaster

    I’m waiting for such filter!:)

    Soon – hopefully by v1.1.09!

    in reply to: Rendering to views in mojox #11373

    Mark Sibly
    Keymaster

    Change this…

    MainView.AddView(WorldDoc, "top")

    …to this…

    MainView.ContentView=WorldDoc

    The problem here is that ‘border’ views added to a DockingView (ie: views added via AddView, not the ContentView) should implement the OnMeasure method, as this is how the docking view knows how high (for top/bottom views) or wide (for left/right views) the border views should be for layout.

    The ContentView of a DockingView does not actually need to implement OnMeasure as it gets all the remaining space once the border top/bottom/left/right views are added. The size of the ContentView as returned by OnMeasure is effectively ignored.

    I think OnMeasure might return 0,0 by default. It’d probaby be better if it returned 16,16 or something else non-null so in cases like this at least something gets rendered.

    in reply to: Modifying the mojo Canvas Class #11342

    Mark Sibly
    Keymaster

    Nice bug, will fix it!

    For DrawPolys, it’s close to what I need, but all of the private AddVertex methods transform the vertices by the matrix, I think I’m right in saying.

    The idea is it would still transform positions, colors etc if it had to (ie: if matrix was non-null and/or color was non-white). This is pretty much the same as the existing DrawPolys methods, only with more convenient Vertex2f style parameters.

    I’m stubbornly using my own matrix tree and display transformation code

    No problem, glad you find the rest of it useful, go nuts!

    in reply to: Modifying the mojo Canvas Class #11340

    Mark Sibly
    Keymaster

    Have you looked at DrawPolys? I have also been considering adding a version that takes Vertex2fs for max flexibility+speed. Plus, the API would be much cleaner!

    You are free to mess with whaever you want to of course, but just be aware that AddDrawOp (or indeed anything private) could be changed or even removed in future from the BRL version of Canvas.

    in reply to: Android build error #11337

    Mark Sibly
    Keymaster

    Have you tried the latest develop branch (mx2cc is v1.1.08 now)?

    Have you deleted .build and .products dirs (.products dir needs to be deleted if I modify the android studio project template too much – templates are in /products dir)?

    I was tooling around with android yesterday and it was working fine, athough I was only building the musictest banana.

Viewing 15 posts - 361 through 375 (of 1,431 total)