Untitled

Published June 10, 2006
Advertisement
Fuck, I'm not even going to describe what I went through to try to get this shit to work. I isolated the vertex buffer class. Compared it to my older, working code. Saw no differences, AT ALL, except that the "new" one is somehow corruping the stack, or something (the this pointer changes mid-function, and somehow manages to NULL itself, and other fucked up shit).

Don't expect to see me for a couple days. I'm gone.
Previous Entry Untitled
Next Entry Untitled
0 likes 6 comments

Comments

Sir Sapo
But what will we do without you?!?!?!
June 10, 2006 09:44 PM
Pipo DeClown
Party?
June 11, 2006 06:10 AM
baldurk
bring on the dancing girls!

On topic, I'd suggest as a debugging method slowly chopping more and more things out of your code, while keeping it functional. Note the point at which it starts working - that's where your problem is. It doesn't always work, because sometimes you can't boil it down any simpler while keeping it working, but it's worth a try.
June 11, 2006 04:00 PM
Mushu
Quote:Original post by baldurk
On topic, I'd suggest as a debugging method slowly chopping more and more things out of your code, while keeping it functional.

Of course. The vertex buffer code was isolated into a separate project for rigorous debugging - and failed mysteriously and miserably. And it consisted of about 12 gl calls.

Debugging showed that the problem was from the this pointer becoming NULL arbitrarily halfway through some of the member functions after a call to glSetClientState (or something), which suggests something is really fucked up.

So I decided I'm going to scrap it and get around to doing some of the stuff I said I was going to do -

- Virtual File System.
- Rewrite Graphics Adapters
- D3D!!! (and OpenGL backups for portability? HA!)
- MUI v2.0 (GUI library rewrite)

This codebase rewrite will give me a much better base to build a game upon. Overall, the worst thing I was going through with the previous project was the frustration of poorly written basecode.

Fixing it at the root of the problem.
June 12, 2006 03:29 PM
kwijibo
Look at your last entry, I think I saw a mistake in the stuff you post. (Don't get your hopes up, it's been a while since I touched gl).
June 12, 2006 07:15 PM
Mushu
Yeah, the way I was doing it with stride-sex is entirely valid (and in fact, taken directly from the Red Book). glInterleavedArrays is basically the shortcut way of doing things - on a low level it basically does the same thing. The problem with glInterleavedArrays (and the reason I don't much like it) is because you have to lay out your datastructures exactly perfectly since it directly calculates offsets. There's a nice trick you can do my way so that you can add/remove stuff from the vertex class without having to worry about the member offsets at all (not shown in previous code).

Thanks for the help though :)
June 13, 2006 05:49 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

Untitled

5331 views

Untitled

1046 views

Untitled

1188 views

Untitled

1103 views

Untitled

1148 views

Untitled

1433 views

Untitled

1101 views

Untitled

1002 views

Untitled

1006 views

Untitled

1186 views
Advertisement