From 57c22f93ef6dd9234564232f39d01f829ca101ac Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Wed, 19 Dec 2012 21:57:40 +0100 Subject: [PATCH] [DEV] basic FPS view with so beautifull grass --- sources/ewol/game/Camera.cpp | 4 +- sources/ewol/game/Element.cpp | 5 +- sources/ewol/game/Gravity.cpp | 4 +- sources/ewol/renderer/openGL.cpp | 14 ++ sources/ewol/renderer/openGL.h | 10 ++ sources/ewol/renderer/os/eSystem.cpp | 4 +- sources/ewol/renderer/os/gui.X11.cpp | 4 +- sources/ewol/renderer/resources/Mesh.cpp | 11 +- sources/ewol/widget/Scene.cpp | 155 +++++++++++++++++++++-- sources/ewol/widget/Scene.h | 1 + test/human/appl/TestScene.cpp | 46 ++++++- test/human/appl/TestScene.h | 2 + test/human/appl/init.cpp | 2 +- test/human/data/grass.obj | 18 +++ test/human/data/grass.png | Bin 0 -> 532 bytes test/human/file.mk | 1 + 16 files changed, 244 insertions(+), 37 deletions(-) create mode 100644 test/human/data/grass.obj create mode 100644 test/human/data/grass.png diff --git a/sources/ewol/game/Camera.cpp b/sources/ewol/game/Camera.cpp index 9845f6bf..e999a746 100644 --- a/sources/ewol/game/Camera.cpp +++ b/sources/ewol/game/Camera.cpp @@ -14,8 +14,8 @@ void game::Camera::Update(void) { m_matrix.Identity(); - //m_matrix.Rotate(vec3(0,0,1), M_PI/2.0 ); - //m_matrix.Rotate(vec3(0,1,0), M_PI/2.0 ); + m_matrix.Rotate(vec3(0,0,1), M_PI/2.0 ); + m_matrix.Rotate(vec3(0,1,0), M_PI/2.0 ); m_matrix.Rotate(vec3(1,0,0), m_angles.x ); m_matrix.Rotate(vec3(0,1,0), m_angles.y ); m_matrix.Rotate(vec3(0,0,1), m_angles.z ); diff --git a/sources/ewol/game/Element.cpp b/sources/ewol/game/Element.cpp index 25cba03f..f2335dd7 100644 --- a/sources/ewol/game/Element.cpp +++ b/sources/ewol/game/Element.cpp @@ -16,6 +16,7 @@ static int32_t uniqueId = 0; game::Element::Element(etk::UString meshResource) : m_resource(NULL), + m_scale(1,1,1), m_mass(0.0f), m_uniqueId(uniqueId), m_groupId(0), @@ -29,9 +30,6 @@ game::Element::Element(etk::UString meshResource) : m_resource = tmpObject; } uniqueId++; - - //Scale(vec3(100,100,100) ); - //Translate(vec3(0.0,0.0,-10.0)); } game::Element::~Element(void) @@ -46,6 +44,7 @@ game::Element::~Element(void) void game::Element::Draw(void) { if (NULL != m_resource) { + //EWOL_DEBUG("draw " << m_uniqueId); m_resource->Draw(GetMatrix()); } } diff --git a/sources/ewol/game/Gravity.cpp b/sources/ewol/game/Gravity.cpp index 4f78f31c..cb940780 100644 --- a/sources/ewol/game/Gravity.cpp +++ b/sources/ewol/game/Gravity.cpp @@ -36,11 +36,11 @@ extern const float game::GravityConst = 0.0000000000667f; // Earth extern const float game::earthMass = 5973600000000000000000000.0f; // in kg extern const float game::earthRadius = 6378137.0f; // in meter -extern const game::Gravity game::gravityEarth(true, earthMass, vec3(0, -(float)((GravityConst*earthMass)/(earthRadius*earthRadius)), 0) ); +extern const game::Gravity game::gravityEarth(true, earthMass, vec3(0, 0, -(float)((GravityConst*earthMass)/(earthRadius*earthRadius))) ); // Mars extern const float game::marsMass = 25000000000000000.0f; // in kg extern const float game::marsRadius = 3396200.0f; // in meter -extern const game::Gravity game::gravityMars(true, marsMass, vec3(0, -(float)((GravityConst*marsMass)/(marsRadius*marsRadius)), 0) ); +extern const game::Gravity game::gravityMars(true, marsMass, vec3(0, 0, -(float)((GravityConst*marsMass)/(marsRadius*marsRadius))) ); diff --git a/sources/ewol/renderer/openGL.cpp b/sources/ewol/renderer/openGL.cpp index 8826915a..8f7f6499 100644 --- a/sources/ewol/renderer/openGL.cpp +++ b/sources/ewol/renderer/openGL.cpp @@ -11,6 +11,7 @@ #include etk::Vector l_matrixList; +mat4 l_matrixCamera; void ewol::openGL::Init(void) { @@ -18,12 +19,14 @@ void ewol::openGL::Init(void) l_matrixList.Clear(); mat4 tmpMat; l_matrixList.PushBack(tmpMat); + l_matrixCamera.Identity(); } void ewol::openGL::UnInit(void) { l_matrixList.Clear(); + l_matrixCamera.Identity(); } void ewol::openGL::SetBasicMatrix(mat4& newOne) @@ -64,9 +67,11 @@ void ewol::openGL::Pop(void) l_matrixList.Clear(); mat4 tmp; l_matrixList.PushBack(tmp); + l_matrixCamera.Identity(); return; } l_matrixList.PopBack(); + l_matrixCamera.Identity(); } mat4& ewol::openGL::GetMatrix(void) @@ -79,3 +84,12 @@ mat4& ewol::openGL::GetMatrix(void) return l_matrixList[l_matrixList.Size()-1]; } +mat4& ewol::openGL::GetCameraMatrix(void) +{ + return l_matrixCamera; +} + +void ewol::openGL::SetCameraMatrix(mat4& newOne) +{ + l_matrixCamera = newOne; +} diff --git a/sources/ewol/renderer/openGL.h b/sources/ewol/renderer/openGL.h index 6268cb33..7a9db15d 100644 --- a/sources/ewol/renderer/openGL.h +++ b/sources/ewol/renderer/openGL.h @@ -83,6 +83,16 @@ namespace ewol { * @return The requested matrix. */ mat4& GetMatrix(void); + /** + * @brief Get a reference on the current matrix camera destinate to opengl renderer. + * @return The requested matrix. + */ + mat4& GetCameraMatrix(void); + /** + * @brief Set a reference on the current camera to opengl renderer. + * @param[in] newOne The requested matrix. + */ + void SetCameraMatrix(mat4& newOne); }; }; diff --git a/sources/ewol/renderer/os/eSystem.cpp b/sources/ewol/renderer/os/eSystem.cpp index b02efba7..0abb7077 100644 --- a/sources/ewol/renderer/os/eSystem.cpp +++ b/sources/ewol/renderer/os/eSystem.cpp @@ -130,11 +130,11 @@ void ewolProcessEvents(void) break; case THREAD_KEYBORAD_KEY: case THREAD_KEYBORAD_MOVE: - EWOL_DEBUG("Receive MSG : THREAD_KEYBORAD_KEY"); + //EWOL_DEBUG("Receive MSG : THREAD_KEYBORAD_KEY"); { ewol::SpecialKey& specialCurrentKey = ewol::GetCurrentSpecialKeyStatus(); specialCurrentKey = data.keyboardSpecial; - EWOL_DEBUG("newStatus Key" << specialCurrentKey); + //EWOL_DEBUG("newStatus Key" << specialCurrentKey); } if (NULL != windowsCurrent) { if (false==windowsCurrent->OnEventShortCut(data.keyboardSpecial, diff --git a/sources/ewol/renderer/os/gui.X11.cpp b/sources/ewol/renderer/os/gui.X11.cpp index 6d738450..f34af505 100644 --- a/sources/ewol/renderer/os/gui.X11.cpp +++ b/sources/ewol/renderer/os/gui.X11.cpp @@ -764,7 +764,9 @@ void X11_Run(void) EWOL_INFO("X11 event : " << event.type << " = \"KeyPress/KeyRelease\" "); #endif { - EWOL_DEBUG("eventKey : " << event.xkey.keycode << " state : " << event.xkey.state); + #ifdef DEBUG_X11_EVENT + EWOL_DEBUG("eventKey : " << event.xkey.keycode << " state : " << event.xkey.state); + #endif if (event.xkey.state & (1<<0) ) { //EWOL_DEBUG(" Special Key : SHIFT"); guiKeyBoardMode.shift = true; diff --git a/sources/ewol/renderer/resources/Mesh.cpp b/sources/ewol/renderer/resources/Mesh.cpp index 8a9a52f1..395efd7b 100644 --- a/sources/ewol/renderer/resources/Mesh.cpp +++ b/sources/ewol/renderer/resources/Mesh.cpp @@ -39,12 +39,6 @@ ewol::Mesh::~Mesh(void) void ewol::Mesh::Draw(mat4& positionMatrix) { - static float rotx = 0; - static float roty = 0; - static float rotz = 0; - rotx += 0.01; - roty += 0.02; - rotz += 0.005; if (m_object.m_vertices.Size()<=0) { return; } @@ -60,8 +54,9 @@ void ewol::Mesh::Draw(mat4& positionMatrix) //EWOL_DEBUG(" Display " << m_coord.Size() << " elements" ); m_GLprogram->Use(); // set Matrix : translation/positionMatrix - mat4 tmpMatrix = ewol::openGL::GetMatrix(); - tmpMatrix = tmpMatrix * positionMatrix; + mat4 projMatrix = ewol::openGL::GetMatrix(); + mat4 camMatrix = ewol::openGL::GetCameraMatrix(); + mat4 tmpMatrix = projMatrix * camMatrix * positionMatrix; m_GLprogram->UniformMatrix4fv(m_GLMatrix, 1, tmpMatrix.m_mat); // TextureID m_GLprogram->SetTexture0(m_GLtexID, m_texture1->GetId()); diff --git a/sources/ewol/widget/Scene.cpp b/sources/ewol/widget/Scene.cpp index b4a2a161..26860e55 100644 --- a/sources/ewol/widget/Scene.cpp +++ b/sources/ewol/widget/Scene.cpp @@ -14,10 +14,18 @@ #undef __class__ #define __class__ "Scene" +#define WALK_FLAG_FORWARD (1<<0) +#define WALK_FLAG_BACK (1<<1) +#define WALK_FLAG_LEFT (1<<2) +#define WALK_FLAG_RIGHT (1<<3) +#define WALK_FLAG_CAUTION (1<<4) + + widget::Scene::Scene(game::Engine* gameEngine) : m_gameEngine(gameEngine), m_isRunning(true), m_lastCallTime(-1), + m_walk(0), modeMoving(0) { SetCanHaveFocus(true); @@ -70,9 +78,46 @@ void widget::Scene::OnDraw(ewol::DrawProperty& displayProp) } } +#define WALK_FLAG_FORWARD (1<<0) +#define WALK_FLAG_BACK (1<<1) +#define WALK_FLAG_LEFT (1<<2) +#define WALK_FLAG_RIGHT (1<<3) +#define WALK_FLAG_CAUTION (1<<4) void widget::Scene::PeriodicCall(int64_t localTime) { + if (m_walk!=0) { + if ( (m_walk&(WALK_FLAG_FORWARD|WALK_FLAG_BACK))!=0) { + // request back and forward in the same time ... this is really bad .... + } else if ( (m_walk&WALK_FLAG_FORWARD)!=0) { + vec3 angles = m_camera.GetAngle(); + angles.x = cosf(angles.z); + angles.y = sinf(angles.z); + angles.z = 0; + vec3 pos = m_camera.GetPosition(); + pos += angles; + EWOL_DEBUG("walk = " << angles); + m_camera.SetPosition(pos); + } else if ( (m_walk&WALK_FLAG_BACK)!=0) { + vec3 angles = m_camera.GetAngle(); + angles.x = cosf(angles.z); + angles.y = sinf(angles.z); + angles.z = 0; + vec3 pos = m_camera.GetPosition(); + pos -= angles; + EWOL_DEBUG("walk = " << angles*-1); + m_camera.SetPosition(pos); + } + + if ( (m_walk&(WALK_FLAG_LEFT|WALK_FLAG_RIGHT))!=0) { + // request left and right in the same time ... this is really bad .... + } else if ( (m_walk&WALK_FLAG_LEFT)!=0) { + + } else if ( (m_walk&WALK_FLAG_RIGHT)!=0) { + + } + } + double curentTime=(double)localTime/1000000.0; // small hack to change speed ... if (m_ratioTime != 1) { @@ -113,11 +158,12 @@ void widget::Scene::GenDraw(ewol::DrawProperty displayProp) m_size.y); float ratio = m_size.x / m_size.y; //EWOL_INFO("ratio : " << ratio); - mat4 tmpProjection = etk::matPerspective( M_PI/2.0, ratio, -1, 1); - - mat4 tmpMat = tmpProjection * m_camera.GetMatrix(); + mat4 tmpProjection = etk::matPerspective( M_PI/2.0, ratio, 1, 4000); + ewol::openGL::SetCameraMatrix(m_camera.GetMatrix()); + //mat4 tmpMat = tmpProjection * m_camera.GetMatrix(); // set internal matrix system : - ewol::openGL::SetMatrix(tmpMat); + //ewol::openGL::SetMatrix(tmpMat); + ewol::openGL::SetMatrix(tmpProjection); // Call the widget drawing methode displayProp.m_origin = m_origin; @@ -164,7 +210,7 @@ bool widget::Scene::OnEventInput(ewol::keyEvent::type_te type, int32_t IdInput, { vec2 relativePos = RelativePosition(pos); //EWOL_DEBUG("type : " << type << " IdInput=" << IdInput << " " << "status=" << statusEvent << " RelPos=" << relativePos); - + KeepFocus(); if (type == ewol::keyEvent::typeMouse) { if (4 == IdInput && ewol::keyEvent::statusUp == statusEvent) { vec3 oldPos = m_camera.GetPosition(); @@ -183,8 +229,8 @@ bool widget::Scene::OnEventInput(ewol::keyEvent::type_te type, int32_t IdInput, } else if (modeMoving==1 && ewol::keyEvent::statusMove == statusEvent) { vec2 offset = relativePos - oldCursorPos; vec3 oldPos = m_camera.GetPosition(); - oldPos.x -= offset.x/50.0; - oldPos.y -= offset.y/50.0; + oldPos.x += offset.x/50.0; + oldPos.y += offset.y/50.0; m_camera.SetPosition(oldPos); oldCursorPos = relativePos; } @@ -198,8 +244,8 @@ bool widget::Scene::OnEventInput(ewol::keyEvent::type_te type, int32_t IdInput, vec2 offset = relativePos - oldCursorPos; offset *= M_PI/(360.0f*6); vec3 oldAngles = m_camera.GetAngle(); - oldAngles.x -= offset.y; - oldAngles.y += offset.x; + oldAngles.z -= offset.x; + oldAngles.y += offset.y; m_camera.SetAngle(oldAngles); oldCursorPos = relativePos; } @@ -221,18 +267,99 @@ bool widget::Scene::OnEventKb(ewol::keyEvent::status_te statusEvent, uniChar_t u } */ + if( unicodeData == 'z' + || unicodeData == 'Z') { + if (statusEvent == ewol::keyEvent::statusDown) { + m_walk |= WALK_FLAG_FORWARD; + } + if (statusEvent == ewol::keyEvent::statusUp) { + if ((m_walk&WALK_FLAG_FORWARD) != 0) { + m_walk -= WALK_FLAG_FORWARD; + } + } + } + if( unicodeData == 's' + || unicodeData == 'S') { + if (statusEvent == ewol::keyEvent::statusDown) { + m_walk |= WALK_FLAG_BACK; + } + if (statusEvent == ewol::keyEvent::statusUp) { + if ((m_walk&WALK_FLAG_BACK) != 0) { + m_walk -= WALK_FLAG_BACK; + } + } + } + if( unicodeData == 'q' + || unicodeData == 'Q') { + if (statusEvent == ewol::keyEvent::statusDown) { + m_walk |= WALK_FLAG_LEFT; + } + if (statusEvent == ewol::keyEvent::statusUp) { + if ((m_walk&WALK_FLAG_LEFT) != 0) { + m_walk -= WALK_FLAG_LEFT; + } + } + } + if( unicodeData == 'd' + || unicodeData == 'D') { + if (statusEvent == ewol::keyEvent::statusDown) { + m_walk |= WALK_FLAG_RIGHT; + } + if (statusEvent == ewol::keyEvent::statusUp) { + if ((m_walk&WALK_FLAG_RIGHT) != 0) { + m_walk -= WALK_FLAG_RIGHT; + } + } + } + EWOL_DEBUG("m_walk=" << m_walk); return false; } bool widget::Scene::OnEventKbMove(ewol::keyEvent::status_te statusEvent, ewol::keyEvent::keyboard_te specialKey) { - /* - if (statusEvent == ewol::ewol::keyEvent::statusDown) { - MarkToRedraw(); + if (specialKey == ewol::keyEvent::keyboardUp) { + EWOL_DEBUG("test ..." << specialKey << " " << statusEvent); + if (statusEvent == ewol::keyEvent::statusDown) { + m_walk |= WALK_FLAG_FORWARD; + } + if (statusEvent == ewol::keyEvent::statusUp) { + if ((m_walk&WALK_FLAG_FORWARD) != 0) { + m_walk -= WALK_FLAG_FORWARD; + } + } } - return true; - */ + if (specialKey == ewol::keyEvent::keyboardDown) { + if (statusEvent == ewol::keyEvent::statusDown) { + m_walk |= WALK_FLAG_BACK; + } + if (statusEvent == ewol::keyEvent::statusUp) { + if ((m_walk&WALK_FLAG_BACK) != 0) { + m_walk -= WALK_FLAG_BACK; + } + } + } + if (specialKey == ewol::keyEvent::keyboardLeft) { + if (statusEvent == ewol::keyEvent::statusDown) { + m_walk |= WALK_FLAG_LEFT; + } + if (statusEvent == ewol::keyEvent::statusUp) { + if ((m_walk&WALK_FLAG_LEFT) != 0) { + m_walk -= WALK_FLAG_LEFT; + } + } + } + if (specialKey == ewol::keyEvent::keyboardRight) { + if (statusEvent == ewol::keyEvent::statusDown) { + m_walk |= WALK_FLAG_RIGHT; + } + if (statusEvent == ewol::keyEvent::statusUp) { + if ((m_walk&WALK_FLAG_RIGHT) != 0) { + m_walk -= WALK_FLAG_RIGHT; + } + } + } + EWOL_DEBUG("m_walk=" << m_walk); return false; } diff --git a/sources/ewol/widget/Scene.h b/sources/ewol/widget/Scene.h index cdcf0022..d8a24c7c 100644 --- a/sources/ewol/widget/Scene.h +++ b/sources/ewol/widget/Scene.h @@ -28,6 +28,7 @@ namespace widget { bool m_isRunning; //!< the display is running (not in pause) double m_lastCallTime; //!< previous call Time float m_ratioTime; //!< Ratio time for the speed of the game ... + uint32_t m_walk; //!< Wolk properties public: /** * @brief Main scene constructor diff --git a/test/human/appl/TestScene.cpp b/test/human/appl/TestScene.cpp index 9ef4bdc3..5db4814f 100644 --- a/test/human/appl/TestScene.cpp +++ b/test/human/appl/TestScene.cpp @@ -32,12 +32,13 @@ static const char * l_eventAddSphere = "event-add-sphere"; static const char * l_eventRotationX = "event-rotation-X"; static const char * l_eventRotationY = "event-rotation-Y"; static const char * l_eventRotationZ = "event-rotation-Z"; +static const char * l_eventRotation0 = "event-rotation-0"; static const char * l_eventLunch = "event-lunch"; static const char * l_eventChangeTimeSpeed2 = "event-speed2"; static const char * l_eventChangeTimeSpeed0 = "event-speed0.5"; static const char * l_eventChangeTimeSpeed1 = "event-speed1"; - - +static const char * l_eventUp = "event-up"; +static const char * l_eventDown = "event-down"; #undef __class__ @@ -45,6 +46,9 @@ static const char * l_eventChangeTimeSpeed1 = "event-speed1"; TestScene::TestScene(void) { + m_ground = new game::Element("DATA:grass.obj"); + m_gameEngine.AddElement(m_ground, true); + APPL_CRITICAL("Create "__class__" (start)"); widget::SizerVert* mySizerVert2 = NULL; widget::SizerHori* mySizerHori = NULL; @@ -81,6 +85,27 @@ TestScene::TestScene(void) myButton->RegisterOnEvent(this, ewolEventButtonPressed, l_eventRotationZ); mySizerHori->SubWidgetAdd(myButton); } + myButton = new widget::Button("Rotation -"); + if (NULL != myButton) { + myButton->RegisterOnEvent(this, ewolEventButtonPressed, l_eventRotation0); + mySizerHori->SubWidgetAdd(myButton); + } + myButton = new widget::Button("UP"); + if (NULL != myButton) { + myButton->RegisterOnEvent(this, ewolEventButtonPressed, l_eventUp); + mySizerHori->SubWidgetAdd(myButton); + } + myButton = new widget::Button("DOWN"); + if (NULL != myButton) { + myButton->RegisterOnEvent(this, ewolEventButtonPressed, l_eventDown); + mySizerHori->SubWidgetAdd(myButton); + } + mySizerHori = new widget::SizerHori(); + if (NULL == mySizerHori) { + APPL_DEBUG("Allocation error mySizerHori"); + return; + } + SubWidgetAdd(mySizerHori); myButton = new widget::Button("lunch object"); if (NULL != myButton) { myButton->RegisterOnEvent(this, ewolEventButtonPressed, l_eventLunch); @@ -179,6 +204,7 @@ TestScene::~TestScene(void) #include vec3 baseRotationVect; +vec3 baseMove; class stupidCube : public game::Element { public: @@ -194,6 +220,10 @@ class stupidCube : public game::Element if (baseRotationVect != vec3(0,0,0) ) { Rotate(baseRotationVect, 0.01); } + if (baseMove != vec3(0,0,0) ) { + Translate(baseMove); + baseMove = vec3(0,0,0); + } } return false; } @@ -219,7 +249,9 @@ void TestScene::OnReceiveMessage(ewol::EObject * CallerObject, const char * even stupidCube * tmpp = new stupidCube(); static bool firstTime = true; if (firstTime==false) { - tmpp->Translate(vec3(etk::tool::frand(-1,1),etk::tool::frand(-1,1),etk::tool::frand(-1,1))); + vec3 newPos = vec3(etk::tool::frand(-20,20),etk::tool::frand(-20,20),etk::tool::frand(1,8)); + APPL_DEBUG("add a box at the pos : " << newPos); + tmpp->Translate(newPos); } firstTime = false; m_gameEngine.AddElement(tmpp, true); @@ -227,15 +259,21 @@ void TestScene::OnReceiveMessage(ewol::EObject * CallerObject, const char * even if (NULL!=m_testWidget) { } + } else if (eventId == l_eventUp) { + baseMove = vec3(0.1,0,0); + } else if (eventId == l_eventDown) { + baseMove = vec3(-0.1,0,0); } else if (eventId == l_eventRotationX) { baseRotationVect = vec3(1,0,0); } else if (eventId == l_eventRotationY) { baseRotationVect = vec3(0,1,0); } else if (eventId == l_eventRotationZ) { baseRotationVect = vec3(0,0,1); + } else if (eventId == l_eventRotation0) { + baseRotationVect = vec3(0,0,0); } else if (eventId == l_eventLunch) { stupidCube * tmpp = new stupidCube(250); - tmpp->SetSpeed(vec3(10,50,0)); + tmpp->SetSpeed(vec3(10,10,50)); m_gameEngine.AddElement(tmpp, true); } else if (eventId == l_eventChangeTimeSpeed1) { if (NULL!=m_testWidget) { diff --git a/test/human/appl/TestScene.h b/test/human/appl/TestScene.h index 12b65af4..9573488b 100644 --- a/test/human/appl/TestScene.h +++ b/test/human/appl/TestScene.h @@ -18,6 +18,8 @@ class TestScene : public widget::SizerVert { private: + game::Element* m_ground; + //game::Element m_sky; game::Engine m_gameEngine; widget::Scene* m_testWidget; public: diff --git a/test/human/appl/init.cpp b/test/human/appl/init.cpp index 5771fd36..aed32185 100644 --- a/test/human/appl/init.cpp +++ b/test/human/appl/init.cpp @@ -52,7 +52,7 @@ void APP_Init(void) #endif #endif etk::InitDefaultFolder(PROJECT_NAME); - ewol::ChangeSize(ivec2(800, 600)); + ewol::ChangeSize(ivec2(800, 300)); #ifdef __TARGET_OS__Android ewol::config::FontSetDefault("FreeSerif", 19); #else diff --git a/test/human/data/grass.obj b/test/human/data/grass.obj new file mode 100644 index 00000000..0da13794 --- /dev/null +++ b/test/human/data/grass.obj @@ -0,0 +1,18 @@ +# done myself +v 100.0 -100.0 0.0 +v 100.0 100.0 0.0 +v -100.0 100.0 0.0 +v -100.0 -100.0 0.0 + +vt 0.0 0.0 +vt 100.0 0.0 +vt 100.0 100.0 +vt 0.0 100.0 + +vn 0.000000 0.000000 1.000000 + +usemtl grass.png + +f 1/1/1 2/2/1 3/3/1 +f 1/1/1 3/3/1 4/4/1 + diff --git a/test/human/data/grass.png b/test/human/data/grass.png new file mode 100644 index 0000000000000000000000000000000000000000..fd7ddbea5f28353b6327aa4d1ab4c29013257e0a GIT binary patch literal 532 zcmV+v0_**WP)DN6000EUBHzz59HgCL2=o@q%` zWzmkkNG%H_!TQ+q_h(6f5QE#ex%tE80RcS0x5@9|2k&r67(!|~sR9KsF#bpI2osZS zZJRN_-oLb@L(d8PD&;`gQ(i0#@U3kGdew0|=-3H2H?Ph1ux{MUFwD%t;^;@b*j$-! zc=N-U1;kcM9eL5ZZobm({4WW=dN><)FIt8*TcEC7I(*(G%O*iUo}v*@B5JLttOlok zZ!KG!z=haDyMU0CW!MrjOMo zs}1I9E2yYFG!hDUNft?oqOpp+IgjZt^PDHnzw1NI%rjjt-VDE3r{p!4`K>U)cLyAS zm`n{ZNhL;=o;sHWq7S{yF+Y