View Full Version : Adding two textures
Acheum
05-16-2003, 03:40 AM
How can we add a texture into another one, to obtain a new texture which is the sum of the two ?
starman
05-16-2003, 05:16 AM
Do you mean combine them in some kind of image editor or do this in an OpenGL program at runtime? If it's the latter, check out this FAQ:
http://www.opengl.org/developers/faqs/technical/texture.htm#text0085
errno
05-16-2003, 05:16 AM
you can render the first texture, with texenv==GL_REPLACE and then render the second texture with texenv==GL_ADD.
to do that, reset the modelview, projection, texture matrix with identity matrix, render a (-1,-1 / 1,1) quad with the first texture and another (-1,-1 / 1,1) quad with the second texture.
after that, you could bind the color buffer to a texture.
and everything without blending, i think that's what you want ...
décidement, que de problème dans ce stage ... ça à pas l'air simple ton truc. bon courage http://www.opengl.org/discussion_boards/ubb/smile.gif.
errno
05-16-2003, 05:18 AM
je viens de me rendre compte que mon français était pire que mon anglais ... donc je corrige:
ça a pas l'air simple ton truc http://www.opengl.org/discussion_boards/ubb/biggrin.gif.
Leyder Dylan
05-16-2003, 12:40 PM
Salut,
Regardes sur mon site :
www.slug-production.be.tf (http://www.slug-production.be.tf)
J'ai un example pour faire ce que tu veux. En fait, cela s'appele du "multi-texturing".
Donc, dans mon site, va dans :
Download
Extension
Cherche le programme "Multitexturing"
Tu vois, y a pas que toi qui parle français http://www.opengl.org/discussion_boards/ubb/smile.gif
Acheum
05-21-2003, 03:52 AM
Merci, je vais voir ce que je peux faire avec ça...
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.