Jump to content
  • Advertisement
Sign in to follow this  
adam17

Texture/blending/animation

This topic is 4864 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!