mirror of https://github.com/PCSX2/pcsx2.git
GregMiscellaneous: zzogl-pg:
* replace magic number with a symbolic name * Remove 16 bits texture survivors. git-svn-id: http://pcsx2.googlecode.com/svn/branches/GregMiscellaneous@3781 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
6ff8e61ef7
commit
5d75ab97cb
|
@ -17,13 +17,13 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef ZZOGLCRTC_H_INCLUDED
|
#ifndef ZZOGLCRTC_H_INCLUDED
|
||||||
#define ZZOGLCRTC_H_INCLUDED
|
#define ZZOGLCRTC_H_INCLUDED
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "zerogs.h"
|
#include "zerogs.h"
|
||||||
#include "targets.h"
|
#include "targets.h"
|
||||||
|
|
||||||
#define INTERLACE_COUNT (bInterlace && interlace == (conf.interlace))
|
#define INTERLACE_COUNT (bInterlace && interlace == (conf.interlace))
|
||||||
|
|
||||||
|
@ -89,12 +89,12 @@ inline u32 CreateInterlaceTex(int width)
|
||||||
|
|
||||||
glGenTextures(1, &s_ptexInterlace);
|
glGenTextures(1, &s_ptexInterlace);
|
||||||
glBindTexture(GL_TEXTURE_RECTANGLE_NV, s_ptexInterlace);
|
glBindTexture(GL_TEXTURE_RECTANGLE_NV, s_ptexInterlace);
|
||||||
TextureRect(4, width, 1, GL_RGBA, GL_UNSIGNED_BYTE, &data[0]);
|
TextureRect(GL_RGBA, width, 1, GL_RGBA, GL_UNSIGNED_BYTE, &data[0]);
|
||||||
setRectFilters(GL_NEAREST);
|
setRectFilters(GL_NEAREST);
|
||||||
GL_REPORT_ERRORD();
|
GL_REPORT_ERRORD();
|
||||||
|
|
||||||
return s_ptexInterlace;
|
return s_ptexInterlace;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // ZZOGLCRTC_H_INCLUDED
|
#endif // ZZOGLCRTC_H_INCLUDED
|
||||||
|
|
|
@ -558,7 +558,7 @@ bool ZeroGS::Create(int _width, int _height)
|
||||||
PBITMAPINFO pinfo = (PBITMAPINFO)LockResource(hBitmapGlob);
|
PBITMAPINFO pinfo = (PBITMAPINFO)LockResource(hBitmapGlob);
|
||||||
|
|
||||||
GLenum tempFmt = (pinfo->bmiHeader.biBitCount == 32) ? GL_RGBA : GL_RGB;
|
GLenum tempFmt = (pinfo->bmiHeader.biBitCount == 32) ? GL_RGBA : GL_RGB;
|
||||||
TextureRect(4, pinfo->bmiHeader.biWidth, pinfo->bmiHeader.biHeight, tempFmt, GL_UNSIGNED_BYTE, (u8*)pinfo + pinfo->bmiHeader.biSize);
|
TextureRect(GL_RGBA, pinfo->bmiHeader.biWidth, pinfo->bmiHeader.biHeight, tempFmt, GL_UNSIGNED_BYTE, (u8*)pinfo + pinfo->bmiHeader.biSize);
|
||||||
|
|
||||||
nLogoWidth = pinfo->bmiHeader.biWidth;
|
nLogoWidth = pinfo->bmiHeader.biWidth;
|
||||||
nLogoHeight = pinfo->bmiHeader.biHeight;
|
nLogoHeight = pinfo->bmiHeader.biHeight;
|
||||||
|
|
|
@ -94,7 +94,7 @@ inline bool ZeroGS::CRenderTarget::InitialiseDefaultTexture(u32 *ptr_p, int fbw,
|
||||||
glBindTexture(GL_TEXTURE_RECTANGLE_NV, *ptr_p);
|
glBindTexture(GL_TEXTURE_RECTANGLE_NV, *ptr_p);
|
||||||
|
|
||||||
// initialize to default
|
// initialize to default
|
||||||
TextureRect(4, fbw, fbh, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
|
TextureRect(GL_RGBA, fbw, fbh, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
|
||||||
|
|
||||||
setRectWrap(GL_CLAMP);
|
setRectWrap(GL_CLAMP);
|
||||||
setRectFilters(GL_LINEAR);
|
setRectFilters(GL_LINEAR);
|
||||||
|
@ -2299,7 +2299,7 @@ ZeroGS::CMemoryTarget* ZeroGS::CMemoryTargetMngr::GetMemoryTarget(const tex0Info
|
||||||
glBindTexture(GL_TEXTURE_RECTANGLE_NV, targ->ptex->tex);
|
glBindTexture(GL_TEXTURE_RECTANGLE_NV, targ->ptex->tex);
|
||||||
|
|
||||||
if (fmt == GL_UNSIGNED_BYTE)
|
if (fmt == GL_UNSIGNED_BYTE)
|
||||||
TextureRect(4, texW, texH, GL_RGBA, fmt, ptexdata);
|
TextureRect(GL_RGBA, texW, texH, GL_RGBA, fmt, ptexdata);
|
||||||
else
|
else
|
||||||
TextureRect(GL_RGB5_A1, texW, texH, GL_RGBA, fmt, ptexdata);
|
TextureRect(GL_RGB5_A1, texW, texH, GL_RGBA, fmt, ptexdata);
|
||||||
|
|
||||||
|
@ -2324,7 +2324,7 @@ ZeroGS::CMemoryTarget* ZeroGS::CMemoryTargetMngr::GetMemoryTarget(const tex0Info
|
||||||
DestroyOldest();
|
DestroyOldest();
|
||||||
}
|
}
|
||||||
|
|
||||||
TextureRect(4, texW, texH, GL_RGBA, fmt, ptexdata);
|
TextureRect(GL_RGBA, texW, texH, GL_RGBA, fmt, ptexdata);
|
||||||
}
|
}
|
||||||
|
|
||||||
setRectWrap(GL_CLAMP);
|
setRectWrap(GL_CLAMP);
|
||||||
|
|
|
@ -97,12 +97,6 @@ namespace ZeroGS
|
||||||
|
|
||||||
typedef void (*DrawFn)();
|
typedef void (*DrawFn)();
|
||||||
|
|
||||||
enum RenderFormatType
|
|
||||||
{
|
|
||||||
RFT_byte8 = 0, // A8R8G8B8
|
|
||||||
RFT_float16 = 1, // A32R32B32G32
|
|
||||||
};
|
|
||||||
|
|
||||||
// managers render-to-texture targets
|
// managers render-to-texture targets
|
||||||
|
|
||||||
class CRenderTarget
|
class CRenderTarget
|
||||||
|
|
Loading…
Reference in New Issue