Commit a5a26630 authored by lukeph's avatar lukeph

-added a linux codeblocks project file (may have some unnecessary includes right now)

-stopped wal image loader trying to load (and crashing on) every unknown image file

-fixed bug with hybrid's offsets, in the vbos. btw the offsets really needs to be changed back to my method with plain casts (I cannot see a problem there), or use the offsetOf macro.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1114 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 1671a7b4
......@@ -61,7 +61,7 @@ bool CImageLoaderWAL::isALoadableFileExtension(const c8* fileName) const
bool CImageLoaderWAL::isALoadableFileFormat(irr::io::IReadFile* file) const
{
return (file!=0);
return (file!=0 && isALoadableFileExtension(file->getFileName())); //seems better not to always blindly load this format for now (todo: add header check)
}
......@@ -134,3 +134,4 @@ IImageLoader* createImageLoaderWAL()
}
}
......@@ -890,7 +890,7 @@ void COpenGLDriver::drawVertexPrimitiveList(const void* vertices, u32 vertexCoun
if (vertices)
glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertex2TCoords), &(reinterpret_cast<const S3DVertex2TCoords*>(vertices))[0].TCoords2);
else
glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertex2TCoords), (u8*)0 + 34);
glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertex2TCoords), (u8*)0 + 36);
}
break;
case EVT_TANGENTS:
......@@ -915,14 +915,14 @@ void COpenGLDriver::drawVertexPrimitiveList(const void* vertices, u32 vertexCoun
if (vertices)
glTexCoordPointer(3, GL_FLOAT, sizeof(S3DVertexTangents), &(reinterpret_cast<const S3DVertexTangents*>(vertices))[0].Tangent);
else
glTexCoordPointer(3, GL_FLOAT, sizeof(S3DVertexTangents), (u8*)0 + 34);
glTexCoordPointer(3, GL_FLOAT, sizeof(S3DVertexTangents), (u8*)0 + 36);
extGlClientActiveTexture(GL_TEXTURE2_ARB);
glEnableClientState ( GL_TEXTURE_COORD_ARRAY );
if (vertices)
glTexCoordPointer(3, GL_FLOAT, sizeof(S3DVertexTangents), &(reinterpret_cast<const S3DVertexTangents*>(vertices))[0].Binormal);
else
glTexCoordPointer(3, GL_FLOAT, sizeof(S3DVertexTangents), (u8*)0 + 46);
glTexCoordPointer(3, GL_FLOAT, sizeof(S3DVertexTangents), (u8*)0 + 48);
}
break;
}
......@@ -2734,3 +2734,4 @@ IVideoDriver* createOpenGLDriver(const core::dimension2d<s32>& screenSize,
#endif // _IRR_COMPILE_WITH_OPENGL_
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment