Search found 9 matches
- Fri Feb 28, 2020 10:08 am
- Forum: Beginners Help
- Topic: How to batch
- Replies: 6
- Views: 1091
Re: How to batch
I did have the .cpp file in the same directory as the project. I also had the header file in the project folder. Both the CBatchingMesh.cpp and CBatchingMesh.h was in the same folder as the main.cpp file. I don't know why it gave me that error haha
- Thu Feb 27, 2020 7:07 am
- Forum: Beginners Help
- Topic: Triangle selector on a plane?
- Replies: 1
- Views: 749
Triangle selector on a plane?
I do the following in order to create planes and send only one draw call for every single one of them
device->getCursorControl()->setVisible(false);
irr::scene::ICameraSceneNode* cam = smgr->addCameraSceneNodeFPS();
cam->setPosition(irr::core::vector3df(10, 30, 10));
irr::video::ITexture ...
device->getCursorControl()->setVisible(false);
irr::scene::ICameraSceneNode* cam = smgr->addCameraSceneNodeFPS();
cam->setPosition(irr::core::vector3df(10, 30, 10));
irr::video::ITexture ...
- Wed Feb 26, 2020 6:35 pm
- Forum: Beginners Help
- Topic: How to batch
- Replies: 6
- Views: 1091
Re: How to batch
Managed to solve my problem by doing the following
#include "CBatchingMesh.cpp" // NOT the header file
...
code
...
CBatchingMesh *BatchingMesh = new CBatchingMesh(); // no error with .cpp file, error with .h file
for(int x = 0; x < 10000; x++) {
irr::scene::IMesh* plane = geomentryCreator ...
#include "CBatchingMesh.cpp" // NOT the header file
...
code
...
CBatchingMesh *BatchingMesh = new CBatchingMesh(); // no error with .cpp file, error with .h file
for(int x = 0; x < 10000; x++) {
irr::scene::IMesh* plane = geomentryCreator ...
- Wed Feb 26, 2020 3:45 pm
- Forum: Beginners Help
- Topic: How to batch
- Replies: 6
- Views: 1091
Re: How to batch
I tried creating a CBatchingMesh but using the addMesh function requires that you know the rotation and the scale of the mesh, which I cannot find in the IMesh object. There is no ->getRotation() nor a ->getScale() / ->getSize(), etc... any ideas?
Edit: whenever I try to apply the rotation, scale ...
Edit: whenever I try to apply the rotation, scale ...
- Tue Feb 25, 2020 7:44 pm
- Forum: Beginners Help
- Topic: How to batch
- Replies: 6
- Views: 1091
How to batch
How do you batch IMesh's? There is no concrete example on the forum or on google, just posts about "You need to batch!", "Batching will solve that!", "Draw everything in one draw call by batching!", etc. I found https://sourceforge.net/p/irrext/code/HEAD/tree/trunk/extensions/scene/IMesh/ that ...
- Tue Feb 25, 2020 5:27 pm
- Forum: Beginners Help
- Topic: Set material of custom node / plane?
- Replies: 6
- Views: 1014
Re: Set material of custom node / plane?
Yes, realized that I had another plane created much further down, sorry! The texture that is applied onto my custom node is faulty in that it is a weird line in the middle. Further, the texture is warped onto the plane created by gemoetryCreator in my example. It seems as if that plane is created ...
- Tue Feb 25, 2020 3:18 pm
- Forum: Beginners Help
- Topic: Set material of custom node / plane?
- Replies: 6
- Views: 1014
Re: Set material of custom node / plane?
I found this way of creating a plane but I am unable to apply a texture to it...
irr::video::ITexture * myTex = driver->getTexture("texture.png");
const irr::scene::IGeometryCreator *geomentryCreator = smgr->getGeometryCreator();
irr::scene::IMesh* plane = geomentryCreator->createPlaneMesh(irr ...
irr::video::ITexture * myTex = driver->getTexture("texture.png");
const irr::scene::IGeometryCreator *geomentryCreator = smgr->getGeometryCreator();
irr::scene::IMesh* plane = geomentryCreator->createPlaneMesh(irr ...
- Tue Feb 25, 2020 2:30 pm
- Forum: Beginners Help
- Topic: Set material of custom node / plane?
- Replies: 6
- Views: 1014
Re: Set material of custom node / plane?
I managed to apply the texture! I have played around with irrlicht before, about a year ago and I managed to create a plane without creating a custom node like I did here. When I apply the texture I get a distict line on the hypotenuse of both triangles. Is there a simple way to create a simple ...
- Tue Feb 25, 2020 1:57 pm
- Forum: Beginners Help
- Topic: Set material of custom node / plane?
- Replies: 6
- Views: 1014
Set material of custom node / plane?
class CSampleSceneNode : public scene::ISceneNode
{
core::aabbox3d<f32> Box;
video::S3DVertex Vertices[4];
video::SMaterial Material;
public:
CSampleSceneNode(scene::ISceneNode* parent, scene::ISceneManager* mgr, s32 id)
: scene::ISceneNode(parent, mgr, id)
{
Material.Wireframe ...