mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 19:20:46 +00:00
- fixed voxel rendering.
Still need to move the voxel textures into the texture manager but at least they render properly again.
This commit is contained in:
parent
00d59459a1
commit
00630f728f
2 changed files with 6 additions and 5 deletions
|
@ -189,6 +189,7 @@ struct voxmodel_t : public mdmodel_t
|
||||||
vec3_t siz;
|
vec3_t siz;
|
||||||
vec3f_t piv;
|
vec3f_t piv;
|
||||||
int32_t is8bit;
|
int32_t is8bit;
|
||||||
|
FHardwareTexture* texid[256] = { 0 };
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -46,9 +46,9 @@ FHardwareTexture *gloadtex(const int32_t *picbuf, int32_t xsiz, int32_t ysiz, in
|
||||||
{
|
{
|
||||||
for (bssize_t i=xsiz*ysiz-1; i>=0; i--)
|
for (bssize_t i=xsiz*ysiz-1; i>=0; i--)
|
||||||
{
|
{
|
||||||
pic2[i].b = pic[i].r;
|
pic2[i].r = pic[i].r;
|
||||||
pic2[i].g = pic[i].g;
|
pic2[i].g = pic[i].g;
|
||||||
pic2[i].r = pic[i].b;
|
pic2[i].b = pic[i].b;
|
||||||
pic2[i].a = 255;
|
pic2[i].a = 255;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -61,9 +61,9 @@ FHardwareTexture *gloadtex(const int32_t *picbuf, int32_t xsiz, int32_t ysiz, in
|
||||||
{
|
{
|
||||||
const int32_t ii = palookup[dapal][pic[i].a];
|
const int32_t ii = palookup[dapal][pic[i].a];
|
||||||
|
|
||||||
pic2[i].r = curpalette[ii].b;
|
pic2[i].r = curpalette[ii].r;
|
||||||
pic2[i].g = curpalette[ii].g;
|
pic2[i].g = curpalette[ii].g;
|
||||||
pic2[i].b = curpalette[ii].r;
|
pic2[i].b = curpalette[ii].b;
|
||||||
pic2[i].a = 255;
|
pic2[i].a = 255;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1128,7 +1128,7 @@ int32_t polymost_voxdraw(voxmodel_t *m, tspriteptr_t const tspr)
|
||||||
|
|
||||||
int prevClamp = GLInterface.GetClamp();
|
int prevClamp = GLInterface.GetClamp();
|
||||||
GLInterface.SetClamp(0);
|
GLInterface.SetClamp(0);
|
||||||
#if 0
|
#if 1
|
||||||
if (!m->texid[globalpal])
|
if (!m->texid[globalpal])
|
||||||
m->texid[globalpal] = gloadtex(m->mytex, m->mytexx, m->mytexy, m->is8bit, globalpal);
|
m->texid[globalpal] = gloadtex(m->mytex, m->mytexx, m->mytexy, m->is8bit, globalpal);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue