Archived

This topic is now archived and is closed to further replies.

thedustbustr

gluLookAt camera

Recommended Posts

thedustbustr    191
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.

Share this post


Link to post
Share on other sites
Wildfire    154
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.

Share this post


Link to post
Share on other sites
DJSnow    100
@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

Share this post


Link to post
Share on other sites
thedustbustr    191
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

Share this post


Link to post
Share on other sites