OpenGL doesn't support threads by default, you can load images in threads, but you cannot send the data to OpenGL in threads.
Instead, you can load a bunch of images in threads in a temporary buffer or array, then go back to the main thread and send the data to OpenGL.
1 2018-10-08 10:48:38
Re: load textures in thread (2 replies, posted in Engine)
2 2017-12-12 21:43:49
Re: I created a save system with Lua's file functions! Get it here! (1 replies, posted in Tutorials/Examples)
Neat !
Good work.
3 2017-12-06 17:46:04
Re: Call for contribution : we need you ! (64 replies, posted in News)
I don't support Maratis3x sources anymore but here I updated the project for visual studio 2012:
http://www.maratis3d.org/code/VisualStudio2012.zip
Still x86 but it should not be hard to compile in x86-64 mode.
4 2017-11-13 10:21:14
Re: Problem with multiple sceneLayers (2 replies, posted in Engine)
Hi,
In a c++ plugin you can customize MGame::update() and MGame::draw() to handle multiple scenes.
MScene *scenes[3]
scenes[0] = getSceneByName("Sky");
scenes[1] = getSceneByName("World");
scenes[2] = getSceneByName("GUI");
in update replace current scene update by:
for (i = 0; i < 3; i++) {
scenes[i]->updateObjectsBehaviors();
scenes[i]->update();
if (i == 1) scenes[i]->updatePhysics();
scenes[i]->updateObjectsMatrices();
}
in draw something like:
for (i = 0; i < 3; i++) {
MOCamera * camera = scenes[i]->getCurrentCamera();
render->setClearColor(camera->getClearColor());
if (i == 0)
render->clear(M_BUFFER_COLOR | M_BUFFER_DEPTH);
else
render->clear(M_BUFFER_DEPTH);
camera->enable();
if (i == 1) camera->updateListener();
scenes[i]->draw(camera);
scenes[i]->drawObjectsBehaviors();
}
5 2017-09-09 21:38:42
Re: 3dsmax exporter - physics mesh VS graphics mesh aligment issue. (1 replies, posted in General)
Hi,
the pivot is the mesh origin (where the mesh local coordinates is 0, 0, 0).
There is a way to control the collision shape position:
- Create an Invisible centered-box (or sphere or tube to visualise) and enable collision
- Parent your object to the Invisible box
(you can even parent the invisible object to another one to use compound physical shapes)
Look at this example for complex cases : "Small Demos" > Physics.level
If you want to look at how the engine create the shapes, have a look at the function "createShape" here :
https://github.com/anael-seghezzi/Marat
MScene.cpp
Bests,
Anaël.
6 2017-07-28 16:02:36
Re: is maratis dead? (4 replies, posted in Gossip)
You can try to compile it under linux with CMake (see instructions on github). You will need to install CMake first.
I don't know codelite but I guess you can generate a makefile with CMake and give it's path to codelite or something like that.
It's possible that codelite can open visualc++ projects (that you can generate with CMake too).
7 2017-01-09 13:11:05
Re: Working on a new game (1 replies, posted in Showcase)
Hi, it's interesting, do you plan exploration with camera movement or is it a succession of single screen puzzles ?
8 2016-09-28 08:46:14
Re: How to disable smoothing textures in maratis? (3 replies, posted in Engine)
Be sure to parse all the textures of the mesh (mesh->getTexturesNumber()), you don't need to use the second parameter for that.
Also, if some textures are shared between objects, do this after all meshes are loaded in case the loading override the filtering.
9 2016-09-27 17:30:46
Re: How to disable smoothing textures in maratis? (3 replies, posted in Engine)
In c++, after loading the mesh, you can parse the textures of the mesh and call :
MTexture * texture = mesh->getTexture(i);
render->bindTexture(texture->getTextureRef()->getTextureId());
render->setTextureFilterMode(M_TEX_FILTER_NEAREST, M_TEX_FILTER_NEAREST);
10 2016-08-29 19:23:04
Re: Dead links! (3 replies, posted in General)
updated: http://www.maratis3d.org/?page_id=57
11 2016-08-29 19:12:25
Re: Dead links! (3 replies, posted in General)
Hi, welcome !
Thanks for the feedback, I didn't notice the links were broken since google.code went in archive.
I'll check this.
12 2016-08-24 12:55:45
Re: Is Maratis3d Dead? (2 replies, posted in General)
Hi, dev moved to github with Maratis-4: https://github.com/anael-seghezzi/Maratis-4
M4 engine is ready, and I started a rewrite of the editor.
The old code is still on google.code: https://code.google.com/archive/p/marat ult/source
13 2016-08-20 09:35:36
Re: letters that do not belong to English are incorrectly in a MOText, (8 replies, posted in Engine)
You could carry my project Maratis4? Or even missing work to be used by a user?
I'm sorry I don't understand what you mean ?
If you don't need the editor, your code should be mostly retro-compatible.
Only some things are still unfinished, the sound contexts and lua are still not plugged (though this part is the same code as M3).
14 2016-08-19 22:14:12
Re: letters that do not belong to English are incorrectly in a MOText, (8 replies, posted in Engine)
Now if you want to enable UTF-8 with Maratis-3 it's going to be a bit complicated. The only way is to update Maratis-3 source code with some part of Maratis-4 source.
First, you need to update "MFreetypeLoader.cpp" : https://github.com/anael-seghezzi/Marat Loader.cpp
Then you need this to decode UTF-8 : https://github.com/anael-seghezzi/Marat tinyutf8.h
You need to update "MStandardRenderer::drawText" with the one found here : https://github.com/anael-seghezzi/Marat nderer.cpp
15 2016-08-19 21:51:06
Re: letters that do not belong to English are incorrectly in a MOText, (8 replies, posted in Engine)
It works with Maratis-4 (I checked): https://github.com/anael-seghezzi/Maratis-4
16 2016-08-18 16:39:50
Re: letters that do not belong to English are incorrectly in a MOText, (8 replies, posted in Engine)
What text editor are you using ?
If you are using Microsoft visual c++, be sure that your cpp file is saved in UFT-8.
In visual studio, go to File > Advanced Save Options > Unicode (UTF-8 without signature)
17 2016-07-26 07:48:50
Re: How to add an object Behavior in C ++? (2 replies, posted in Engine)
If you just want to add a behavior to an object in c++.
You can use the behavior manager if you don't have access to the behavior code directly:
MEngine *engine = MEngine::getInstance();
MBehaviorManager * bManager = engine->getBehaviorManager();
MBehaviorCreator * bCreator = bManager->getBehaviorByName("LookAt");
MBehavior *behavior = bCreator->getNewBehavior(object);
object->addBehavior(behavior);
MVariable var0 = behavior->getVariable(0); // var 0 is "target"
MString *targetName = (MString *)var0.getPointer();
*targetName = "objetNameToLookAt";
If you have access to the behavior class you can do this directly:
MBLookAt *behavior = MBLookAt::getNew(object);
object->addBehavior(behavior);
18 2016-07-26 07:34:19
Re: How to add an object Behavior in C ++? (2 replies, posted in Engine)
Hi, start with this tutorial :
http://www.maratis3d.org/?p=500
19 2016-07-20 16:59:58
Re: Contibute (2 replies, posted in General)
Awesome !
Would you like to write a tutorial on the tuto section of the forum ?
Or a youtube tutorial, even better
20 2016-07-15 18:46:34
Re: is maratis dead? (4 replies, posted in Gossip)
Well, Maratis is not entirely dead on github: https://github.com/anael-seghezzi/Maratis-4
Today I mostly work on a C version of Maratis / image processing library: https://github.com/anael-seghezzi/Marat
-C-library
It's difficult to stand next to Unity or Unreal in a similar category, plus Maratis didn't get a lot of support. I also got more and more work on non-videogame projects (before my profession was more tied with Maratis).
Maratis-4 engine rewrite is complete, not the editor (and I'm not sure it will be in a classical sense). I think a shift is necessary to distance Maratis from other (big) classical 3d-editor models.
21 2016-07-14 07:57:01
Re: Cannot see my bump map/normal map on model in maratis editor (2 replies, posted in General)
Hi,
in Blender, make sure you have a normal texture in the corresponding slot:
and that "normal map" is checked:
more doc here : http://wiki.maratis3d.org/index.php?title=User_manual
22 2016-07-09 18:13:10
Re: Problem with open project! (2 replies, posted in Editor)
Hi.
What happens if you change "StandardRenderer" to "FixedRenderer" ?
Maybe you can try to update your graphic card drivers.
What system / windows version are you using ? (Windows 7 ?)
23 2015-11-16 08:37:54
Re: Maratis Not Rendering (Anything Really) (6 replies, posted in General)
You can install the latest nvidia or amd drivers depending on your graphic card.
It could also be something else, not sure.
24 2015-11-14 08:39:19
Re: Maratis Not Rendering (Anything Really) (6 replies, posted in General)
Not one of the demo here works ? : http://www.maratis3d.org/?page_id=53 ("YoFrankie" for ex)
It could be a driver issue, try to install latest opengl drivers.
Do you see a message in Maratis console ? OpenGL version or else ?
25 2015-10-26 08:34:13
Re: When i insert a .obj model they do not have a texture. (1 replies, posted in General)
When you import, the model is converted to Maratis .mesh format in in your-project/meshs/
You may have to resolve the texture path, specially if your textures are not yet in in your-project/maps/
1: copy the textures in your-project/maps/
2: Open the converted file in your-project/meshs/ with a text editor and correct the relative path if it's not correct.
(should be in the form "../maps/texture.png" or "../../maps/texture.png")