mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-22 05:45:38 +00:00
Use proper texture wrapping mode for 2d. Stops garbage down the top and left sides. Should really use NPOT texture.
This commit is contained in:
parent
736f5ab958
commit
c7412828d4
|
@ -62,7 +62,7 @@ x------- -------- -------- -------- Alpha testing / contour
|
|||
-------- -------- -----x-- -------- Texture enable
|
||||
-------- -------- ------xx x------- Texture format
|
||||
-------- -------- -------- -------x Alpha enable ?
|
||||
-------- ------x - ------- -------- Never seen set ?
|
||||
-------- ------x- -------- -------- Never seen set ?
|
||||
-------- -------- -------- -----xx- Always set ?
|
||||
-------- -------- -------- -xxxx--- ?
|
||||
*/
|
||||
|
|
|
@ -797,8 +797,8 @@ bool CRender2D::Init(unsigned xOffset, unsigned yOffset, unsigned xRes, unsigned
|
|||
{
|
||||
glActiveTexture(GL_TEXTURE0); // texture unit 0
|
||||
glBindTexture(GL_TEXTURE_2D, texID[i]);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 512, 512, 0, GL_RGBA, GL_UNSIGNED_BYTE, surfTop);
|
||||
|
|
Loading…
Reference in a new issue