Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
7 registered members (fairtrader, Quad, miwok, Martin_HH, AndrewAMD, alibaba, dpn), 581 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
CRASH in Matt's RENDERVIEW.DLL #50724
08/04/05 15:12
08/04/05 15:12
Joined: Aug 2005
Posts: 1,185
Ukraine
Lion_Ts Offline OP
Serious User
Lion_Ts  Offline OP
Serious User

Joined: Aug 2005
Posts: 1,185
Ukraine
Hi !
Quick explanation:
'crash in render_backbuffer(entity)' when

  • win key, alt+tab, etc. pressed
  • change resolution

Things like
Code:
  if(window_focus==1){render_backbuffer(entity);} 

or
disabling system keys is not work.
I don't have renderview.dll sources and I'm very bad programmer, so CAN it be fixed ? PLEASE. DLL is good, but d3d_device loosing is messed.
Matt, help if you can.

Re: CRASH in Matt's RENDERVIEW.DLL [Re: Lion_Ts] #50725
08/04/05 17:13
08/04/05 17:13
Joined: Aug 2005
Posts: 1,185
Ukraine
Lion_Ts Offline OP
Serious User
Lion_Ts  Offline OP
Serious User

Joined: Aug 2005
Posts: 1,185
Ukraine
Matt, please, say something as author...

Re: CRASH in Matt's RENDERVIEW.DLL [Re: Lion_Ts] #50726
08/04/05 17:32
08/04/05 17:32
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline

Senior Expert
Orange Brat  Offline

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
He hasn't been on the forum since you posted. Patience is a virtue.


My User Contributions master list - my initial post links are down but scroll down page to find list to active links
Re: CRASH in Matt's RENDERVIEW.DLL [Re: Orange Brat] #50727
08/05/05 07:20
08/05/05 07:20
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
no it will not be fixed, sorry.

Re: CRASH in Matt's RENDERVIEW.DLL [Re: Matt_Aufderheide] #50728
08/05/05 12:30
08/05/05 12:30
Joined: Aug 2005
Posts: 1,185
Ukraine
Lion_Ts Offline OP
Serious User
Lion_Ts  Offline OP
Serious User

Joined: Aug 2005
Posts: 1,185
Ukraine
Oh, no...
Ok, Matt. Do You plan to give the sources of renderview.dll to public domain ?
May be some one else can fix it... It seems to me, this crash is a serious fault to use renderview.dll in commercial quality games.

Last edited by Lion_Ts; 08/05/05 14:48.
Re: CRASH in Matt's RENDERVIEW.DLL [Re: Lion_Ts] #50729
08/05/05 19:11
08/05/05 19:11
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
Sorry.

Re: CRASH in Matt's RENDERVIEW.DLL [Re: Matt_Aufderheide] #50730
08/06/05 15:19
08/06/05 15:19
Joined: Sep 2002
Posts: 758
Sunny Scotland
xoNoid Offline
Developer
xoNoid  Offline
Developer

Joined: Sep 2002
Posts: 758
Sunny Scotland
Have you thought about as a workaround to unload Matt's dll change resolution then load it again?

Re: CRASH in Matt's RENDERVIEW.DLL [Re: xoNoid] #50731
08/07/05 18:53
08/07/05 18:53
Joined: Aug 2005
Posts: 1,185
Ukraine
Lion_Ts Offline OP
Serious User
Lion_Ts  Offline OP
Serious User

Joined: Aug 2005
Posts: 1,185
Ukraine
To xoNoid:
How about crash, when win-key pressed ?
To Matt:
I just write down my own renderview.dll, first try is slow, because i'm using LoadSurfaceFromSurface, i plan to change it with StretchBlt. And I have same error, I think it related to preload_bmap. What do You think ? Do I have to purge bmap from memory in dll when d3d device lost ?
Anyway, thanks, Matt.

Last edited by Lion_Ts; 08/07/05 18:58.
Re: CRASH in Matt's RENDERVIEW.DLL [Re: Lion_Ts] #50732
08/10/05 11:24
08/10/05 11:24
Joined: Aug 2005
Posts: 1,185
Ukraine
Lion_Ts Offline OP
Serious User
Lion_Ts  Offline OP
Serious User

Joined: Aug 2005
Posts: 1,185
Ukraine
Hi, Matt !
I forgot to release surfaces on d3d_lost, crash is gone for now. I'll plan to use fast gdi functions to blit surfaces. But 3dgs engine stucks at shutdown (about 15 secs) with my dll. My dll cannot unloaded correctly, I think.
Matt, point me to the right way, please. lion_ts@ukr.net
Code:

#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
#include <math.h.>
#define DLL_USE
#include "adll.h"
#include <d3dx9.h>
#include <d3dx9tex.h>
#include "DXUtil.h"

ENTITY* rent;
BMAP* texbmap;
LPDIRECT3DTEXTURE9 d3dtex=NULL;
LPDIRECT3DSURFACE9 m_pRenderTarget=NULL;
LPDIRECT3DSURFACE9 m_pRenderTex=NULL;

BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved )
{
engine_bind();
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
// engine_bind();
break;
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
SAFE_RELEASE(m_pRenderTarget);
SAFE_RELEASE(m_pRenderTex);
}
return TRUE;
}
//d3d device lost
DLLFUNC void d3d_lost_()
{
SAFE_RELEASE(m_pRenderTarget);
SAFE_RELEASE(m_pRenderTex);
}
//d3d device recreate
DLLFUNC void d3d_reset_()
{
}
//renders backbuffer
DLLFUNC void RenderBBuff(ENTITY *ent)
{
HRESULT hr;
// HDC* SourceDC;
// HDC* DestDC;

if (!ent) return;
LPDIRECT3DDEVICE9 pd3ddev= (LPDIRECT3DDEVICE9)draw_begin();
if (FAILED(hr=pd3ddev->TestCooperativeLevel()))
return;
if(FAILED(hr = pd3ddev->GetBackBuffer(0,0,D3DBACKBUFFER_TYPE_MONO, &m_pRenderTarget)))
goto err_ ;
if (ent!=rent || !m_pRenderTex){
SAFE_RELEASE(m_pRenderTex);
rent=ent;
texbmap = bmap_for_entity(ent,0);
if (!texbmap) goto err_;
d3dtex = (LPDIRECT3DTEXTURE9)bmap_preload(texbmap);
if (!d3dtex) goto err_;
if (FAILED(hr = d3dtex->GetSurfaceLevel(0,&m_pRenderTex)))
goto err_;//return;
}
if (FAILED(D3DXLoadSurfaceFromSurface(m_pRenderTex,NULL,NULL,m_pRenderTarget,NULL,NULL,D3DX_FILTER_POINT,0)))
goto err_;//return;
err_: ;
SAFE_RELEASE(m_pRenderTarget);
SAFE_RELEASE(m_pRenderTex);
}



Re: CRASH in Matt's RENDERVIEW.DLL [Re: Lion_Ts] #50733
08/11/05 00:22
08/11/05 00:22
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
I honestly have no idea.. sorry

Page 1 of 2 1 2

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1