#ifndef GEOMETRYINTERFACE_D3D9_H #define GEOMETRYINTERFACE_D3D9_H #include "common.h" #include "renderer.h" #if defined(__WIN32__)||defined(WIN32)||defined(_MSC_VER) // geometry interface only for use internally, though some may find it useful. // copy away! class GeometryInterfaceD3D9 { private: int flags; // the indices flag will be ignored int fvf; unsigned int numtextures; unsigned int norm_offset; unsigned int tex_offset; unsigned int color_offset; unsigned int vertptr; unsigned int vertsize; // depends on the elements of vertices here char *verts; bool is_valid; public: GeometryInterfaceD3D9(int flags=RAVEN_GEOMETRY_FLAG_VERTICES,unsigned int numtextures=1); ~GeometryInterfaceD3D9(); bool IsValid() {return is_valid;} void SetColor(const Vector4 &color); void SetNormal(const Vector3 &norm); void SetTexCoords(const Vector2 &tc,int idx); void SetVertex(const Vector3 &vert); void AdvancePtr(); bool RenderPrimitives(GeometryType geomtype,LPDIRECT3DDEVICE9 dev); }; #endif #endif