• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

3D vertex freezing and fails: can't decal

M

Misty

Guest
So basically the story begins, working on a 3d game trying to add decals using d3d_models. But as soon as I call the function d3d_model_draw, I can no longer update the model.

So I read the manual, sounds to me that Vertex buffers are what I need. So I use vertex buffers, yet it is the exact same thing as the models, I cannot update vertex buffers dynamically! The buffers are like this:


So I'm stumped, I never used the function vertex_freeze().

As soon as I draw the vertex buffer, I can no longer add anymore polygons to the buffer.
 
I'd also like to know why you can't pick up writing to the same location of a vertex buffer at a later time. I know you can write to a regular buffer and then copy it to a vertex buffer, but even that is rather slow.
 
M

Misty

Guest
I'd also like to know why you can't pick up writing to the same location of a vertex buffer at a later time. I know you can write to a regular buffer and then copy it to a vertex buffer, but even that is rather slow.
I couldn't figure out how to even do that. When I tried converting regular buffers into vertex buffers, I just got an error saying "Error vertex buffer does not exists." It's a bad sign when the error message has typos in it. It seems like they didn't spend enough time with vertex buffers and just tacked it on without really testing it. I have tried in GM 2 and it's the same error and typo. And I tried a bunch of different combinations and ways.

For instance I tried reading the manual. The manual has a feature called vertex_freeze() and it implies that the vertex buffer can be frozen. This implies that it is not frozen by default. Yet it always seems frozen by default and can't do dynamic vertexes. So I don't get why vertex_freeze is in the manual since there is no such function as vertex_append().

I have tried googling to see how to do 3d decals in GM and can't find anything. Everyone else keeps running into the same problem as me.

I just feel drained and tired. I give up.
 
I've not done it myself, but I know it is possible to write to a regular buffer and turn it into a vertex buffer. I've seen the snider do it, I believe in particular so he can use integer data types in the vertex buffer.
 
M

Misty

Guest
I've not done it myself, but I know it is possible to write to a regular buffer and turn it into a vertex buffer. I've seen the snider do it, I believe in particular so he can use integer data types in the vertex buffer.
Links so I can see it in action please?
 
I'm afraid I don't recall exactly where I saw it. It must have been either with his SMF system, or else with the particle systems (which might be part of SMF).

Which function were you using that gave you the "vertex buffer does not exists" message?
 
M

Misty

Guest
Can't remember I tried so many different things its all a blur. I just remember desperately trying to create a regular buffer in order to convert it into a vertex buffer and GM saying one of the buffers don't "exists".

The regular vertex functions wont let me append a vertex to a buffer so I didn't know what else to do. I tried googling and no tutorials on how to make 3d decals in GM.
 

rIKmAN

Member
Can't remember I tried so many different things its all a blur. I just remember desperately trying to create a regular buffer in order to convert it into a vertex buffer and GM saying one of the buffers don't "exists".

The regular vertex functions wont let me append a vertex to a buffer so I didn't know what else to do. I tried googling and no tutorials on how to make 3d decals in GM.
Can you post your code?
 
M

Misty

Guest
Can you post your code?
I can. If I had a timemachine. I went through so many edits and none of them worked out. I've been googling the problem and it sounds like others have the same issue.
 
Top