updated to GLM...but only ortho matrix is OK.
This commit is contained in:
@@ -71,16 +71,16 @@ private:
|
||||
{
|
||||
struct PlaneGridCreateInfo pgci;
|
||||
|
||||
pgci.coord[0].Set(-100,-100,0);
|
||||
pgci.coord[1].Set( 100,-100,0);
|
||||
pgci.coord[2].Set( 100, 100,0);
|
||||
pgci.coord[3].Set(-100, 100,0);
|
||||
pgci.coord[0]=Vector3f(-100,-100,0);
|
||||
pgci.coord[1]=Vector3f( 100,-100,0);
|
||||
pgci.coord[2]=Vector3f( 100, 100,0);
|
||||
pgci.coord[3]=Vector3f(-100, 100,0);
|
||||
|
||||
pgci.step.u=20;
|
||||
pgci.step.v=20;
|
||||
pgci.step.x=20;
|
||||
pgci.step.y=20;
|
||||
|
||||
pgci.side_step.u=10;
|
||||
pgci.side_step.v=10;
|
||||
pgci.side_step.x=10;
|
||||
pgci.side_step.y=10;
|
||||
|
||||
pgci.color.Set(0.5,0,0,1);
|
||||
pgci.side_color.Set(1,0,0,1);
|
||||
@@ -96,12 +96,12 @@ private:
|
||||
pgci.side_color.Set(0,0,1,1);
|
||||
ro_plane_grid[2]=CreateRenderablePlaneGrid(db,material,&pgci);
|
||||
|
||||
camera->pos.Set(200,200,200,1.0);
|
||||
camera->pos=Vector4f(200,200,200,1.0);
|
||||
}
|
||||
|
||||
bool InitScene()
|
||||
{
|
||||
Add(ro_plane_grid[0],Matrix4f::identity);
|
||||
Add(ro_plane_grid[0],Matrix4f());
|
||||
Add(ro_plane_grid[1],rotate(HGL_RAD_90,0,1,0));
|
||||
Add(ro_plane_grid[2],rotate(HGL_RAD_90,1,0,0));
|
||||
|
||||
|
@@ -71,12 +71,12 @@ private:
|
||||
|
||||
bool InitMaterial()
|
||||
{
|
||||
light.color.Set(1,1,1,1);
|
||||
light.position.Set(1000,1000,1000,1.0);
|
||||
light.color=Vector4f(1,1,1,1);
|
||||
light.position=Vector4f(1000,1000,1000,1.0);
|
||||
|
||||
phong.BaseColor.Set(1,1,1,1);
|
||||
phong.BaseColor=Vector4f(1,1,1,1);
|
||||
phong.ambient=0.5;
|
||||
phong.specular.Set(0.3,0.3,0.3,32);
|
||||
phong.specular=Vector4f(0.3,0.3,0.3,32);
|
||||
|
||||
{
|
||||
axis_material=db->CreateMaterial(OS_TEXT("res/material/VertexColor3D"));
|
||||
@@ -162,7 +162,7 @@ private:
|
||||
{
|
||||
struct CubeCreateInfo cci;
|
||||
cci.has_color=true;
|
||||
cci.color.Set(1,1,1,1);
|
||||
cci.color=Vector4f(1,1,1,1);
|
||||
ro_cube=CreateRenderableCube(db,material,&cci);
|
||||
}
|
||||
|
||||
|
@@ -42,7 +42,7 @@ protected:
|
||||
|
||||
void OnMousePressed (int,int,uint mk){mouse_key=mk;MousePressed(mk);}
|
||||
void OnMouseReleased(int,int,uint mk){mouse_key=0;MouseReleased(mk);}
|
||||
void OnMouseMove (int x,int y){mouse_pos.Set(x,y);MouseMove();}
|
||||
void OnMouseMove (int x,int y){mouse_pos.x=x;mouse_pos.y=y;MouseMove();}
|
||||
void OnMouseWheel (int v,int h,uint mk){MouseWheel(v,h,mk);}
|
||||
|
||||
protected:
|
||||
|
Reference in New Issue
Block a user