DXGL r847 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r846‎ | r847 | r848 >
Date:23:49, 27 August 2018
Author:admin
Status:new
Tags:
Comment:
Set texture unit in DrawBackbuffer and DrawBackbufferRect functions, fixes multiple issues.
Temporarily remove unimplemented options from DXGL Config.
Modified paths:
  • /ddraw/glRenderer.cpp (modified) (history)
  • /dxglcfg/dxglcfg.cpp (modified) (history)

Diff [purge]

Index: ddraw/glRenderer.cpp
@@ -3597,6 +3597,7 @@
35983598 if (!paletted && firstpass && (dxglcfg.postfilter == 1))
35993599 glTexture__SetFilter(*texture, 8, GL_LINEAR, GL_LINEAR, This);
36003600 else glTexture__SetFilter(*texture, 8, GL_NEAREST, GL_NEAREST, This);
 3601+ This->ext->glUniform1i(This->shaders->shaders[progtype].tex0, 8);
36013602 This->ext->glUniform4f(This->shaders->shaders[progtype].view,view[0],view[1],view[2],view[3]);
36023603 This->bltvertices[0].s = This->bltvertices[0].t = This->bltvertices[1].t = This->bltvertices[2].s = 1.;
36033604 This->bltvertices[1].s = This->bltvertices[2].t = This->bltvertices[3].s = This->bltvertices[3].t = 0.;
@@ -3653,6 +3654,7 @@
36543655 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
36553656 glUtil_SetScissor(This->util, FALSE, 0, 0, 0, 0);
36563657 glUtil_SetTexture(This->util, 8, texture);
 3658+ This->ext->glUniform1i(This->shaders->shaders[progtype].tex0, 8);
36573659 This->ext->glUniform4f(This->shaders->shaders[progtype].view, view[0], view[1], view[2], view[3]);
36583660 This->bltvertices[1].s = This->bltvertices[3].s = (GLfloat)srcrect.left / (GLfloat)texture->levels[0].ddsd.dwWidth;
36593661 This->bltvertices[0].s = This->bltvertices[2].s = (GLfloat)srcrect.right / (GLfloat)texture->levels[0].ddsd.dwWidth;
Index: dxglcfg/dxglcfg.cpp
@@ -3140,6 +3140,7 @@
31413141 SendDlgItemMessage(hTabs[1], IDC_BLTFILTER, CB_ADDSTRING, 0, (LPARAM)buffer);
31423142 _tcscpy(buffer, _T("Bilinear"));
31433143 SendDlgItemMessage(hTabs[1], IDC_BLTFILTER, CB_ADDSTRING, 1, (LPARAM)buffer);
 3144+ /* Temporarily removed until implemented
31443145 _tcscpy(buffer, _T("Bilinear, nearest colorkey"));
31453146 SendDlgItemMessage(hTabs[1], IDC_BLTFILTER, CB_ADDSTRING, 2, (LPARAM)buffer);
31463147 _tcscpy(buffer, _T("Bilinear, sharp colorkey"));
@@ -3146,6 +3147,7 @@
31473148 SendDlgItemMessage(hTabs[1], IDC_BLTFILTER, CB_ADDSTRING, 3, (LPARAM)buffer);
31483149 _tcscpy(buffer, _T("Bilinear, soft colorkey"));
31493150 SendDlgItemMessage(hTabs[1], IDC_BLTFILTER, CB_ADDSTRING, 4, (LPARAM)buffer);
 3151+ */
31503152 SendDlgItemMessage(hTabs[1], IDC_BLTFILTER, CB_SETCURSEL, cfg->BltScale, 0);
31513153 // Removed for DXGL 0.5.13 release
31523154 // Blt scaling threshold