Commit c65379e7 authored by hybrid's avatar hybrid

Minor changes.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1331 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 1884d756
......@@ -266,6 +266,3 @@ public:
#endif
......@@ -2,8 +2,8 @@
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __C_GUI_ENVIRNMENT_H_INCLUDED__
#define __C_GUI_ENVIRNMENT_H_INCLUDED__
#ifndef __C_GUI_ENVIRONMENT_H_INCLUDED__
#define __C_GUI_ENVIRONMENT_H_INCLUDED__
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_GUI_
......@@ -294,6 +294,6 @@ private:
#endif // _IRR_COMPILE_WITH_GUI_
#endif // __C_GUI_ENVIRNMENT_H_INCLUDED__
#endif // __C_GUI_ENVIRONMENT_H_INCLUDED__
......@@ -70,10 +70,12 @@ IImage* CImageLoaderWAL::loadImage(irr::io::IReadFile* file) const
// Try to get the color palette from elsewhere (usually in a pak along with the WAL).
// If this fails we use the DefaultPaletteQ2.
static s32 * palette = 0;
#if TRY_LOADING_PALETTE_FROM_FILE
s32 loadedPalette[256];
#endif
if (!palette)
{
#if TRY_LOADING_PALETTE_FROM_FILE
s32 loadedPalette[256];
IImage * paletteImage;
// Look in a couple different places...
paletteImage = createImageFromFile("pics/colormap.pcx");
......
......@@ -1034,7 +1034,6 @@ s32 CMeshManipulator::getPolyCount(scene::IMesh* mesh) const
}
//! Returns amount of polygons in mesh.
s32 CMeshManipulator::getPolyCount(scene::IAnimatedMesh* mesh) const
{
......@@ -1044,6 +1043,7 @@ s32 CMeshManipulator::getPolyCount(scene::IAnimatedMesh* mesh) const
return 0;
}
//! create a new AnimatedMesh and adds the mesh to it
IAnimatedMesh * CMeshManipulator::createAnimatedMesh(scene::IMesh* mesh, scene::E_ANIMATED_MESH_TYPE type) const
{
......
......@@ -539,12 +539,12 @@ bool COpenGLDriver::updateVertexHardwareBuffer(SHWBufferLink_opengl *HWBuffer)
core::array<c8> buffer(vertexSize * vertexCount);
memcpy(buffer.pointer(), vertices, vertexSize * vertexCount);
// in order to convert the colours into opengl format (RGBA)
// in order to convert the colors into opengl format (RGBA)
switch (vType)
{
case EVT_STANDARD:
{
const S3DVertex* pb = reinterpret_cast<const S3DVertex*>(buffer.pointer());
S3DVertex* pb = reinterpret_cast<S3DVertex*>(buffer.pointer());
const S3DVertex* po = reinterpret_cast<const S3DVertex*>(vertices);
for (u32 i=0; i<vertexCount; i++)
{
......@@ -554,7 +554,7 @@ bool COpenGLDriver::updateVertexHardwareBuffer(SHWBufferLink_opengl *HWBuffer)
break;
case EVT_2TCOORDS:
{
const S3DVertex2TCoords* pb = reinterpret_cast<const S3DVertex2TCoords*>(buffer.pointer());
S3DVertex2TCoords* pb = reinterpret_cast<S3DVertex2TCoords*>(buffer.pointer());
const S3DVertex2TCoords* po = reinterpret_cast<const S3DVertex2TCoords*>(vertices);
for (u32 i=0; i<vertexCount; i++)
{
......@@ -564,7 +564,7 @@ bool COpenGLDriver::updateVertexHardwareBuffer(SHWBufferLink_opengl *HWBuffer)
break;
case EVT_TANGENTS:
{
const S3DVertexTangents* pb = reinterpret_cast<const S3DVertexTangents*>(buffer.pointer());
S3DVertexTangents* pb = reinterpret_cast<S3DVertexTangents*>(buffer.pointer());
const S3DVertexTangents* po = reinterpret_cast<const S3DVertexTangents*>(vertices);
for (u32 i=0; i<vertexCount; i++)
{
......
......@@ -113,10 +113,10 @@ namespace video
SHWBufferLink_opengl(const scene::IMeshBuffer *_MeshBuffer): SHWBufferLink(_MeshBuffer), vbo_verticesID(0),vbo_indicesID(0){}
GLuint vbo_verticesID; //tmp
GLuint vbo_indicesID; //tmp
GLuint vbo_verticesSize; //tmp
GLuint vbo_indicesSize; //tmp
GLuint vbo_indicesID; //tmp
GLuint vbo_verticesSize; //tmp
GLuint vbo_indicesSize; //tmp
};
......
......@@ -971,12 +971,14 @@ inline f32 CQ3LevelMesh::Blend( const f64 s[3], const f64 t[3], const tBSPVertex
f64 res = 0.0;
f32 *ptr;
for( int i=0; i<3; i++ )
for( int j=0; j<3; j++ )
for( int i=0; i<3; ++i )
{
for( int j=0; j<3; ++j )
{
ptr = (f32 *)( (char*)v[i*3+j] + offset );
res += s[i] * t[j] * (*ptr);
}
}
return (f32) res;
}
......
......@@ -817,6 +817,19 @@ bool CXMeshFileLoader::parseDataObjectMesh(SXMesh &mesh)
return false;
}
else
if (objectName == "DeclData")
{
// arbitrary vertex attributes
// first comes the number of element definitions
// then the vertex element type definitions
// with format type;tesselator;semantics;usageindex
// we want to support 2;0;6;0 == tangent
// 2;0;7;0 == binormal
// and 1/2;0;5;1 == 2nd uv coord
if (!parseUnknownDataObject())
return false;
}
else
if (objectName == "XSkinMeshHeader")
{
if (!parseDataObjectSkinMeshHeader(mesh))
......
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