Results 1 to 6 of 6

Thread: Update a texture3D with a texture2D

  1. #1
    Member Newbie
    Join Date
    Mar 2003
    Posts
    38

    Update a texture3D with a texture2D

    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 ?

  2. #2
    Member Contributor
    Join Date
    Mar 2003
    Location
    Suffolk, United Kingdom
    Posts
    99

    Re: Update a texture3D with a texture2D

    Have you tried glTexSubImage3D() ?

  3. #3
    Member Newbie
    Join Date
    Mar 2003
    Posts
    38

    Re: Update a texture3D with a texture2D

    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...

  4. #4
    Senior Member Regular Contributor
    Join Date
    Apr 2003
    Location
    Toulouse, France
    Posts
    133

    Re: Update a texture3D with a texture2D

    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 ...

  5. #5
    Member Newbie
    Join Date
    Mar 2003
    Posts
    38

    Re: Update a texture3D with a texture2D

    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

  6. #6
    Senior Member Regular Contributor
    Join Date
    Apr 2003
    Location
    Toulouse, France
    Posts
    133

    Re: Update a texture3D with a texture2D

    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.

Similar Threads

  1. Texture2D
    By ultrablox in forum Vulkan
    Replies: 6
    Last Post: 08-02-2016, 07:59 AM
  2. texture2D vs textureLOD
    By heinz85 in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 01-20-2012, 12:48 PM
  3. texture2D always returning (0,0,0,1)
    By tborgers in forum OpenGL: GLSL
    Replies: 2
    Last Post: 05-05-2011, 05:44 AM
  4. why texture2d has no effect?
    By wilburn in forum OpenGL: Advanced Coding
    Replies: 10
    Last Post: 10-16-2007, 07:47 AM
  5. texture2D/texture2DProj
    By Vexator in forum OpenGL: GLSL
    Replies: 3
    Last Post: 08-27-2007, 02:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean