forked from speed-dreams/speed-dreams-code
Fixes #439 Added checks for null pointers ; don't know why this occurs only with mp10-agl-kart
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@3855 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 03a0451de50584b4f3a8762081780680e4ae83e8 Former-commit-id: e057789c02ec71eee18c727b1656f833dcf00570
This commit is contained in:
parent
e5e36574ab
commit
eeb6a61dc8
1 changed files with 9 additions and 4 deletions
|
@ -128,7 +128,8 @@ grVtxTable::grVtxTable (GLenum ty, ssgVertexArray *vl,
|
||||||
ssgColourArray *cl,
|
ssgColourArray *cl,
|
||||||
int _indexCar) : ssgVtxTable(ty, vl, nl, tl, cl)
|
int _indexCar) : ssgVtxTable(ty, vl, nl, tl, cl)
|
||||||
{
|
{
|
||||||
//GfLogDebug("grVtxTable::grVtxTable(ARRAY, nml=%d, ml=%d)\n", _numMapLevel, _mapLevel);
|
//GfLogDebug("grVtxTable::grVtxTable(ARRAY, nml=%d, ml=%d, tl1=%p)\n",
|
||||||
|
// _numMapLevel, _mapLevel, tl1);
|
||||||
|
|
||||||
type = ssgTypeVtxTable();
|
type = ssgTypeVtxTable();
|
||||||
numMapLevel = _numMapLevel;
|
numMapLevel = _numMapLevel;
|
||||||
|
@ -161,7 +162,8 @@ grVtxTable::grVtxTable (GLenum ty, ssgVertexArray *vl,
|
||||||
ssgColourArray *cl,
|
ssgColourArray *cl,
|
||||||
int _indexCar) : ssgVtxTable(ty, vl, nl, tl, cl)
|
int _indexCar) : ssgVtxTable(ty, vl, nl, tl, cl)
|
||||||
{
|
{
|
||||||
//GfLogDebug("grVtxTable::grVtxTable(TABLE, nml=%d, ml=%d)\n", _numMapLevel, _mapLevel);
|
//GfLogDebug("grVtxTable::grVtxTable(TABLE, nml=%d, ml=%d, tl1=%p)\n",
|
||||||
|
// _numMapLevel, _mapLevel, tl1);
|
||||||
|
|
||||||
type = ssgTypeVtxTable ();
|
type = ssgTypeVtxTable ();
|
||||||
numMapLevel = _numMapLevel;
|
numMapLevel = _numMapLevel;
|
||||||
|
@ -415,10 +417,13 @@ void grVtxTable::draw_geometry_for_a_car ()
|
||||||
|
|
||||||
if (num_texcoords > 1) {
|
if (num_texcoords > 1) {
|
||||||
glMultiTexCoord2fvARB(GL_TEXTURE0_ARB, tx[i]);
|
glMultiTexCoord2fvARB(GL_TEXTURE0_ARB, tx[i]);
|
||||||
if (mapLevelBitmap <= LEVELC2) {
|
// #439 : Seel below : test tx2 in any case ...
|
||||||
|
if (tx2 && mapLevelBitmap <= LEVELC2) {
|
||||||
glMultiTexCoord2fvARB(GL_TEXTURE2_ARB, tx2[i]);
|
glMultiTexCoord2fvARB(GL_TEXTURE2_ARB, tx2[i]);
|
||||||
}
|
}
|
||||||
glMultiTexCoord2fvARB(GL_TEXTURE1_ARB, tx1[i]);
|
// #439 : Don't know why, but sometimes (agl-kart), tx1=0
|
||||||
|
if (tx1)
|
||||||
|
glMultiTexCoord2fvARB(GL_TEXTURE1_ARB, tx1[i]);
|
||||||
}
|
}
|
||||||
glVertex3fv(vx[i]);
|
glVertex3fv(vx[i]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue