SMeshBufferLightMap - How to use?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
L o
Posts: 44
Joined: Sun Mar 29, 2009 2:53 pm

SMeshBufferLightMap - How to use?

Post by L o »

Hi,

Irrlicht says, SMeshBufferLightMap is a "Simple implementation of the IMeshBuffer interface with S3DVertex2TCoords vertices.".

Now my file reader shall load lightmaps additional to my textures. Until Now, I used SMeshBuffer. Shall I store the textures in SMeshBufferLightMap, too, now?

Or is the SMeshBufferLightMap only for Lightmap stuff?

I always thought it has two vertex coords because one would be for textures and one for lightmaps. I am asking because the CIrrMeshFileLoader uses THREE kinds of buffers at the same time:

Code: Select all

SMeshBuffer* sbuffer1 = 0;
SMeshBufferLightMap* sbuffer2 = 0;
SMeshBufferTangents* sbuffer3 = 0;
Greets,
Lo
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

The buffer pointers are only all there because you can meet every meshbuffer type in a .irrmesh file. You should only use the 2TCoords style if you have 2 coord values per vertex. Otherwise you'd waste memory for nothing. You can have all types of meshbuffers in one mesh.
L o
Posts: 44
Joined: Sun Mar 29, 2009 2:53 pm

Post by L o »

So the only type of MeshBuffer I need is SMeshBufferLightMap, and the first vertex is for the texture and the second one for the lightmap?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Please do us a favor and look up the definition/documentation of the S3D* structures. Think about this question when reading things that are named "texture coord" or similar...
Post Reply