PDA

View Full Version : several questions, maybe you could answer some



Starnut coder
02-20-2001, 04:20 AM
question1.)
does anybody know a classlibrary for displaying videos, for example using directshow?

question2.)
how do i boost performance in this.
I made a big world with many polygons,
and i keep redrawing it in the Display
function. I use glTranslatef and glRotatef
to move the camera. Isnt there a way to move about without redrawing all the time.

question3.)
Is there a way to use directdraw and Opengl in one Application? Not at the same time, but
initialize one use it, then the other.
How would i have to make the window, or
must i maybe make two windows?

question4.)
i use glTranslatef and glRotatef to move the camera. How do i make a shot fly directly
away from the camera. I tryed using
vectors and then normalizing, but for some
reason it doesnt work.

mango
02-20-2001, 07:13 PM
Let me try:

1. You have among other Apples quicktime but what is wrong with DirectShow?
2. No, if you are moving must the screen of course be updated.
3. No, both DirectDraw and OpenGL is using the same hardware so this can be difficult. See the FAQ: http://www.frii.com/~martz/oglfaq/mswindows.htm#mswi0060
4. Move it in the same direction you move the camera but at a higher speed.

john
02-20-2001, 08:36 PM
ho. these answers are more on a slightly different interpretation of the question:

2) I agree, but perhaps the original poster is alluding to scene graphs (so you don't have to redraw the WHOLE scene, everytime. Perhaps.) Difficult question to answer. Look up scene graph stuff.

4) er, I'm guessing the orig poster is trying to work out the *trajectory* from all the camera movememtns with rotation/translate yada yada. The soln: grab the modelview matrix after you've set up your camera look at transform, and multiply it by the unit vector along the negative z-axis. This will give you the normal to the image plane.

cheers
John

Starnut coder
02-20-2001, 09:20 PM
1.)Directshow is fine i just cant figure out how to use it, you know a class library or tutorial?
The alternative id think is good is something like bink or smacker which is free.
You know anything.

2.)Im totally stuck on this because many games use opengl and they m,anage to get alot of polygons running, there must be a way to redisplay on;ly animated items.
Maybe theres a way to move only camera(not glTranslatef glRotatef)?

3.)Ill check into the website maybe it helps.

4.)getting the modelview matrix is a good idea thanks.

-Thanks you guys

GLvoid
02-21-2001, 03:52 AM
2) You might wanna try this (http://www.eecs.tulane.edu/www/graphics/doc/OpenGL-Man-Pages/gluLookAt.html) . You'll have to redraw, though.

jade6
02-21-2001, 10:03 AM
You probably knew this already, but games cheat; they use textures and bitmap sequences (see "mipmaps" and "sprites") to draw most of the stuff, and actually calculate only simple shapes like squares and very few triangles. That's how they get that speed... or am I being an idiot here?