Jump to content
The Dark Mod Forums

TDM Engine Development Page


zergrush

Recommended Posts

@revelator
1. Can you tell me about your problem 7641 was supposed to fix?
2. Do you understand that unnecessary, meaningless changes cause a lot of extra work for other people when it comes to branch merging? I'm talking about explicit variable initializtion here

GLuint fboPrimary = 0, fboResolve = 0, fboShadow = 0, fboPostProcess = 0, fboCurrent = 0, pbo = 0;
GLuint renderBufferColor = 0, renderBufferDepthStencil = 0, renderBufferPostProcess = 0;

I have been trying to keep my multi-light project out of trunk but with this daily re-formatting, reverting, re-reverting craze it's just not practical any more.

I'm going to fix the merges myself and commit everything back to trunk.

  • Like 1
Link to comment
Share on other sites

It was an attempt to fix softshadows because i misunderstood your intention with r_softshadowsquality,

i had the impression that the negative values mentioned might have been accidentally fed to the scissor and or viewport,

so i made sure that this could not happen. Then you fixed it yourself and i noticed i was on the wrong track.

 

The explicit variable initialization started as an attempt at getting rid of the ? vid_restart if mapping failed, guess i went a little overboard on that one sorry.

 

multi-light ? sounds interresting, what is the effect ?.

Link to comment
Share on other sites

And it was not my intention to make your lifes harder, just with the initial problems with code that went poof, formatting problems and me trying to revert everything back,

i probably ended up changing more than was nessesary.

Appologies for that, guess with me being away for so long i had a hard time catching up to all the changes.

Link to comment
Share on other sites

Sorry if I sounded too harsh. Don't want to offend fellow coders or cause any tension.

It's just that I have received tons of explicit and implicit suggestions not to commit unfinished stuff to trunk. The first time I try to work in a branch, it's starting to merge conflict on the daily basis because of formatting changes or initialization of variables that make no difference at all.

 

The negative scissor check is absolutely not related to the negative SS quality cvar. It's a bug in front renderer. It's making no sense to change sign of negative scissor width/height once they already come negative from the front end. I think you should revert that and ask in the PM next time.

Link to comment
Share on other sites

The idea with avoiding negative values in scissor atleast was not totally far fetched, fhdoom does something similar, but i also went a bit overboard on that one cause i assumed no value there could be negative.

but as i found out x and y can actually be negative, but width and height must not be.

Question would then be should we care ? because if that happens we would allready have other problems down the line.

Link to comment
Share on other sites

The idea with avoiding negative values in scissor atleast was not totally far fetched, fhdoom does something similar, but i also went a bit overboard on that one cause i assumed no value there could be negative.

but as i found out x and y can actually be negative, but width and height must not be.

Question would then be should we care ? because if that happens we would allready have other problems down the line.

Yes we should care because it's a bug and it must be fixed

Link to comment
Share on other sites

/*
================
Sys_SetHighDPIMode

code that tells windows we're High DPI aware so it doesn't scale our windows
================
*/
typedef enum D3_PROCESS_DPI_AWARENESS {
	D3_PROCESS_DPI_UNAWARE = 0,
	D3_PROCESS_SYSTEM_DPI_AWARE = 1,
	D3_PROCESS_PER_MONITOR_DPI_AWARE = 2
} YD3_PROCESS_DPI_AWARENESS;

static void Sys_SetHighDPIMode( void ) {
	/* For Vista, Win7 and Win8 */
	BOOL( WINAPI * SetProcessDPIAware )( void ) = NULL;
	/* Win8.1 and later */
	HRESULT( WINAPI * SetProcessDpiAwareness )( D3_PROCESS_DPI_AWARENESS dpiAwareness ) = NULL;
	HINSTANCE userDLL = LoadLibrary( "USER32.DLL" );
	if ( userDLL ) {
		SetProcessDPIAware = ( BOOL( WINAPI * )( void ) ) GetProcAddress( userDLL, "SetProcessDPIAware" );
	}
	HINSTANCE shcoreDLL = LoadLibrary( "SHCORE.DLL" );
	if ( shcoreDLL ) {
		SetProcessDpiAwareness = ( HRESULT( WINAPI * )( YD3_PROCESS_DPI_AWARENESS ) )
			GetProcAddress( shcoreDLL, "SetProcessDpiAwareness" );
	}
	if ( SetProcessDpiAwareness ) {
		SetProcessDpiAwareness( D3_PROCESS_PER_MONITOR_DPI_AWARE );
	} else if ( SetProcessDPIAware ) {
		SetProcessDPIAware();
	}
}

Btw found this in a recent dhewm3 commit, might be of use to us also ?, it tells windows to avoid applying scaling on high dpi panels.

 

call in WinMain just before Sys_SetPhysicalWorkMemory.

  • Like 1
Link to comment
Share on other sites

/*
================
Sys_SetHighDPIMode

code that tells windows we're High DPI aware so it doesn't scale our windows
================
*/
typedef enum D3_PROCESS_DPI_AWARENESS {
	D3_PROCESS_DPI_UNAWARE = 0,
	D3_PROCESS_SYSTEM_DPI_AWARE = 1,
	D3_PROCESS_PER_MONITOR_DPI_AWARE = 2
} YD3_PROCESS_DPI_AWARENESS;

static void Sys_SetHighDPIMode( void ) {
	/* For Vista, Win7 and Win8 */
	BOOL( WINAPI * SetProcessDPIAware )( void ) = NULL;
	/* Win8.1 and later */
	HRESULT( WINAPI * SetProcessDpiAwareness )( D3_PROCESS_DPI_AWARENESS dpiAwareness ) = NULL;
	HINSTANCE userDLL = LoadLibrary( "USER32.DLL" );
	if ( userDLL ) {
		SetProcessDPIAware = ( BOOL( WINAPI * )( void ) ) GetProcAddress( userDLL, "SetProcessDPIAware" );
	}
	HINSTANCE shcoreDLL = LoadLibrary( "SHCORE.DLL" );
	if ( shcoreDLL ) {
		SetProcessDpiAwareness = ( HRESULT( WINAPI * )( YD3_PROCESS_DPI_AWARENESS ) )
			GetProcAddress( shcoreDLL, "SetProcessDpiAwareness" );
	}
	if ( SetProcessDpiAwareness ) {
		SetProcessDpiAwareness( D3_PROCESS_PER_MONITOR_DPI_AWARE );
	} else if ( SetProcessDPIAware ) {
		SetProcessDPIAware();
	}
}

Btw found this in a recent dhewm3 commit, might be of use to us also ?, it tells windows to avoid applying scaling on high dpi panels.

 

call in WinMain just before Sys_SetPhysicalWorkMemory.

 

Done 2 years ago

  • Like 1
Link to comment
Share on other sites

Hmm strange that the bugged models only seem to affect one type of model :huh: kinda looks like a failed depthhack gets applied, weird though this is the only mod where i noticed this behaviour.

if looking up the undead revenants get there heads cut off :laugh: and while that might look funny im certain that was not the intention.

Strangely the ghost models in the same place are not affected.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 2 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 3 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...