There are several misunderstandings in front of the problem:
I am shifting from directX to Opengl and wondered why the
fourth row of the view matrix of opengl is negated?
The view matrix defines the space transformation from global space to camera/view space. OpenGL uses by convention column vectors with the homogenous co-ordinate at last, and hence the 4th row of its view matrix always is [ 0 0 0 1 ] (in a matrix the term "row" means a horizontal span). You probably mean something different.
by fourth row i meant the look vector ...
The "look vector" is a direction vector. Because of OpenGL's convention to place the homogeneous co-ordinate at the 4-th position, the 3 possible direction vectors are at the 1st, 2nd, and 3rd columns (not row, see below). The 4-th column contains the eye position. Usually the 3rd column ("z axis") is named the look vector.
... since in opengl it is arranged in column major order.
The "column major order" describes a way to arrange the 2D structure of a matrix in linear memory. This has no relation to mathematics but is an implementation detail. What you probably mean is that OpenGL uses "column vectors". The latter aspect means that a matrix vector product reads M*v opposed to the order v*M you are familiar with from D3D (the both v's and M's are not exactly the same here but written as such for simplicity).
Whether your camera looks along the negative (RHS) or positive (LHS) z axis can be regulated by mirroring using a scaling matrix set-up as S(1,1,-1). This scaling is to be done behind the view transformation but before the projection, hence
P * S * V
so it can be integrated with the projection matrix or else with the view matrix, if wanted, because of:
P * S * V = ( P * S ) * V = P * ( S * V )
So you need to look at several things: What does OpenGL expect? Which handedness (LHS or RHS) does the camera system use? Where, if used at all, does the math library considering the handedness swapping? Only all this together gives you the real picture.
Edited by haegarr, 06 November 2013 - 05:39 AM.