301

(8 replies, posted in Scripting)

Vegas wrote:

Wish it was that simple =p
http://forum.maratis3d.com/viewtopic.php?id=169

Well I don't literally mean just drop them in. As anael said there are some
modifications that may need to be made.

My point was that with Maratis shader based pipeline you imagination
is only limited by your hardware's capability's.

Look for GLSL 4.0 based shaders.

Here is a really good book on OpenGL 4 and Shaders
http://www.packtpub.com/opengl-4-0-shad … kbook/book

https://www.packtpub.com/sites/default/files/imagecache/productview/4767_OpenGL%204.0%20Shading%20Language%20Cookbook.jpg

302

(8 replies, posted in Scripting)

There is nothing preventing you from applying parallax shader in Maratis.
With Maratis shader based pipeline it all comes down to your graphics cards capability's.

We should probably go hunt down free shaders and drop them in Maratis to build up a collection.

anael wrote:

ManualUse example is one of the simplest,
just initializing MCore + MEngine and loading some mesh.

What do you mean by subclassed ?

In ManualUse MyGame.h you derive a new class from MGame

class MyGame : public MGame
{
public:

I was asking because with some library's there not meant to be used directly. You have to
"subclass" derive a new class from an existing one.

What I was trying to do was use Maratis' Rendering context in SFML2

 int main()
 {
     // Create the main window
     sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");
 
    MEngine *engine = MEngine::getInstance();
    MRenderingContext *render = engine->getRenderingContext();
    MGame *game = engine->getGame();
    
    render->setViewport(0, 0, 100, 100);

But when I initialize my MGame pointer *game I get a segfault.

Maybe I asked the wrong question.

Do the MEngine or MGame classes have to be subclassed
in order to be used?

I was wondering if anyone had a simple C++ "Hello, World" type example that uses
MCore & MEngine?

I tried using the ManualUse example as a reference for a bare-bones
type example but I keep getting a segfault.

I need something even more basic for testing.

Any help would be great smile

306

(9 replies, posted in Gossip)

Not bad except all that color is kinda irritating smile

307

(18 replies, posted in Engine)

Nistur wrote:

If you can get this working, I think it would be an ideal method myself as it would mean only maintaining one build system/project format and yet having support for everything. Scons does that to a degree and is quite good at it, but unfortunately doesn't create things like VS project files, so using an IDE requires maintaining the project separately.

I can get it working for all platforms.

But I will be honest with you I am a Linux user so you will see stuff for Linux that might not be available
for Windows or Mac.

For instance I have ARM v4, 5, 6 cross-compiled toolchains already for Maratis once I have an ARM v7 toolchain
then Maratis will work on every mobile Linux device that support OpenGL ES out of the box.

A battery's included type of thing.

308

(11 replies, posted in Gossip)

Well I am willing to do Maratis C++, Lua, and Blender Tutorials

And provided asset packs: Here are a few screenshots.

Cut out tree's and Plants Example
http://i44.tinypic.com/wj7tkw.png
Larger View

Here are some Random Objects
http://i42.tinypic.com/10s817d.png
Larger View

Character Modeling
http://i43.tinypic.com/1zdr95e.png
Larger View

http://i52.tinypic.com/293zwag.png
http://i55.tinypic.com/a0ud5f.png

I can also do story telling.
http://i54.tinypic.com/241qtfc.png

Your character walks into a two story house.

The house is very dirty with low light levels, the lighting has a very faint greenish tone.

Laying in a recliner is an over-weight putrid corps of a man.

The tv is on but there is just static on it.

There are rats running around everywhere.

Upstairs there is a little girls room.

The little girls room has carpet and wallpaper, there is one large section
of blood soaked carpet by the girls bed. there are random furnishings,
and a closet.

Once your character makes it to the center of the room, things start
to lightly vibrate you hear squeaking, from the bed, the light on a chain above your head
starts to sway back and fourth.

The wallpaper on the walls starts to bubble……
Your character turns around to run for the door but before you git there the door slams!

shut. You can’t get the door open…..
Suddenly everything goes quiet…….
You hear this horrible demonic scream of a female child……

A dead/demonic dirty little girl in a white blood stained night gown comes crawling out
from underneath the bed. She has long black hair and glossy black eye’s.

She stands up quickly and glides across the floor by the tips of here toes with arms
extended(reaching) for you.

http://i53.tinypic.com/2mmih4m.png
http://i55.tinypic.com/2427ujq.png

309

(3 replies, posted in Editor)

rodolfo wrote:

Nice! Quite stylish.

Waiting for more updates.


I am working on extending MGui so you could use TinyXML to read something like ...

<?xml version="1.0"?>
<Widget id="MainWindow">
        <Widget id="PushButton1">Button</Widget>
</Widget>

And then use Json to style it.

{
      "#MainWindow": {
          "background-color": "#000000ff",
          "border-width": "1",
          "border-style": "dotted",
          "border-color": "#00000000",
          "padding": "5",
          "x": "0",
          "y": "0",
          "r": "0",
          "width": "100",
          "height": "50"
      }
}

I have different paint systems working for those who want to use them
currently (Cairo and QtArthur(Vector and Raster Painter & Svg ))

I am still trying to get Skia and AGG and Fog Framework to work.

In future I hope to have dynamic texture painting in Maratis

anael wrote:

Hi,
thanks smile

Good to know about OpenImageIO, it can be a good alternative is needed,
for now DevIL has been very good, it also support various formats among with HDR.

STK looks interesting, how is it working with non-desktop systems (iOS, Android) ?

I am going to work on this stuff as Maratis plugins so those want to uses them they can and if at some point
you want to drop them in Maratis then there will be no work to do smile

STK is a audio effects toolkit. You would still use OpenAL to load and play the audio, STK
allows you to make and combined different sound effects.

It works on Windows, Linux, Mac and is not audio system dependent.
It will work on iphone, and android.

311

(18 replies, posted in Engine)

anael wrote:

Good, let us know how it is going smile

Officially for Maratis I want to support only one building system, because it has been already very hard to have one working simply and cross-platform, it was a big work for Davide Bacchet and we have a linux build in a big part thanks to that.

If at some point a better, simpler alternative is working as good as scons for all platform, we can think about switching to it, why not. Some details are more difficult than others, compiling the 3rdparty libs, making MCore/MEngine dynamic libs and linked properly for the plugin system dependency etc

What is the exact difference with scons ? Is it generating make-file and native compilers projects ?
What do you need to be installed in your computer ?


Well premake is a self-contained build system that uses lua, so you don't need to install anything
you could even have it as a 3rdparty lib.

If the end user is building maratis from source then premake will bootstrap it's self and then
build the rest of maratis.

If maratis is pre-compiled then there is nothing to do.



Generating project files for different platforms:
--------------------------------
For Linux:
premake4 gmake

For Mac:
premake4 xcode3

For Windows &  Visual Studio 2010
premake4 vs2010



Building Maratis in different modes is easy.
----------------------------------

1. Maratis Dynamic in Release Mode:  Nothing to do just type
make

2. Maratis Dynamic in Debug Mode: Just do the following for all platforms.
make config=SharedDebug

3. Maratis Static in Release Mode:
make config=Static

4. Maratis Static in Debug Mode:
make config=StaticDebug



Right now I have MCore/MEngine/MGui/MaratisCommon(Plugin System) all building and linking properly.
The only thing left to do is Maratis Editor, Player and 3rdparty libs.


Scons uses Python and hard to use.
and
Premake uses Lua and is easy to use.


Here is the premake --help output.


premake4 --help
Premake 4.3, a build script generator
Copyright (C) 2002-2010 Jason Perkins and the Premake Project
Lua 5.1 Copyright (C) 1994-2008 Lua.org, PUC-Rio

Usage: premake4 [options] action [arguments]

OPTIONS

--cc=VALUE        Choose a C/C++ compiler set; one of:
     gcc                GNU GCC (gcc/g++)
     ow                 OpenWatcom

--dotnet=VALUE    Choose a .NET compiler set; one of:
     msnet           Microsoft .NET (csc)
     mono            Novell Mono (mcs)
     pnet             Portable.NET (cscc)

--file=FILE         Read FILE as a Premake script; default is 'premake4.lua'

--help               Display this information

--os=VALUE      Generate files for a different operating system; one of:
     bsd              OpenBSD, NetBSD, or FreeBSD
     linux             Linux
     macosx         Apple Mac OS X
     solaris          Solaris
     windows        Microsoft Windows

--platform=VALUE  Add target architecture (if supported by action); one of:
     x32               32-bit
     x64               64-bit
     universal       Mac OS X Universal, 32- and 64-bit
     universal32   Mac OS X Universal, 32-bit only
     universal64   Mac OS X Universal, 64-bit only
     ps3               Playstation 3 (experimental)
     xbox360        Xbox 360 (experimental)

--scripts=path  Search for additional scripts on the given path

--version           Display version information

ACTIONS

clean               Remove all binaries and generated files
codeblocks      Generate Code::Blocks project files
codelite           Generate CodeLite project files
gmake             Generate GNU makefiles for POSIX, MinGW, and Cygwin
vs2002            Generate Microsoft Visual Studio 2002 project files
vs2003            Generate Microsoft Visual Studio 2003 project files
vs2005            Generate Microsoft Visual Studio 2005 project files
vs2008            Generate Microsoft Visual Studio 2008 project files
vs2010            Generate Visual Studio 2010 project files (experimental)
xcode3            Generate Apple Xcode 3 project files (experimental)

For additional information, see http://industriousone.com/premake

312

(3 replies, posted in Editor)

Started toying with a theme for the editor or the gui in general.

So what do you think?

http://i43.tinypic.com/2dw75g.png

313

(18 replies, posted in Engine)

Yahh there is something defiantly funny with those Scons built shared libs.

I just replaced the Scons libMEngine.so with the one my premake4 script built

My premake4 libMEngine.so works perfectly so I am guessing Scons is building in Debug mode.



For the rest of you if you want to try them on a different platform

Just:

For Linux:
premake4 gmake

For Mac:
premake4 xcode3

For Windows &  Visual Studio 2010
premake4 vs2010


------------------------------------------------------------------------------

codeblocks      Generate Code::Blocks project files
codelite           Generate CodeLite project files
gmake             Generate GNU makefiles for POSIX, MinGW, and Cygwin
vs2002            Generate Microsoft Visual Studio 2002 project files
vs2003            Generate Microsoft Visual Studio 2003 project files
vs2005            Generate Microsoft Visual Studio 2005 project files
vs2008            Generate Microsoft Visual Studio 2008 project files
vs2010            Generate Visual Studio 2010 project files (experimental)
xcode3            Generate Apple Xcode 3 project files (experimental)







Once I have everything moved over to premake ill start moving the scripting from generic lua to luajit.
Then scripting with lua will almost be as fast a plain c.

Also going to look into the image loader and try for Googles WebP decoder support for the Editor that
will reduce  the memory footprint and increase performance drastically.

314

(18 replies, posted in Engine)

I started creating Premake4 build scripts, basically because there easier to maintain and use.
And I really dislike Scons smile

Note: You can get premake4 from http://industriousone.com/premake

Here is what I have so far.


Inside MCore dir create a premake4.lua script paste the following script inside

-- A solution contains projects, and defines the available configurations
solution "Maratis"
   configurations { "Release", "Debug" }
 
   -- A project defines one build target
   project "MCore"
      kind "SharedLib"
      language "C++"
      files { "Includes/**.h", "Sources/**.cpp" }
 
       configuration "Release"
         defines { "NDEBUG" }
         flags { "Optimize" } 
         
      configuration "Debug"
         defines { "DEBUG" }
         flags { "Symbols" }

Inside MEngine dir create a premake4.lua script paste the following script inside

-- A solution contains projects, and defines the available configurations
solution "Maratis"
   configurations { "Release", "Debug" }
 
   -- A project defines one build target
   project "MEngine"
      kind "SharedLib"
      language "C++"
      files { "Includes/**.h", "Sources/**.cpp" }
      includedirs { "../MCore/Includes" }
      libdirs { "libs", "../MCore" }
      links { "MCore" }
      
       configuration "Release"
         defines { "NDEBUG" }
         flags { "Optimize" } 
         
      configuration "Debug"
         defines { "DEBUG" }
         flags { "Symbols" }

Inside MGui dir create a premake4.lua script paste the following script inside
Note: I need to figure out how to automatically exclude platform specific file... Like
the WIN32 dir's when building on Linux

-- A solution contains projects, and defines the available configurations
solution "Maratis"
   configurations { "Release", "Debug" }
 
   -- A project defines one build target
   project "MGui"
      kind "SharedLib"
      language "C++"
      includedirs { "../MCore/Includes", "../../Maratis/Common"}
      excludes { "Includes/WIN32/**.h", "Sources/WIN32/**.cpp" }
      files { "Includes/**.h", "Sources/**.cpp"}
      links { "GL", "Xxf86vm", "X11" }
      
       configuration "Release"
         defines { "NDEBUG" }
         flags { "Optimize" } 
         
      configuration "Debug"
         defines { "DEBUG" }
         flags { "Symbols" }

Inside MSDK dir create a premake4.lua script and paste the following script inside

-- A solution contains projects, and defines the available configurations
solution "Maratis"
      include "MCore/"
      include "MEngine/"
      include "MGui/"

Now while in the MSDK dir type...

premake4 gmake

and then

make

The only strange thing that I am seeing is that the shared libs built with the Scons scripts are twice the size than the ones built with my premake4 scripts. But when I ldd each shared lib and compare with the Scons ones they link to they exact same librarys. Makes me think that Scons is building with Debug symbols. If so that would kill Maratis performance drastically.


I am still working on premake4 scripts for  the Rest of Maratis I can test on Linux and Win7 but you Mac folks are out of luck sad

315

(7 replies, posted in Bug report)

Nistur wrote:

Ok, so there are a couple of SConscript files that need 'X11' adding to them ie:
env_local.AppendUnique(LIBS = ['GL',
                                                             'Xxf86vm',
                                                             'X11'])
MSDK/MGui/SConscript
Maratis/Editor/SConscript
Maratis/Player/SConscript
Examples/ManualUse/SConscript

Also, the editor and player need 'dl' adding to the same list.

Hope that helped. Not sure why, but it compiles fine on one of my machines without it, but one it needs the extra libs.

Thanks that fixed everything and Yahh I would file a bug report with the fix you posted to save them some work.

'dl' libdl is for Dynamic loading, 'The plugin system'

Thanks again smile

316

(7 replies, posted in Bug report)

Nothing Huge I tried to fix it my self but I can't make heads or tails of Scons. Eventualy I am going to try and
make Premake4 build scripts to use instead.


/usr/bin/ld: build/linux2/release/MSDK/MGui/libMGui.a(MX11Window.o): undefined reference to symbol 'XGrabKeyboard'
/usr/bin/ld: note: 'XGrabKeyboard' is defined in DSO /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libX11.so so try adding it to the linker command line
/usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libX11.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
scons: *** [build/linux2/release/Maratis/Editor/MaratisEditor] Error 1
scons: building terminated because of errors.
[steven@myhost dev]$

First I would like to say WOW Maratis is amazing. Grate Job and Thank you for the linux support!!!

I would like to make a few library & feature suggestions, not saying there is anything
wrong with Devil. This is just are you aware of ....



The first library is OpenImageIO a ImageLoader for OpenGL supports a crap load of Image formats, its BSD licensed
and sponsored by Sony Image Works.  Interesting Formats are PNG, WebP, HDR, EXR, ....
https://sites.google.com/site/openimageio/home


The second library is OpenColorIO a color management library  for use with HDR images (EXR) and is the companion library to
OpenImageIO its BSD licensed and sponsored by Sony Image Works.
http://opencolorio.org/


The last library is The Synthesis ToolKit in C++ (STK) its a synth toolkit, Could be used to give OpenAL those extra effect's
and bring OpenAL in Maratis's case inline with Fmod. Its BSD licensed
https://ccrma.stanford.edu/software/stk/