Hello all ...
I just got started with Irrlicht and i find it great, but i have a simple question:
Is it possible to mix Irrlicht pipeline ( which is ok for some fixed geometry ) and raw opengl calls ?
Is it possible to get rid of this plain ugly Irrlicht s3dvertex / drawIndexedTriangle interface ? i have tons of opengl codes, and adapt it to irrlicht pipeline is like hell.
Ah another question, concerning the rendering itself :
after reading numerous topics, it seems you can't send just raw geometry to irrlicht, you have to create a mesh, feed the mesh buffer with vertices / triangles, then call the render ... any Irrlicht virtuoso could shed some light on this ? am i right ?
Thx a bunch !
Raw opengl calls ??
After you've created an irrlicht device you can use any opengl call anywhere in your program, it shouldn't make any problems.
There are also some draw3D** functions for simple geometry like draw3DTriangle or draw3DLine.
Well, there's also a function called drawVertexPrimitiveList but it's pretty the same. As long you don't want to use any other driver that opengl you can just copy your code to where drawPrimitves functions should be.Is it possible to get rid of this plain ugly Irrlicht s3dvertex / drawIndexedTriangle interface
There's no need to create meshbuffers or nodes but you still need vertices and indices to draw them using drawVertexPrimitiveList or any other draw primitives function. Just call it between beginscene and endScene is ok.it seems you can't send just raw geometry to irrlicht,
There are also some draw3D** functions for simple geometry like draw3DTriangle or draw3DLine.
-
- Posts: 2
- Joined: Mon Oct 29, 2007 11:23 am
hmm after some tests ( either before, between or after beginScene() / endScene() of irrlicht ), it seems gl calls never reach the render
if anyone has some sample, if could help save one life ( or mine indeed ^^ )
I'll try with the mesh buffer method, though i find it quite heavy for some dynamic geometry.
Thanx for your reply
EDIT : if anyone is wondering, it's for some metaballs code !
if anyone has some sample, if could help save one life ( or mine indeed ^^ )
I'll try with the mesh buffer method, though i find it quite heavy for some dynamic geometry.
Thanx for your reply
EDIT : if anyone is wondering, it's for some metaballs code !
-
- Posts: 170
- Joined: Sun Jul 01, 2007 11:41 pm
- Location: Manchester, UK
Could you post some example code of what you're doing. Me for example, I'm doing something like this to render primitives.( either before, between or after beginScene() / endScene() of irrlicht ), it seems gl calls never reach the render
Code: Select all
Device->getVideoDriver()->beginScene(false, false, video::SColor(0,255,255,255));
glClear( GL_DEPTH_BUFFER_BIT|GL_COLOR_BUFFER_BIT );
glLoadIdentity();
Device->getVideoDriver()->setTransform( video::ETS_PROJECTION, proj );
glBegin( GL_POINTS );
for( int i = 0; i<DepthSize.Width; ++i)
{
for( int i2 = 0; i2<DepthSize.Height; ++i2)
{
float depth = DepthInfoBuffer[DepthSize.Width*i2 + i];
glVertex3f( (float)(i-(DepthSize.Width/2)),
(float)(i2-(DepthSize.Height/2)),
depth);
}
}
glEnd();
Device->getVideoDriver()->endScene();
-
- Posts: 8
- Joined: Sun Oct 28, 2007 7:45 pm
Hmm, you should first select the Matrix and then reset it.
You are currentliy resetting the Matrix and then you select the Projection Matrix.
That's what I would try.
rya.
You are currentliy resetting the Matrix and then you select the Projection Matrix.
You never know what Matrix Irrlicht currently has selected.glClear( GL_DEPTH_BUFFER_BIT|GL_COLOR_BUFFER_BIT );
glLoadIdentity();
Device->getVideoDriver()->setTransform( video::ETS_PROJECTION, proj );
That's what I would try.
rya.
Yes.SwitchCase wrote:Perhaps if you edited the irrlicht engine, adding functionality using your opengl code, you could achieve what you want. Plus if you do a nice job you could share it with everyone else.
Good luck.
Treat irrlicht either as a general purpose engine or a skeleton for a better engine (i.e. improving upon irrlicht's built in components) Its not recommended to use irrlicht as an engine and plaster opengl code on top . You need to have device-dependant api calls inside irrlicht .