PDA

View Full Version : Can TBGL Do multitexture for an M15 Object?



bookhead
24-11-2009, 01:05
Especially with special effects applied to it?

I'm talking about an object with two textures, one texture has light effected to it, the other texture has no light effect to it, so it stays the same as if it was a glow in the dark element.

Another thing would be, is scrolling textures on an object possible in TBGL?

For an example, Quake 3.

kryton9
24-11-2009, 03:23
The native m15 support does not support these features yet... but Petr can answer officially. You can manually make work arounds I am pretty sure.

Petr Schreiber
24-11-2009, 10:44
Hi bookhead,

multitexturing is not built in to TBGL, but...

TBGL has been designed to be fully cooperative with low level openGL pipeline, so you can use:


#include "thinbasic_gl.inc"
#include "thinbasic_glext.inc"


to get access to all OpenGL functionality and combine it with TBGL.

Entity system supports entity of type "func slot", which allows to plug in completely custom graphic entity.

Animating textures is just shifting coordinates of texture strip with images, so definitely possible.

I will return back to internet around 20:00 of central european time, and will provide you with fully working example.
In the meantime please download bonus packs (http://www.thinbasic.com/index.php?option=com_jdownloads&Itemid=95&task=viewcategory&catid=5) and have a look around - there is one multitexturing example included.


Petr

Petr Schreiber
24-11-2009, 15:57
I found a few minutes,

so here you can find example which uses multitextured entity and shows, that shifting one of the UV coordinates by certain number creates illusion of texture scrolling.

So as you can see, while M15 models are not designed to carry multiple texture layers, you can build your own geometry entities quite easily.
First enhacement for M15 format in near future will be PNG and JPG textures, about multitexturing I need to think more carefully.

Do you need it for some static lighting in environment?


Petr