run example/Vulkan/Geometry3D OK!
This commit is contained in:
parent
91460aba5a
commit
6b6866db97
2
CMCore
2
CMCore
@ -1 +1 @@
|
||||
Subproject commit 34b70f1b42c97602253a74d1769e60d340729682
|
||||
Subproject commit 089d4992016b39cefc399723ea162bd4de7bd310
|
@ -1 +1 @@
|
||||
Subproject commit a7c3577cba0ec9cff2181cd506c1c33bc0423f4a
|
||||
Subproject commit 8fd61af485ae69e4a8d445992002d0a5ec6dd61e
|
@ -346,8 +346,8 @@ public:
|
||||
lights.color = Vector3f(15.0f);
|
||||
lights.radius = 150.0f;
|
||||
|
||||
lights.position.x = sin(hgl_rad2ang(timer/100)) * 100.0f;
|
||||
lights.position.y = cos(hgl_rad2ang(timer/100)) * 100.0f;
|
||||
lights.position.x = sin(hgl_rad2deg(timer/100)) * 100.0f;
|
||||
lights.position.y = cos(hgl_rad2deg(timer/100)) * 100.0f;
|
||||
|
||||
ubo_lights->Write(&lights);
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ private:
|
||||
|
||||
bool InitScene()
|
||||
{
|
||||
Add(ro_plane_grid[0],Matrix4f());
|
||||
Add(ro_plane_grid[0],Matrix4f(1.0f));
|
||||
Add(ro_plane_grid[1],rotate(HGL_RAD_90,0,1,0));
|
||||
Add(ro_plane_grid[2],rotate(HGL_RAD_90,1,0,0));
|
||||
|
||||
|
2
res
2
res
@ -1 +1 @@
|
||||
Subproject commit 8dbe22e45adc11317f5d38be04b359655f4dffac
|
||||
Subproject commit 3a693b3ec35b61a7830f6a20b3d7f25e60f91843
|
@ -74,8 +74,8 @@ namespace hgl
|
||||
{
|
||||
float ang=float(i)/float(rci->round_per-1)*90.0f;
|
||||
|
||||
float x=sin(hgl_ang2rad(ang))*radius;
|
||||
float y=cos(hgl_ang2rad(ang))*radius;
|
||||
float x=sin(hgl_deg2rad(ang))*radius;
|
||||
float y=cos(hgl_deg2rad(ang))*radius;
|
||||
|
||||
coord[i].x=x;
|
||||
coord[i].y=y;
|
||||
@ -148,8 +148,8 @@ namespace hgl
|
||||
{
|
||||
float ang=float(i)/float(cci->field_count)*360.0f;
|
||||
|
||||
float x=cci->center.x+sin(hgl_ang2rad(ang))*cci->radius.x;
|
||||
float y=cci->center.y+cos(hgl_ang2rad(ang))*cci->radius.y;
|
||||
float x=cci->center.x+sin(hgl_deg2rad(ang))*cci->radius.x;
|
||||
float y=cci->center.y+cos(hgl_deg2rad(ang))*cci->radius.y;
|
||||
|
||||
vertex->Write(x,y);
|
||||
|
||||
@ -357,7 +357,7 @@ namespace hgl
|
||||
|
||||
void glusQuaternionRotateRyf(float quaternion[4], const float angle)
|
||||
{
|
||||
float halfAngleRadian = hgl_ang2rad(angle) * 0.5f;
|
||||
float halfAngleRadian = hgl_deg2rad(angle) * 0.5f;
|
||||
|
||||
quaternion[0] = 0.0f;
|
||||
quaternion[1] = sin(halfAngleRadian);
|
||||
@ -367,7 +367,7 @@ namespace hgl
|
||||
|
||||
void glusQuaternionRotateRzf(float quaternion[4], const float angle)
|
||||
{
|
||||
float halfAngleRadian = hgl_ang2rad(angle) * 0.5f;
|
||||
float halfAngleRadian = hgl_deg2rad(angle) * 0.5f;
|
||||
|
||||
quaternion[0] = 0.0f;
|
||||
quaternion[1] = 0.0f;
|
||||
|
@ -5,18 +5,18 @@ namespace hgl
|
||||
{
|
||||
SceneOrient::SceneOrient()
|
||||
{
|
||||
//LocalMatrix =Matrix4f::identity;
|
||||
//LocalToWorldMatrix =Matrix4f::identity;
|
||||
//InverseLocalMatrix =Matrix4f::identity;
|
||||
//InverseLocalToWorldMatrix =Matrix4f::identity;
|
||||
LocalMatrix =Matrix4f(1.0f);
|
||||
LocalToWorldMatrix =Matrix4f(1.0f);
|
||||
InverseLocalMatrix =Matrix4f(1.0f);
|
||||
InverseLocalToWorldMatrix =Matrix4f(1.0f);
|
||||
}
|
||||
|
||||
SceneOrient::SceneOrient(const Matrix4f &mat)
|
||||
{
|
||||
SetLocalMatrix(mat);
|
||||
|
||||
//LocalToWorldMatrix =Matrix4f::identity;
|
||||
//InverseLocalToWorldMatrix =Matrix4f::identity;
|
||||
LocalToWorldMatrix =Matrix4f(1.0f);
|
||||
InverseLocalToWorldMatrix =Matrix4f(1.0f);
|
||||
}
|
||||
|
||||
Matrix4f &SceneOrient::SetLocalMatrix(const Matrix4f &m)
|
||||
|
Loading…
x
Reference in New Issue
Block a user