PDA

View Full Version : rendering somewhere into memory - not updating the window....



XFire
04-07-2002, 01:08 PM
Hi folks,

i tried to get an opengl rendered scene onto a direct draw surface. The only problem i have is that each rendered scene refreshes the window - which overdraws the directdraw drawn part of the scene.
Is there a way (if yes, how) to set up opengl to render somewhere in memory without updating the window?

Please give me some ideas.
Thank's in advance...

Omaha
04-07-2002, 02:09 PM
OpenGL+DirectDraw ~= Acid+Water in confined space

XFire
04-08-2002, 10:01 AM
Wow,
a forum full of gurus!
I started 4 threads, basicly all the same question - how to get the f u c k i n g scene onto a directdraw surface. But not one constructive idea!

Thank's for nothing!

WTF happened to the fine folks at SGI?

Deiussum
04-08-2002, 10:52 AM
Omaha is right, you REALLY don't wanna be trying to mix OpenGL and DirectDraw in the same device context. No amount of swearing on your part is going to change the fact that they don't work well together.

Some options:
1) Instead of using DirectDraw surfaces, use textured quads.
2) Instead of rendering your 3d stuff with OpenGL, use Direct3D.

zed
04-08-2002, 11:00 AM
check the faq (www.opengl.org right side of page)

nexusone
04-08-2002, 11:11 AM
It is not good to mix the opengl with directx. If you want to use direct x also render with it....

It like good and evil, they just done mix well....
http://www.opengl.org/discussion_boards/ubb/smile.gif


Originally posted by XFire:
Hi folks,

i tried to get an opengl rendered scene onto a direct draw surface. The only problem i have is that each rendered scene refreshes the window - which overdraws the directdraw drawn part of the scene.
Is there a way (if yes, how) to set up opengl to render somewhere in memory without updating the window?

Please give me some ideas.
Thank's in advance...



[This message has been edited by nexusone (edited 04-08-2002).]

V-man
04-08-2002, 03:39 PM
Originally posted by XFire:
Hi folks,

i tried to get an opengl rendered scene onto a direct draw surface. The only problem i have is that each rendered scene refreshes the window - which overdraws the directdraw drawn part of the scene.
Is there a way (if yes, how) to set up opengl to render somewhere in memory without updating the window?

Please give me some ideas.Thank's in advance...

Just render to the back buffer and then you can use glReadPixels to get the pixels back. That is if you have a back buffer.... what's DirectDraw for? I suggest you listen to the others.

This method is not ideal actually. There is render to bitmap method (never tried it but MSDN had a demo) and then there are p-buffers (a bit complicated)

V-man

Nothing
04-08-2002, 09:14 PM
Asking a <dirty>X question in an OpenGL forum is like walking to an Porsche dealer and want them to fix your Volvo...

http://www.opengl.org/discussion_boards/ubb/rolleyes.gif

And as the others already pointed out <dirty>Draw/3D and OpenGL dont like each other.

Morglum
04-09-2002, 12:45 AM
I suggest that you ask this question 2 or 3 more times, because we opengl boys aren't very clever and it takes us long to understand deep problems like yours.

wedge
04-09-2002, 07:54 PM
hmm you kann render to offsreenbuffer (pbuffer). Donn't if it help with you problem.