Skip to content

Commit ef4f6e4

Browse files
committed
Stop using 4D matrices and do 2D transforms in the GPU
1 parent 3d9cce2 commit ef4f6e4

File tree

13 files changed

+212
-288
lines changed

13 files changed

+212
-288
lines changed

DesktopEmulator/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,6 @@ set(EMULATOR_SRC
280280
${INFRASTRUCTURE_DIR}/FilePaths.cpp
281281
${INFRASTRUCTURE_DIR}/FileSignatures.cpp
282282
${INFRASTRUCTURE_DIR}/Logger.cpp
283-
${INFRASTRUCTURE_DIR}/Matrix4D.cpp
284283
${INFRASTRUCTURE_DIR}/OpenGL2DContext.cpp
285284
${INFRASTRUCTURE_DIR}/StopWatch.cpp
286285
${INFRASTRUCTURE_DIR}/StringFunctions.cpp
@@ -295,7 +294,6 @@ set(EDITCONTROLS_SRC
295294
${EDITCONTROLS_DIR}/Main.cpp
296295
${INFRASTRUCTURE_DIR}/FilePaths.cpp
297296
${INFRASTRUCTURE_DIR}/Logger.cpp
298-
${INFRASTRUCTURE_DIR}/Matrix4D.cpp
299297
${INFRASTRUCTURE_DIR}/OpenGL2DContext.cpp
300298
${INFRASTRUCTURE_DIR}/StringFunctions.cpp
301299
${INFRASTRUCTURE_DIR}/Texture.cpp)
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
// *****************************************************************************
2+
// start include guard
3+
#ifndef EMULATORINTERFACES_HPP
4+
#define EMULATORINTERFACES_HPP
5+
6+
// include common vircon headers
7+
#include "../../VirconDefinitions/Constants.hpp"
8+
#include "../../VirconDefinitions/DataStructures.hpp"
9+
// *****************************************************************************
10+
11+
12+
namespace V32
13+
{
14+
// =============================================================================
15+
// DEFINITIONS FOR GAMEPAD CONTROLLER INTERFACES
16+
// =============================================================================
17+
18+
19+
// button codes for input events
20+
enum class GamepadButtons
21+
{
22+
Start = 0,
23+
A, B, X, Y, L, R
24+
};
25+
26+
// -----------------------------------------------------------------------------
27+
28+
// directions codes for input events
29+
enum class GamepadDirections
30+
{
31+
Left = 0,
32+
Right,
33+
Up,
34+
Down
35+
};
36+
37+
38+
// =============================================================================
39+
// DEFINITIONS FOR SPU INTERFACES
40+
// =============================================================================
41+
42+
43+
// define the sound buffers used for SPU audio output
44+
typedef struct
45+
{
46+
int32_t SequenceNumber;
47+
SPUSample Samples[ Constants::SPUSamplesPerFrame ];
48+
}
49+
SPUOutputBuffer;
50+
51+
52+
// =============================================================================
53+
// DEFINITIONS FOR GPU INTERFACES
54+
// =============================================================================
55+
56+
57+
typedef struct
58+
{
59+
float x, y;
60+
}
61+
GPUPoint;
62+
63+
// -----------------------------------------------------------------------------
64+
65+
typedef struct
66+
{
67+
GPUPoint VertexPositions[ 4 ];
68+
GPUPoint VertexTexCoords[ 4 ];
69+
}
70+
GPUQuad;
71+
}
72+
73+
74+
// *****************************************************************************
75+
// end include guard
76+
#endif
77+
// *****************************************************************************

DesktopEmulator/DesktopInfrastructure/Matrix4D.cpp

Lines changed: 0 additions & 59 deletions
This file was deleted.

DesktopEmulator/DesktopInfrastructure/Matrix4D.hpp

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)