Fixed it,
Code:
Vector3(void):x(0.0f),y(0.0f),z(0.0f) {}
Vector3(float vx,float vy,float vz):x(vx),y(vy),z(vz) {}
two more errors
Code:
--------------------Configuration: NeHeGL - Win32 Debug--------------------
Compiling...
Example.cpp
c:\documents and settings\jonathan\my documents\nehegl\vertexbuffer.h(111) : error C2065: 'sqrt' : undeclared identifier
c:\documents and settings\jonathan\my documents\nehegl\vertexbuffer.h(111) : error C2065: 'Length' : undeclared identifier
Error executing cl.exe.
NeHeGL.exe - 2 error(s), 0 warning(s)
Are we missing a math file? or is something just not declaring correctly?
Included math.h, got rid of the sqrt problem, but Length is still unidentified, moving on...
Ahhh, length, not Length...
teehee, lots of lil screwups here and there, i feel almighty debugging bubba's code
Code:
--------------------Configuration: NeHeGL - Win32 Debug--------------------
Compiling...
Example.cpp
c:\documents and settings\jonathan\my documents\nehegl\vertexbuffer.h(111) : warning C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data
c:\documents and settings\jonathan\my documents\nehegl\vertexbuffer.h(145) : error C2065: '_specular' : undeclared identifier
c:\documents and settings\jonathan\my documents\nehegl\vertexbuffer.h(146) : error C2065: '_tv' : undeclared identifier
c:\documents and settings\jonathan\my documents\nehegl\vertexbuffer.h(146) : warning C4244: 'initializing' : conversion from 'int' to 'float', possible loss of data
Error executing cl.exe.
NeHeGL.exe - 2 error(s), 2 warning(s)
Bugs are now right here --->
Code:
struct Vertex3D
{
Vector3 Model;
Vector3 World;
Vector3 View;
Vector3 Pos;
DWORD Diffuse;
DWORD Specular;
float tu,tv;
Vertex3D(void):Model(Vector3(0.0f,0.0f,0.0f)),
World(Vector3(0.0f,0.0f,0.0f)),
View(Vector3(0.0f,0.0f,0.0f)),
Pos(Vector3(0.0f,0.0f,0.0f)),
Diffuse(0),
Specular(0),
tu(0.0f),
tv(0.0f) {}
Vertex3D(Vector3 _pos,DWORD _diffuse=0,DWORD Specular=0,
float _tu=0.0f,float tv=0.0f):Pos(_pos),
Diffuse (_diffuse),Specular(_specular),tu(_tu),
tv(_tv) {}
};
Workin on it...