Results 1 to 4 of 4

Thread: Texture data lost after create pbuffer and make it current

  1. #1

    Texture data lost after create pbuffer and make it current

    Hi,

    I started trying pbuffer recentlly and met some problem.

    I want to render my current scene to a pbuffer( 4096 x 4096 ) and save it to a bmp file while I want to. So I crate pbuffer and release pbuffer inside a function.

    After create pbuffer and make it current. I enable the light again, render my models ( with textures). I then save scene to file to see the result.

    The result show no texture, just plain, smooth shaded models. I wonder the texture data might missing after I create pbuffer.

    Is there any function that I can lock texture data while create pbuffer? Or how should I prevent the texture from misssing?

    Thanks,

    Daniel

  2. #2

    Texture data lost after create pbuffer and make it current

    Although i have never heard of pbuffer before, quick googling gave out info to look for wglShareLists.
    http://msdn2.microsoft.com/en-us/library/ms537565.aspx
    also tips:
    http://forum.beyond3d.com/archive/index.php/t-9262.html

    Good night

    ps. just reached end of reading upto the final naruto manga... so sad ending.

  3. #3

    Thanks, wglShareList() did it.

    Hi, User137,

    Thanks, it works.

    wgl ShareList() can let window RC and pbuffer RC share the same texture data.

    Note. wglShareList() must called right after WindowRC and pbuffer RC created, before calling glGenTexture, glGenList......etc.

    Daniel

  4. #4

    Change Buffer Size without recreat pBuffer

    By the way, If I want to change the pbuffer Width and height. How can I do it without recreate pBuffer?


    Thanks,

    Daniel


    http://dan59314.myweb.hinet.net

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •