mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
- fixed size of texture arrays.
We need 6 slots, not 5.
This commit is contained in:
parent
b6862cfd70
commit
9e7f91b5ac
4 changed files with 9 additions and 8 deletions
|
@ -479,7 +479,7 @@ bool M_SetMenu(FName menu, int param, FName caller)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
case NAME_CustomSubMenu1:
|
case NAME_CustomSubMenu1:
|
||||||
menu = ENamedName(menu + param);
|
menu = ENamedName(menu.GetIndex() + param);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
|
@ -75,7 +75,7 @@ struct PolymostRenderState
|
||||||
PalEntry ClearColor = 0;
|
PalEntry ClearColor = 0;
|
||||||
short vp_x, vp_y, vp_w, vp_h;
|
short vp_x, vp_y, vp_w, vp_h;
|
||||||
short sc_x = SHRT_MIN, sc_y, sc_w, sc_h;
|
short sc_x = SHRT_MIN, sc_y, sc_w, sc_h;
|
||||||
int texIds[5], samplerIds[5];
|
int texIds[6], samplerIds[6];
|
||||||
|
|
||||||
PalEntry FogColor;
|
PalEntry FogColor;
|
||||||
|
|
||||||
|
|
|
@ -349,7 +349,7 @@ void GLInstance::DrawImGui(ImDrawData* data)
|
||||||
void PolymostRenderState::Apply(PolymostShader* shader, GLState &oldState)
|
void PolymostRenderState::Apply(PolymostShader* shader, GLState &oldState)
|
||||||
{
|
{
|
||||||
bool reset = false;
|
bool reset = false;
|
||||||
for (int i = 0; i < 5; i++)
|
for (int i = 0; i < MAX_TEXTURES; i++)
|
||||||
{
|
{
|
||||||
if (texIds[i] != oldState.TexId[i] || samplerIds[i] != oldState.SamplerId[i])
|
if (texIds[i] != oldState.TexId[i] || samplerIds[i] != oldState.SamplerId[i])
|
||||||
{
|
{
|
||||||
|
|
|
@ -165,20 +165,21 @@ struct ImDrawData;
|
||||||
struct palette_t;
|
struct palette_t;
|
||||||
extern float shadediv[256];
|
extern float shadediv[256];
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
MAX_TEXTURES = 6, /*15*/ // slot 15 is used internally and not available. - The renderer uses only 5, though.
|
||||||
|
};
|
||||||
|
|
||||||
struct GLState
|
struct GLState
|
||||||
{
|
{
|
||||||
int Flags = STF_COLORMASK | STF_DEPTHMASK;
|
int Flags = STF_COLORMASK | STF_DEPTHMASK;
|
||||||
FRenderStyle Style{};
|
FRenderStyle Style{};
|
||||||
int DepthFunc = -1;
|
int DepthFunc = -1;
|
||||||
int TexId[5] = {}, SamplerId[5] = {};
|
int TexId[MAX_TEXTURES] = {}, SamplerId[MAX_TEXTURES] = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
class GLInstance
|
class GLInstance
|
||||||
{
|
{
|
||||||
enum
|
|
||||||
{
|
|
||||||
MAX_TEXTURES = 5, /*15*/ // slot 15 is used internally and not available. - The renderer uses only 5, though.
|
|
||||||
};
|
|
||||||
std::vector<BaseVertex> Buffer; // cheap-ass implementation. The primary purpose is to get the GL accesses out of polymost.cpp, not writing something performant right away.
|
std::vector<BaseVertex> Buffer; // cheap-ass implementation. The primary purpose is to get the GL accesses out of polymost.cpp, not writing something performant right away.
|
||||||
int maxTextureSize;
|
int maxTextureSize;
|
||||||
PaletteManager palmanager;
|
PaletteManager palmanager;
|
||||||
|
|
Loading…
Reference in a new issue