View Full Version : Update a texture3D with a texture2D
05-07-2003, 12:09 AM
In my application, I want to update a part of a 3D texture (a plan of this texture) with a 2D texture. Is it possible to do that without having to reload the texture ?
For better performance, I want to avoid to change manually the array pixel and reload the texture.
Perhaps using the fragment program, but how ?
Have you tried glTexSubImage3D() ?
05-07-2003, 03:48 AM
Yes, I ned something like that, but glTexSubImage3D copies an array of pixels into a portion of a 3D texture, and glCopyTexSubImage3D() copies the frame buffer. But I want to copy a 2D texture into a 3D texture, without having to put the 2D texture in the program memory, which slows the execution...
05-07-2003, 05:01 AM
maybe you should look to "render to texture" but i don't know if it works for 3D texture.
i don't think there is a solution without the system memory.
decidement acheum, tu t'arraches sur ce stage ... http://www.opengl.org/discussion_boards/ubb/biggrin.gif
05-07-2003, 05:41 AM
render to texture works only for textures 1D or 2D, that's why I want to render to a 2D texture, and update the 3D one.
But perhaps I could have the solution with glCopyTexSubImage3D and reading into the pbuffer... (I need also a 128 bits buffer, so I must use a pbuffer to render)
Ouais, c'est assez chaud http://www.opengl.org/discussion_boards/ubb/wink.gif
05-07-2003, 06:04 AM
it should work fine.
mais comme il est 17h, et qu'il y a un long WE, je suppose que tu vas remettres ca a lundi.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.