Update of /cvsroot/vba/VisualBoyAdvance/src/win32
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18972/src/win32
Modified Files:
Direct3D.cpp Display.h display.cpp
Log Message:
Reworked Direct3D to directly render to the BackBuffer. Results in speed even higher than DirectDraw.
Index: display.cpp
===================================================================
RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/display.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** display.cpp 8 Jun 2006 14:12:18 -0000 1.3
--- display.cpp 12 Jun 2006 22:01:51 -0000 1.4
***************
*** 109,113 ****
}
! // very compatible C version
//unsigned int nBytesPerPixel = colorDepth>>3;
//unsigned int i, x, y, srcPitch = (width+1) * nBytesPerPixel;
--- 109,113 ----
}
! // very compatible but slow C version
//unsigned int nBytesPerPixel = colorDepth>>3;
//unsigned int i, x, y, srcPitch = (width+1) * nBytesPerPixel;
Index: Display.h
===================================================================
RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/Display.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Display.h 6 Jun 2006 21:04:21 -0000 1.3
--- Display.h 12 Jun 2006 22:01:51 -0000 1.4
***************
*** 35,44 ****
virtual void cleanup() = 0;
virtual void render() = 0;
! virtual void checkFullScreen() { };
! virtual void renderMenu() { };
virtual void clear()=0;
virtual bool changeRenderSize(int w, int h) { return true; };
virtual void resize(int w, int h) {};
! virtual void setOption(const char *option, int value) = 0;
virtual DISPLAY_TYPE getType() = 0;
virtual bool isSkinSupported() { return false; }
--- 35,44 ----
virtual void cleanup() = 0;
virtual void render() = 0;
! virtual void checkFullScreen() {};
! virtual void renderMenu() {};
virtual void clear()=0;
virtual bool changeRenderSize(int w, int h) { return true; };
virtual void resize(int w, int h) {};
! virtual void setOption(const char *option, int value) {};
virtual DISPLAY_TYPE getType() = 0;
virtual bool isSkinSupported() { return false; }
Index: Direct3D.cpp
===================================================================
RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/Direct3D.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Direct3D.cpp 6 Jun 2006 21:04:21 -0000 1.9
--- Direct3D.cpp 12 Jun 2006 22:01:51 -0000 1.10
***************
*** 2,5 ****
--- 2,6 ----
// Copyright (C) 1999-2003 Forgotten
// Copyright (C) 2004 Forgotten and the VBA development team
+ // Copyright (C) 2005-2006 VBA development team
// This program is free software; you can redistribute it and/or modify
***************
*** 18,26 ****
#include "stdafx.h"
[...1137 lines suppressed...]
! bool Direct3DDisplay::resetDevice()
! {
! HRESULT hr;
! destroyFont();
! if( FAILED( hr = pDevice->Reset( &dpp ) ) ) {
! DXTRACE_ERR_MSGBOX( _T("pDevice->Reset failed"), hr );
! failed = true;
! return false;
! }
! createFont();
! failed = false;
! return true;
}
+
IDisplay *newDirect3DDisplay()
{
! return new Direct3DDisplay();
}
|