Skip to content

Commit bdd85c9

Browse files
committed
ugh did I really accidentally commit this
1 parent 3e4ed84 commit bdd85c9

File tree

3 files changed

+6
-31
lines changed

3 files changed

+6
-31
lines changed

src/GPU2D_OpenGL.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -860,17 +860,6 @@ void GLRenderer2D::UpdateScanlineConfig(int line)
860860
cfg.BGMosaicEnable[1] = false;
861861
}
862862

863-
if (GPU2D.Num == 1)
864-
{
865-
// hack
866-
cfg.BGOffset[2][0] = 0;
867-
cfg.BGOffset[2][1] = line << 8;
868-
cfg.BGRotscale[0][0] = 0x100;
869-
cfg.BGRotscale[0][1] = 0;
870-
cfg.BGRotscale[0][2] = 0;
871-
cfg.BGRotscale[0][3] = 0x100;
872-
}
873-
else
874863
if ((bgmode == 2) || (bgmode >= 4 && bgmode <= 6))
875864
{
876865
// rotscale layer
@@ -1196,13 +1185,6 @@ void GLRenderer2D::UpdateLayerConfig()
11961185
}
11971186
}
11981187

1199-
if (GPU2D.Num == 1 && mapoffset == 0x4000)
1200-
{
1201-
// HACK
1202-
capblock = 4<<2;
1203-
mapoffset = 0;
1204-
}
1205-
12061188
if (capblock != -1)
12071189
{
12081190
if (cfg.Size[0] == 128)

src/GPU_OpenGL.cpp

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ bool GLRenderer::Init()
163163
glGenTextures(1, &CaptureOutput256Tex);
164164
glBindTexture(GL_TEXTURE_2D_ARRAY, CaptureOutput256Tex);
165165
glTexParams(GL_TEXTURE_2D_ARRAY, GL_REPEAT);
166-
glGenFramebuffers(5, CaptureOutput256FB);
166+
glGenFramebuffers(4, CaptureOutput256FB);
167167

168168
glGenTextures(1, &CaptureOutput128Tex);
169169
glBindTexture(GL_TEXTURE_2D_ARRAY, CaptureOutput128Tex);
@@ -261,7 +261,9 @@ GLRenderer::~GLRenderer()
261261
delete[] AuxInputBuffer[1];
262262

263263
glDeleteTextures(1, &CaptureOutput256Tex);
264+
glDeleteFramebuffers(4, CaptureOutput256FB);
264265
glDeleteTextures(1, &CaptureOutput128Tex);
266+
glDeleteFramebuffers(16, CaptureOutput128FB);
265267
glDeleteTextures(1, &CaptureSyncTex);
266268
glDeleteFramebuffers(1, &CaptureSyncFB);
267269

@@ -344,9 +346,9 @@ void GLRenderer::SetScaleFactor(int scale)
344346
const GLenum fbassign2[] = {GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1};
345347

346348
glBindTexture(GL_TEXTURE_2D_ARRAY, CaptureOutput256Tex);
347-
glTexImage3D(GL_TEXTURE_2D_ARRAY, 0, GL_RGBA, 256*ScaleFactor, 256*ScaleFactor, 5, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
349+
glTexImage3D(GL_TEXTURE_2D_ARRAY, 0, GL_RGBA, 256*ScaleFactor, 256*ScaleFactor, 4, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
348350

349-
for (int i = 0; i < 5; i++)
351+
for (int i = 0; i < 4; i++)
350352
{
351353
glBindFramebuffer(GL_FRAMEBUFFER, CaptureOutput256FB[i]);
352354
glFramebufferTextureLayer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, CaptureOutput256Tex, 0, i);
@@ -723,15 +725,6 @@ void GLRenderer::DoCapture(int ystart, int yend)
723725
CaptureConfig.uSrcBColorFactor = 255.f;
724726
}
725727

726-
{
727-
// HACK
728-
glBindFramebuffer(GL_READ_FRAMEBUFFER, CaptureOutput256FB[srcBblock]);
729-
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, CaptureOutput256FB[4]);
730-
glBlitFramebuffer(0, 0, 256*ScaleFactor, 256*ScaleFactor,
731-
0, 0, 256*ScaleFactor, 256*ScaleFactor,
732-
GL_COLOR_BUFFER_BIT, GL_NEAREST);
733-
}
734-
735728
glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
736729
if (capsize == 0)
737730
{

src/GPU_OpenGL.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class GLRenderer : public Renderer
120120
GLuint CaptureVtxBuffer;
121121
GLuint CaptureVtxArray;
122122

123-
GLuint CaptureOutput256FB[5];
123+
GLuint CaptureOutput256FB[4];
124124
GLuint CaptureOutput256Tex;
125125
GLuint CaptureOutput128FB[16];
126126
GLuint CaptureOutput128Tex;

0 commit comments

Comments
 (0)