mirror of
https://github.com/devZoGok/vb01.git
synced 2026-08-26 19:43:30 +00:00
mostly implemented skybox and fixed box verts
This commit is contained in:
@@ -49,11 +49,11 @@ namespace vb01{
|
||||
Camera *cam=root->getCamera();
|
||||
float fov=cam->getFov(),width=root->getWidth(),height=root->getHeight();
|
||||
float nearPlane=cam->getNearPlane(),farPlane=cam->getFarPlane();
|
||||
Vector3 pos=node->getPosition();
|
||||
Vector3 pos=(node?node->getPosition():Vector3::VEC_ZERO);
|
||||
Vector3 dir=cam->getDirection(),up=cam->getUp(),camPos=cam->getPosition();
|
||||
|
||||
mat4 model=translate(mat4(1.),vec3(pos.x,pos.y,pos.z));
|
||||
model=rotate(model,13.f,vec3(0,1,0));
|
||||
model=rotate(model,radians(0.f),vec3(0,1,0));
|
||||
mat4 view=lookAt(vec3(camPos.x,camPos.y,camPos.z),vec3(camPos.x+dir.x,camPos.y+dir.y,camPos.z+dir.z),vec3(up.x,up.y,up.z));
|
||||
mat4 proj=perspective(radians(fov),width/height,nearPlane,farPlane);
|
||||
//proj=ortho(0.f,800.f,0.f,-600.f,nearPlane,farPlane);
|
||||
|
||||
Reference in New Issue
Block a user