Hi
I’m the getting started guide and I’m trying to get HelloTriMesh to work properly. I downloaded the src code and compiled it, but when I run it, I don’t get anything drawn to the screen. I have the framerate counter, and the vertices counter, but I don’t see a gradient colored rectangle, which I gather was supposed to show up.
In case this is needed, I’m working on a laptop with a Mobility Radeon card. I have the latest driver installed.
Thx for any advice you can give, meanwhile I’m gonna try runnin it on my other machine.
Sometimes, if you jerk the mouse in my machine the screen loads up with the camera pointed in a wierd position. Try using the arrow keys to scroll all the way around and see if it pops on the screen.
I re-ran on my computer and the program worked fine. This is strange. Maybe you could run a debugger and step through and see if at the end anything looks wierd. Or try
m.setForceView(true)
and see if that works. Otherwise, I'm not sure...
PS: login at the top, then post stuff.
Okay,
I set forceView(true) but it didn’t help.
I did discover though, that I can see the mesh bounding box by pressing b. So I’m sure that the mesh is there, its just that it has no color and I can’t see it. I’ve checked my code again, but I did set color to white. So I’m pretty stumped.
Thx for telling me how to use the forum by the way.
When the mesh is in view (IE the bounding box is viewable if it were turned on) does your vertex count stay at 0? Can some cards not do per-vertex colors?
Alright,
I’ve discovered the problem.
I was using…
TriMesh m=new TriMesh(“My Mesh”);
m.reconstruct(vertexes, null, null, null, indexes);
And it does not show. But when I do this:
TriMesh m = new TriMesh(“My Mesh”, vertexes, null, null, null, indexes);
It works perfectly. It looks like a small bug to me. Probably the code in reconstruct() is not the same as the one in the constructor. I know this bug hardly affects anyone (i’m the only one right now), but it looks like it should be an easy fix. I’ll see if I can do it myself once I get CVS properly working.
hmm…seems to be tougher than i thought.
Anybody know where the reconstruct() method is?
I’ve looked in TriMesh.java, Geometry.java, and Spatial.java
but can’t find it.
It’s in TriMesh.java and Geometry.java Line 127 of trimesh.java
I’ve added to TriMesh.reconstruct the line
triangleQuantity=indices.length/3;
which is the only difference between the constructor and reconstruct itself. Try updating from CVS and see if it works now. That doesn't seem to break anything. Not sure why triangleQuantity wasn't set during a reconstruct call....
Thx for the fix,
I’ll try it as soon as I get CVS and Ant installed.
I’ll get back to you as soon as I can.
Thanks a lot.
Install? Just unzip the files, set your path and it’s done.
https://ccvs.cvshome.org/files/documents/19/324/cvs-1-12-9.zip
http://mirrors.ccs.neu.edu/Apache/dist/ant/binaries/apache-ant-1.6.2-bin.zip
Sorry Cep-21,
Its still not working…
I’ve checked out the reconstruct() method and the constructor in the Geometry.java file. There are a few lines missing in the reconstruct() method, can you add those please? They should look like…
this.vboTextureIDs = new int[textureUnits];
this.vertQuantity = vertex.length;
In the Geometry.java file.
Thanks a lot for helping me cep. Its strange that this doesn’t affect anyone else ?