-Enable my pbuffer- (wglMakeContextCurrentARB to pbuffer)
gluLookAt()
draw()
-Disable my pbuffer- (wglMakeContextCurrentARB to frame buffer)
OrthoMode()
-Bind pbuffer to thexture- (wglBindTexImageARB)
drawQuad()
-Release the pbuffer from texture- (wglReleaseTexImageARB)
Does this sound right? I can post code if this sounds fine.
Thanks for any help
Using pbuffers troubles
This is my first time using a p buffer and am having some problems. My code is based off the ATI paper on pbuffers.
First of all, I know that each pbuffer has it's own states, so I need to do all my glEnable()'s after I make the pbuffer active. Does it use the same view/model/projection matrices that my normal frame buffer uses?
Here is basicly what I'm doing, with the end result of when I draw the quad with pbuffer bound as a texture, it's all white. Does this sound right? (the pbuffer is init'd already)
Render loop:
Sounds good to me but you may be missing a step or two. Make sure your setting up your projection matrix for the pbuffer. Also if you are using it to render to a texture make sure you call wglsharelists. For pbuffers you need to set it up just like you normally would an opengl window. I wrote a tutorial on them about 2-3 weeks ago and sent it to Jeff but he has been too busy to post it yet. It should be online soon though :)
- Cheers
Vic
- Cheers
Vic
wglShareLists, thats it! Thanks!
I have one last question: I wish to use GL_TEXTURE_RECTANGLE_ARB with the pbuffer as a texture. But I can't seem to find what attribue needs to be passed to wglCreatePbufferARB for that to happen, and for the life of me can't google up a spec on it.
[Edited by - skow on November 21, 2004 12:04:06 PM]
I have one last question: I wish to use GL_TEXTURE_RECTANGLE_ARB with the pbuffer as a texture. But I can't seem to find what attribue needs to be passed to wglCreatePbufferARB for that to happen, and for the life of me can't google up a spec on it.
[Edited by - skow on November 21, 2004 12:04:06 PM]
November 21, 2004 08:08 PM
Check out the p-buffer tutorial at Code Sampler ( http://www.codesampler.com/oglsrc.htm ) for some more info if you aren't finding anything on google. That's where I learned to do my p-buffers.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement