gluLookAt camera

Started by
3 comments, last by thedustbustr 20 years, 8 months ago
Am I correct in this description? When using a camera that provides three vectors (position, view, up) so that it is compatibe with the gluLookAt function, * ''position'' is the coordinates in 3d space (so its not a vector, its a coordinate using a vector structure for convienence) * ''view'' is a coordinate in 3d space which the camera is focused on (again, a coordinate; or, a vector relative to the camera position (not the origin)) * ''up'' is a coordinate directly above the camera (or, a vector relative to the camera position, not the origin) Is this correct? I''m not sure I''m using the function correctly.
Advertisement
Yes, yes and yes.

Is there anything weird going on with your scene or why are you asking? It''s usually pretty easy to tell when you''re doing things wrong with the camera, ''cause the movements will get unpredictable and weird.
How do I set my laser printer on stun?
Yes, but I think the problem is a massive memory memory leak (leaking like 25k per second).
@thedustbuster:

your memory leak seems to be evoked while your "cameraSet()" routine; by allocing a chunk of memory and not freeing it. yes it sounds like that, because allocating mem. each frame ?!??! think yourself. yes, the bug can be existent in another function, but your description sounds like that it was in the camera-set-function.

DJSnow
-----
this post is manually created and therefore legally valid without a signature
DJSnow---this post is manually created and therefore legally valid without a signature
Well, the memory leak is somewhere in my python scripting system (it doesn''t leak until I start executing scripts). It sucks because if I run the game for any length of time windows runs out of virtual memory and I have to reboot

I know approx where to look, but I can''t use cout for some reason (if I put a cout where I think the problem is (in the constructor of the class I think keeps getting new''ed)) ALL cout''s in my engine don''t output, only the python ''print'' statements work. Of course, this may also be a SDL bug (sdl takes stdout and dumps it to ./stdout.txt) or a MSVC bug (I have raw msvc6, no service packs (can''t download them on 56k way to big)).

Oh and also cout''s don''t work when I use a debug build.

I really screwed myself here but bezier curves are more fun than debugging so the leak can wait

This topic is closed to new replies.

Advertisement