• Advertisement
Sign in to follow this  

Sample Framework is out of work

This topic is 4687 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello,everybody I use DirectX9 Sample Browser to installe a EmptyProject as CartoonShade,and then add a class called CCartoonMesh to it(without modify the code generated by VS.NET2003).But each time I try to compile the project, VS.NET2003 report error : e:\Cpp\Samples\CartoonShader\CCartoonMesh.cpp(31): fatal error C1010: ... Here is my code added //CCartoonMesh.h #pragma once #ifndef CCARTOONMESH_H #define CCARTOONMESH_H #include <Windows.h> #include <d3d9.h> class CCartoonMesh { public: CCartoonMesh(void); CCartoonMesh(char *szXFileName,char *szTextureFileName); ~CCartoonMesh(void); void Cleanup(void); private: IDirect3DVertexBuffer9 *pVBModelVShape; IDirect3DIndexBuffer9 *pIBModelVShape; }; #endif //CCartoonMesh.cpp #include "CCartoonMesh.h" CCartoonMesh::CCartoonMesh() { } CCartoonMesh::CCartoonMesh(char *szXFileName,char *szTextureFileName) { pVBModelVShape = NULL; pIBModelVShape = NULL; } CCartoonMesh::~CCartoonMesh() { Cleanup(); } void CCartoonMesh::Cleanup() { if ( pVBModelVShape != NULL) { pVBModelVShape->Release(); pVBModelVShape = NULL; } if( pIBModelVShape != NULL) { pIBModelVShape->Release(); pIBModelVShape = NULL; } }

Share this post


Link to post
Share on other sites
Advertisement
The new sample framework has changed from ASCII so you have to change as well to use it. It also marks all the unsafe string operations like sprintf etc. so you get a load of warnings - time to learn to use Unicode :(

Share this post


Link to post
Share on other sites
They should attach more information on replacement functions and such if they're going fully unicode.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement