This commit is contained in:
Subv 2015-08-16 22:46:24 -05:00
parent bb772870d5
commit bda2234553
3 changed files with 7 additions and 4 deletions

View file

@ -50,7 +50,10 @@ typedef double f64; ///< 64-bit floating point
typedef u32 VAddr; ///< Represents a pointer in the userspace virtual address space.
typedef u32 PAddr; ///< Represents a pointer in the ARM11 physical address space.
// A 24-bit storage datatype to make working with data of this size (e.g. RGB8 textures) easier. Not intended for usage in arithmetic.
/**
* A 24-bit storage datatype to make working with data of this size (e.g. RGB8 textures) easier.
* Not intended for usage in arithmetic.
*/
struct u24_be {
u8 components[3];
};

View file

@ -102,10 +102,9 @@ void RasterizerOpenGL::InitObjects() {
glEnableVertexAttribArray(attrib_texcoords + 1);
glEnableVertexAttribArray(attrib_texcoords + 2);
// Create textures for OGL framebuffer that will be rendered to, initially 8x8 to succeed in framebuffer creation
// 3DS textures' width and height must be multiples of 8
// Create textures for OGL framebuffer that will be rendered to, initially 1x1 to succeed in framebuffer creation
fb_color_texture.texture.Create();
ReconfigureColorTexture(fb_color_texture, Pica::Regs::ColorFormat::RGBA8, 8, 8);
ReconfigureColorTexture(fb_color_texture, Pica::Regs::ColorFormat::RGBA8, 1, 1);
state.texture_units[0].texture_2d = fb_color_texture.texture.handle;
state.Apply();

View file

@ -77,4 +77,5 @@ void CopyTextureAndUntile(const T* src, T* dst, unsigned int width, unsigned int
template void CopyTextureAndUntile<u16>(const u16* src, u16* dst, unsigned int width, unsigned int height);
template void CopyTextureAndUntile<u24_be>(const u24_be* src, u24_be* dst, unsigned int width, unsigned int height);
template void CopyTextureAndUntile<u32>(const u32* src, u32* dst, unsigned int width, unsigned int height);
} // namespace