Search found 110 matches

by IrrNoob
Mon Jan 12, 2009 5:49 am
Forum: Beginners Help
Topic: Need Help With Vertex Buffer
Replies: 20
Views: 1238

Ok, heres what I have so far: #include <irrlicht.h> #include <SPE.h> #include <iostream> #pragma comment(lib, "Irrlicht.lib") #pragma comment(lib, "SPE.lib") using namespace irr; using namespace core; using namespace scene; using namespace video; using namespace io; using namespa...
by IrrNoob
Mon Jan 12, 2009 4:42 am
Forum: Beginners Help
Topic: Need Help With Vertex Buffer
Replies: 20
Views: 1238

I'm sorry if this is a dumb question, but what is pMesh in InitShape()? because in the first samples of SPE, pMesh is a LPSPERIGIDBODY. At the moment I get a error about that. The call to pmesh->getIndexType() == EIT_32BIT means that its pmesh is a member of IMeshBuffer, right? oh, and I see were I ...
by IrrNoob
Mon Jan 12, 2009 3:53 am
Forum: Beginners Help
Topic: Need Help With Vertex Buffer
Replies: 20
Views: 1238

I see your point. I changed it to that. Oh, the documents for SPE are helpful, but all of the examples are done in Directx, and I do not understand directx library. The information I got about Initialize() was taken from that documents page. But I'm getting an error here: vb [used_vertices].x = pv->...
by IrrNoob
Mon Jan 12, 2009 2:37 am
Forum: Beginners Help
Topic: Need Help With Vertex Buffer
Replies: 20
Views: 1238

Okay I'm getting an error with: LPSPESHAPE pShape = pWorld->CreateShape(); SPE_Initialize (pShape, mesh); And this message: error C2664: 'SPE_Initialize' : cannot convert parameter 1 from 'LPSPESHAPE' to 'LPSPESHAPE *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cas...
by IrrNoob
Mon Jan 12, 2009 1:08 am
Forum: Beginners Help
Topic: Need Help With Vertex Buffer
Replies: 20
Views: 1238

You're the King Vitek 8) Thanks for the big help. I'm going to try to read over your posts a couple times more before I try to work with it. I'll let you know how it turns out. LPSPESHAPE is the class of Initialize(), so I just replace 'thing' with LPSPESHAPE pShape->Initialize(). You are saying tha...
by IrrNoob
Sun Jan 11, 2009 9:21 pm
Forum: Beginners Help
Topic: Need Help With Vertex Buffer
Replies: 20
Views: 1238

Ok, will do: ((video::S3DVertex*)v)[0]; I thought this would take 'v', which i believe is a pointer to the vertices in the mesh buffer, and convert its value to S3DVertex*, while the '[0]' is to point to the first vertex in the buffer. vb = (int)v; This code was introduced by myself :oops: to conver...
by IrrNoob
Sun Jan 11, 2009 5:19 am
Forum: Beginners Help
Topic: Need Help With Vertex Buffer
Replies: 20
Views: 1238

Ok, I was thinking it worked because the compiler wasn't complaining and the program ran without crashing, but I now I see that it doesn't What I want is to do is feed the pointers pVertex and pIndex into this function: virtual SPERESULT Initialize(BYTE *pVertex, int StrideSize, int *pIndex, int Num...
by IrrNoob
Sun Jan 11, 2009 3:33 am
Forum: Beginners Help
Topic: Need Help With Vertex Buffer
Replies: 20
Views: 1238

What you need to do is cast that pointer to a vertex pointer of the correct type. The interface has a method that gives the vertex type so you know the type you need to cast to. ... You can look at CMeshManipulator.cpp for examples. Travis I looked through CMeshManipulator.cpp and found void CMeshM...
by IrrNoob
Sat Jan 10, 2009 10:33 pm
Forum: Beginners Help
Topic: Need Help With Vertex Buffer
Replies: 20
Views: 1238

Need Help With Vertex Buffer

I need to get the pointer to the first vertex of a vertex buffer of a IAnimatedMesh, and then place that infomation into a SPEVertex pVertex. This is how I have tried: scene::IMeshBuffer* mb = mesh->getMesh(0)->getMeshBuffer(0); int* mbVertices = (int*)mb->getVertices(); // get pointer to vertices i...
by IrrNoob
Sat Jan 10, 2009 1:34 pm
Forum: Beginners Help
Topic: Irrlicht + SPE Integration
Replies: 13
Views: 951

I have managed to put together this in order to get the pointer to the first vertex of a vertex buffer of a IAnimatedMesh* mesh: irr::u32 meshBufferCount = (irr::u32)mesh->getMesh(0)->getMeshBufferCount(); // pointer to the mesh buffer scene::IMeshBuffer* mb = mesh->getMesh(0)->getMeshBuffer(0); Num...
by IrrNoob
Sat Jan 10, 2009 5:53 am
Forum: Beginners Help
Topic: Irrlicht + SPE Integration
Replies: 13
Views: 951

LMesh() { pVertex =0; pIndex=0; NumVertices =0; NumFaces =0; VertexBuffer =0; IndexBuffer =0; } I am initializing vertexBuffer here, correct? I want to get a pointer to the first vertex of a vertex buffer of a IAnimatedMesh* mesh. I'm not sure how to get that data from an IAnimatedMesh. Do I need t...
by IrrNoob
Sat Jan 10, 2009 5:01 am
Forum: Beginners Help
Topic: Error since i updated to Irr 1.5
Replies: 7
Views: 561

Have you tried looking at the updated tutorials for version 1.5? Maybe this could clear up any problems with compatiblity in your code. I'm not sure just a suggestion.
by IrrNoob
Sat Jan 10, 2009 3:16 am
Forum: Beginners Help
Topic: Irrlicht + SPE Integration
Replies: 13
Views: 951

After trying to get trying to implement getVertexBuffer() and getIndexBuffer() to get a pointer to the loaded mesh's vertex buffer and index buffer I have this for the LMesh class: struct LMesh { SPEVertex *pVertex; int *pIndex; int NumVertices; int NumFaces; scene::IDynamicMeshBuffer *VertexBuffer;...
by IrrNoob
Sat Jan 10, 2009 1:18 am
Forum: Beginners Help
Topic: Irrlicht + SPE Integration
Replies: 13
Views: 951

Your correct again, thanks drewbacca. I needed to initialize NumVertices and NumIndices to zero in the LMesh constructor. But now I get another unhandled exception: Unhandled exception at 0x0035c4c8 in SPEGameDebug.exe: 0xC0000005: Access violation reading location 0xe69f5cdc. But the debugger says ...
by IrrNoob
Sat Jan 10, 2009 12:47 am
Forum: Beginners Help
Topic: Irrlicht + SPE Integration
Replies: 13
Views: 951

I think the problem is maybe caused by the call to: bool Load(scene::IAnimatedMesh* mesh, const SPEVector& Scale=SPEVector(1,1,1)) { //Get number of vertices u32 nMeshBuffer; for( nMeshBuffer = 0 ; nMeshBuffer < mesh->getMeshBufferCount(); ++nMeshBuffer) { scene::IMeshBuffer *buffer = mesh->getM...