rtoumazet / saturnin

Saturnin is a Sega Saturn emulator
Apache License 2.0
2 stars 0 forks source link

Handle textures with texture arrays in modern OpenGL. #247

Closed rtoumazet closed 1 year ago

rtoumazet commented 2 years ago
rtoumazet commented 2 years ago

Number of array level is limited by GL_MAX_ARRAY_TEXTURE_LAYERS. Number is at least 2048 in OpengL 4.6, and at least 256 in OpenGL 3.0

rtoumazet commented 2 years ago

Textures are generated in a 256 layers texture array (minimum for OpenGL 3.3), each layer being a texture atlas of 512x256 pixels. In theory, the maximum number of different VDP2 cells that could be stored by the Saturn at a given time is 0x80000 (ie both RBG at maximum size, with every cell different). Maximum VDP1 texture size is 504x255.

rtoumazet commented 1 year ago

Implemented as 512*512 texture array