Texture/blending/animation

Started by
3 comments, last by Kalidor 18 years, 10 months ago
im still working on my particle engine and the next step i want to accomplish is blending between two textures. i have looked at blending but that requires me to draw the objects twice and that would become largely inefficient. i have also looked at multitexturing but i cant find a good tutorial. what should i really look for when on google or gamedev? could anyone point me towards some good tutorials for texture blending?
Advertisement
ive been doing a bit of googling to find multitexturing, but ive been having some issues with defining the functions:

error C2146: syntax error : missing ';' before identifier 'glMultiTexture2fARB'error C2501: 'PFNGLMULTITEXTURECOORD2FARBPROC' : missing storage-class or type specifiers


and this is how im defining the functions:

typedef void (APIENTRY * PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);typedef void (APIENTRY * PFNGLACTIVETEXTUREPROC) (GLenum texture);PFNGLMULTITEXTURECOORD2FARBPROC glMultiTexture2fARB = NULL;PFNGLACTIVETEXTUREARBPROC glActiveTextureARB = NULL;glMultiTexture2fARB = (PFNGLMULTITEXTURECOORD2FARBPROC) wglGetProcAddress("glMultiTexture2fARB");glActiveTextureARB = (PFNGLACTIVETEXTUREARBPROC) wglGetProcAddress('glActiveTextureARB");


any solutions? glext.h is included.
use a extension library like glee or glew etc
youll be more productive
WOW i added glew to my project and now everything works! thats hella easy to use. the next question is where should i start looking on how to blend 2 textures into each other, for example: i have a particle, when born, has one texture. as it ages, the first texture fades away and the second fades in.
Quote:Original post by adam17
...the next question is where should i start looking on how to blend 2 textures into each other...
Check out the GL_ARB_texture_env_combine spec. It has everything you need to start using texture combiners, although it can be pretty confusing if you're not used to extension specs. There are probably some tutorials around somewhere that do a pretty good job of explaining it, so check for that on Google.

Good luck!

This topic is closed to new replies.

Advertisement