Forum Moderator Gurgarath 2518 Posted February 11, 2020 Forum Moderator Share Posted February 11, 2020 (edited) 2 hours ago, ItamisCZ said: Hi, have anyone DX9 fix? When i try to compile source, visual studio give an error identifier "LPDIRECT3DTEXTURE8" is undefined. LPDIRECT3DTEXTURE8 > LPDIRECT3DTEXTURE9 Edited August 26, 2022 by Metin2 Dev Core X - External 2 Internal Gurgarath coming soon Link to comment Share on other sites More sharing options...
evils666 0 Posted February 11, 2020 Share Posted February 11, 2020 8 hours ago, ItamisCZ said: Hi, have anyone DX9 fix? When i try to compile source, visual studio give an error identifier "LPDIRECT3DTEXTURE8" is undefined. I would also like a version for DX9 Link to comment Share on other sites More sharing options...
ItamisCZ 8 Posted February 11, 2020 Share Posted February 11, 2020 (edited) 6 hours ago, Gurgarath said: LPDIRECT3DTEXTURE8 > LPDIRECT3DTEXTURE9 I've already tried this, before i wrote comment. It gives another errors. Spoiler Error C2660 'IDirect3DDevice9::GetRenderTarget' : function does not take 1 arguments eterlib C:\Projects\Bin (Source)\client\EterLib\GrpRenderTargetTexture.cpp 83 Error (active) E0165 too few arguments in function call eterlib C:\Projects\Bin (Source)\client\EterLib\GrpRenderTargetTexture.cpp 64 Error (active) E0165 too few arguments in function call eterlib C:\Projects\Bin (Source)\client\EterLib\GrpRenderTargetTexture.cpp 78 Error (active) E0165 too few arguments in function call eterlib C:\Projects\Bin (Source)\client\EterLib\GrpRenderTargetTexture.cpp 83 Error (active) E0167 Argument of type "LPDIRECT3DSURFACE9" is incompatible with parameter of type "DWORD". eterlib C:\Projects\Bin (Source)\client\EterLib\GrpRenderTargetTexture.cpp 85 Error (active) E0167 Argument of type "LPDIRECT3DSURFACE9" is incompatible with parameter of type "DWORD". eterlib C:\Projects\Bin (Source)\client\EterLib\GrpRenderTargetTexture.cpp 90 Error (active) E0167 Argument of type "LPDIRECT3DSURFACE9 *" is incompatible with parameter of type "DWORD". eterlib C:\Projects\EBin (Source)\client\EterLib\GrpRenderTargetTexture.cpp 78 Error (active) E0167 Argument of type "LPDIRECT3DSURFACE9 *" is incompatible with parameter of type "DWORD". eterlib C:\Projects\Bin (Source)\client\EterLib\GrpRenderTargetTexture.cpp 83 Error (active) E0167 Argument of type "int" is incompatible with parameter of type "LPDIRECT3DVERTEXSHADER9". eterlib C:\Projects\Bin (Source)\client\EterLib\GrpRenderTargetTexture.cpp 156 Error C2664 'void CStateManager::SetVertexShader(LPDIRECT3DVERTEXSHADER9)' : cannot convert argument 1 from 'int' to 'LPDIRECT3DVERTEXSHADER9' eterlib C:\Projects\Bin (Source)\client\EterLib\GrpRenderTargetTexture.cpp 156 Error C2664 'void CStateManager::SetVertexShader(LPDIRECT3DVERTEXSHADER9)' : cannot convert argument 1 from 'int' to 'LPDIRECT3DVERTEXSHADER9' eterlib C:\Projects\Bin (Source)\client\EterLib\GrpImageInstance.cpp 91 Error C2660 'IDirect3DDevice9::CreateTexture' : function does not take 7 arguments eterlib C:\Projects\Bin (Source)\client\EterLib\GrpRenderTargetTexture.cpp 64 Error C2660 'IDirect3DDevice9::CreateDepthStencilSurface' : function does not take 5 arguments eterlib C:\Projects\Bin (Source)\client\EterLib\GrpRenderTargetTexture.cpp 78 Error C2664 'HRESULT IDirect3DDevice9::SetRenderTarget(DWORD,IDirect3DSurface9 *)' : cannot convert argument 1 from 'LPDIRECT3DSURFACE9' to 'DWORD' eterlib C:\Projects\Bin (Source)\client\EterLib\GrpRenderTargetTexture.cpp 85 Error C2664 'HRESULT IDirect3DDevice9::SetRenderTarget(DWORD,IDirect3DSurface9 *)' : cannot convert argument 1 from 'LPDIRECT3DSURFACE9' to 'DWORD' eterlib C:\Projects\Bin (Source)\client\EterLib\GrpRenderTargetTexture.cpp 90 Edited August 26, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Premium Python27 5 Posted February 12, 2020 Premium Share Posted February 12, 2020 On 2/11/2020 at 8:56 AM, ItamisCZ said: I've already tried this, before i wrote comment. It gives another errors. Reveal hidden contents Error C2660 'IDirect3DDevice9::GetRenderTarget' : function does not take 1 arguments eterlib C:\Projects\Bin (Source)\client\EterLib\GrpRenderTargetTexture.cpp 83 Error (active) E0165 too few arguments in function call eterlib C:\Projects\Bin (Source)\client\EterLib\GrpRenderTargetTexture.cpp 64 Error (active) E0165 too few arguments in function call eterlib C:\Projects\Bin (Source)\client\EterLib\GrpRenderTargetTexture.cpp 78 Error (active) E0165 too few arguments in function call eterlib C:\Projects\Bin (Source)\client\EterLib\GrpRenderTargetTexture.cpp 83 Error (active) E0167 Argument of type "LPDIRECT3DSURFACE9" is incompatible with parameter of type "DWORD". eterlib C:\Projects\Bin (Source)\client\EterLib\GrpRenderTargetTexture.cpp 85 Error (active) E0167 Argument of type "LPDIRECT3DSURFACE9" is incompatible with parameter of type "DWORD". eterlib C:\Projects\Bin (Source)\client\EterLib\GrpRenderTargetTexture.cpp 90 Error (active) E0167 Argument of type "LPDIRECT3DSURFACE9 *" is incompatible with parameter of type "DWORD". eterlib C:\Projects\EBin (Source)\client\EterLib\GrpRenderTargetTexture.cpp 78 Error (active) E0167 Argument of type "LPDIRECT3DSURFACE9 *" is incompatible with parameter of type "DWORD". eterlib C:\Projects\Bin (Source)\client\EterLib\GrpRenderTargetTexture.cpp 83 Error (active) E0167 Argument of type "int" is incompatible with parameter of type "LPDIRECT3DVERTEXSHADER9". eterlib C:\Projects\Bin (Source)\client\EterLib\GrpRenderTargetTexture.cpp 156 Error C2664 'void CStateManager::SetVertexShader(LPDIRECT3DVERTEXSHADER9)' : cannot convert argument 1 from 'int' to 'LPDIRECT3DVERTEXSHADER9' eterlib C:\Projects\Bin (Source)\client\EterLib\GrpRenderTargetTexture.cpp 156 Error C2664 'void CStateManager::SetVertexShader(LPDIRECT3DVERTEXSHADER9)' : cannot convert argument 1 from 'int' to 'LPDIRECT3DVERTEXSHADER9' eterlib C:\Projects\Bin (Source)\client\EterLib\GrpImageInstance.cpp 91 Error C2660 'IDirect3DDevice9::CreateTexture' : function does not take 7 arguments eterlib C:\Projects\Bin (Source)\client\EterLib\GrpRenderTargetTexture.cpp 64 Error C2660 'IDirect3DDevice9::CreateDepthStencilSurface' : function does not take 5 arguments eterlib C:\Projects\Bin (Source)\client\EterLib\GrpRenderTargetTexture.cpp 78 Error C2664 'HRESULT IDirect3DDevice9::SetRenderTarget(DWORD,IDirect3DSurface9 *)' : cannot convert argument 1 from 'LPDIRECT3DSURFACE9' to 'DWORD' eterlib C:\Projects\Bin (Source)\client\EterLib\GrpRenderTargetTexture.cpp 85 Error C2664 'HRESULT IDirect3DDevice9::SetRenderTarget(DWORD,IDirect3DSurface9 *)' : cannot convert argument 1 from 'LPDIRECT3DSURFACE9' to 'DWORD' eterlib C:\Projects\Bin (Source)\client\EterLib\GrpRenderTargetTexture.cpp 90 It's not so hard u should managed fast if u read documentation from dx9 Link to comment Share on other sites More sharing options...
iSouli 3 Posted February 23, 2020 Share Posted February 23, 2020 On 9/9/2019 at 10:10 AM, Rafiloni said: hello I have a problem with the system. A compilation of the effective treatment course selectmodel interrupts the client. void CRenderTarget::SelectModel(const DWORD index) { if (index == 0) { //delete m_pModel; m_pModel.reset(); return; } CInstanceBase::SCreateData kCreateData{}; kCreateData.m_bType = CActorInstance::TYPE_NPC; // Dynamic Type kCreateData.m_dwRace = index; auto model = std::make_unique<CInstanceBase>(); if (!model->Create(kCreateData)) { if (m_pModel) { m_pModel.reset(); } return; } m_pModel = std::move(model); m_pModel->GetGraphicThingInstancePtr()->ClearAttachingEffect(); m_modelRotation = 0.0f; m_pModel->Refresh(CRaceMotionData::NAME_WAIT, true); m_pModel->SetLoopMotion(CRaceMotionData::NAME_WAIT); m_pModel->SetAlwaysRender(true); m_pModel->SetRotation(0.0f); auto& camera_manager = CCameraManager::instance(); camera_manager.SetCurrentCamera(CCameraManager::SHOPDECO_CAMERA); camera_manager.GetCurrentCamera()->SetTargetHeight(110.0); camera_manager.ResetToPreviousCamera(); } after function tests kCreateData.m_bType = CActorInstance::TYPE_NPC; // Dynamic Type kCreateData.m_dwRace = index; auto model = std::make_unique<CInstanceBase>(); TraceError("OK"); //displays ok if (!model->Create(kCreateData)) { TraceError("OK"); //does not display if (m_pModel) { m_pModel.reset(); } return; } TraceError("OK"); //does not display the error closes the client without syser and log errors. Compiles distriubute. Please help. I have the same problem, I can't do make_unique from the cinstancebase. The function runs through but then the client closes. Link to comment Share on other sites More sharing options...
Cysgod 106 Posted March 30, 2020 Share Posted March 30, 2020 Original Archive (with password from start post): This is the hidden content, please Sign In or Sign Up 31 1 2 11 18 Link to comment Share on other sites More sharing options...
Management AZICKO 7390 Posted March 31, 2020 Management Share Posted March 31, 2020 (edited) 17 hours ago, Cysgod said: Original Archive (with password from start post): This is the hidden content, please Sign In or Sign Up Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal 5 1 6 6 Scamming ? Reselling ? metin2.download | metin2.dev | fr.metin2.dev | metin2dev.org | metin2.top | top-metin2.org Link to comment Share on other sites More sharing options...
Finnael 481 Posted August 20, 2020 Share Posted August 20, 2020 (edited) If you have this problem like me where RenderTarget renders the lod versions of the models you can do the the following thing to fix it. (You can also simply delete the lod files from your pack but you are gonna have to do it for every class and every armor that class wears. Besides that you can also have huge performance problems. There is a reason why LOD exists.) Open EterGrnLib/ThingInstance.h //1.)Find void SetMotionAtEnd(); //2.) Add after: void SetSkipLod(bool value) { m_bSkipLod = value; } bool GetSkipLod() { return m_bSkipLod; } //3.) Find: std::map<DWORD, CGraphicThing::TRef*> m_roMotionThingMap; //4.) Add after: bool m_bSkipLod; Open EterGrnLib/ThingInstance.cpp //1.) Find: m_v3Center = D3DXVECTOR3(0.0f, 0.0f, 0.0f); //2.) Add after: m_bSkipLod = false; //3.) Find: CCamera* pcurCamera = CCameraManager::Instance().GetCurrentCamera(); //4.) Add before: if (m_bSkipLod) return; Open EterLib/CRenderTarget.cpp //1.) Find: m_pModel->GetGraphicThingInstancePtr()->ClearAttachingEffect(); //2.) Add before: m_pModel->GetGraphicThingInstancePtr()->SetSkipLod(true); This should be enough to fix the issue. Note that this bug does not happen on every versions of granny. Just try to render a player model with render target and if your character looks like mine then you can apply this to fix it. Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
ameer668 0 Posted May 25, 2021 Share Posted May 25, 2021 (edited) i have these errors when trying to build my client source am sure i put everything in its place i think this a missing #include problem what can i do ? Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Active Member Volvox 1513 Posted June 4, 2021 Active Member Share Posted June 4, 2021 (edited) On 5/25/2021 at 11:31 AM, ameer668 said: i have these errors when trying to build my client source am sure i put everything in its place i think this a missing #include problem what can i do ? Include the missing files via VisualStudio. Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal 2 Link to comment Share on other sites More sharing options...
alexghinet 12 Posted August 29, 2021 Share Posted August 29, 2021 How should i add this render target for ingame itemshop too , it works but only for inventory and shops Link to comment Share on other sites More sharing options...
Active Member Volvox 1513 Posted August 29, 2021 Active Member Share Posted August 29, 2021 You just need to import it into your mall.class and then use it just like UiToolTip.py Link to comment Share on other sites More sharing options...
LaTahzen 1 Posted August 29, 2021 Share Posted August 29, 2021 İts work? Link to comment Share on other sites More sharing options...
Active Member Volvox 1513 Posted August 29, 2021 Active Member Share Posted August 29, 2021 1 hour ago, LaTahzen said: İts work? Yes? Link to comment Share on other sites More sharing options...
LaTahzen 1 Posted August 29, 2021 Share Posted August 29, 2021 Just now, V0lvox said: Yes? can u give me pls discord adress Link to comment Share on other sites More sharing options...
Active Member Volvox 1513 Posted August 29, 2021 Active Member Share Posted August 29, 2021 2 minutes ago, LaTahzen said: can u give me pls discord adress Why ? If you have some questions, just ask here. Link to comment Share on other sites More sharing options...
LaTahzen 1 Posted August 29, 2021 Share Posted August 29, 2021 1 minute ago, V0lvox said: Why ? If you have some questions, just ask here. in files tutorial is there? Link to comment Share on other sites More sharing options...
Active Member Volvox 1513 Posted August 29, 2021 Active Member Share Posted August 29, 2021 1 minute ago, LaTahzen said: in files tutorial is there? Yes, just download and have a look Link to comment Share on other sites More sharing options...
LaTahzen 1 Posted August 29, 2021 Share Posted August 29, 2021 Just now, V0lvox said: Yes, just download and have a look missing files or codes no isnt it ? Link to comment Share on other sites More sharing options...
LaTahzen 1 Posted August 29, 2021 Share Posted August 29, 2021 4 minutes ago, V0lvox said: Just use this Mega link ? RenderTarget_2.0 edit by Volvox .rar Link to comment Share on other sites More sharing options...
Fuzzer 130 Posted August 30, 2021 Share Posted August 30, 2021 (edited) if someone have problem with view big models. Scaling is the solution EterGrnLib\ThingInstance.cpp after: float CGraphicThingInstance::GetHeight() add: bool CGraphicThingInstance::GetSize(float & fHeight, float & fWidth, float & fDepth) { fHeight = fWidth = fDepth = 0.0f; if (m_LODControllerVector.empty()) return false; CGrannyModelInstance* pModelInstance = m_LODControllerVector[0]->GetModelInstance(); if (!pModelInstance) return false; D3DXVECTOR3 vtMin, vtMax; pModelInstance->GetBoundBox(&vtMin, &vtMax); fHeight = fabs(vtMin.z - vtMax.z); fWidth = fabs(vtMin.x - vtMax.x); fDepth = fabs(vtMin.y - vtMax.y); return true; } EterGrnLib\ThingInstance.h after: float GetHeight(); add: bool GetSize(float & fHeight, float & fWidth, float & fDepth); UserInterface\InstanceBase.cpp after: void CInstanceBase::SetInstanceType(int iInstanceType) add: bool CInstanceBase::GetInstanceSize(float & fHeight, float & fWidth, float & fDepth) { return m_GraphicThingInstance.GetSize(fHeight, fWidth, fDepth); } void CInstanceBase::SetScale(float fScale) { m_GraphicThingInstance.SetScale(fScale, fScale, fScale, true); } void CInstanceBase::SetScale(float fx, float fy, float fz) { m_GraphicThingInstance.SetScale(fx, fy, fz, true); } UserInterface\InstanceBase.h after: void SetInstanceType(int iInstanceType); add: bool GetInstanceSize(float & fHeight, float & fWidth, float & fDepth); void SetScale(float fScale); void SetScale(float fx, float fy, float fz); in your CRenderTraget function use: if (m_pModel) { float fHieght = 0.0f, fWidth = 0.0f, fDepth = 0.0f; if(m_pModel->GetInstanceSize(fHieght, fWidth, fDepth)) { // 150.0f is max height / width / depth of model float fsh = 150.0f / fHieght; float fsw = 150.0f / fWidth; float fsd = 150.0f / fDepth; // here u can use float fMin = std::min({fsh,fsw,fsd}); float fMin = fsh < fsw ? fsh : fsw; fMin = fsd < fMin ? fsd : fMin; m_pModel->SetScale(fMin); } } like: Edited August 26, 2022 by Metin2 Dev Core X - External 2 Internal 2 Link to comment Share on other sites More sharing options...
[007]DawisHU 278 Posted September 5, 2021 Share Posted September 5, 2021 On 9/22/2019 at 8:07 AM, evils666 said: Hello. Does anyone have an updated system for direct 9? Yes. i too upgraded to DX9 Link to comment Share on other sites More sharing options...
evils666 0 Posted September 16, 2021 Share Posted September 16, 2021 On 9/5/2021 at 9:44 PM, [007]DawisHU said: Yes. i too upgraded to DX9 Can I ask for a tutorial? Link to comment Share on other sites More sharing options...
TheHypnosis 75 Posted April 27, 2022 Share Posted April 27, 2022 Dx9 Render Target ? 1 1 Link to comment Share on other sites More sharing options...
Active Member Volvox 1513 Posted April 28, 2022 Active Member Share Posted April 28, 2022 7 hours ago, TheHypnosis said: Dx9 Render Target ? Not yet. Soon 1 Link to comment Share on other sites More sharing options...
Recommended Posts