• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Model won't draw in GM. What the heck?

M

Misty

Guest
Ok this is the weirdest thing that I have ever seen. It don't work.

If I put the code in my Create Event, it works.
If I put the code in my step event (and seal the deal) it works.
But if I put the code in my step event (and dont seal the deal/continually add new triangles to the model) it doesn't work?

Makes no sense and it's not my code, because it works in GM STUDIO but not game maker 8. Dont feel like porting my game atm and I need to know why this is happening?

Background:
I have dynamically made models, that freezee the game when loaded. In order to stop the freezing instead of loading the models in one frame, I add to them each step a few new triangles....yet for some reason it dont work in gm 8.1 only works in studio. In gm8.1 nothing is drawn.

Code is
Create: ind=d3d_model_create()

Step:
d3d_model_primitive_begin(ind,pr_trianglefan)
d3d_model_add_vertex(ind,0,0,0) d3d_model_add_vertex(ind,random(1000),random(1000),random(1000))
d3d_model_add_vertex(ind,random(1000),random(1000),random(1000))
d3d_model_primitive_end(ind)

Draw
d3d_set_culling(0)
d3d_draw_block(0,0,0,random(1000),random(1000),random(1000),tex,1,1)
d3d_model_draw(ind,0,0,0,tex)

The block draws but the model never does. Its so weird

EDIT: Solved sorta, put the code in the DRAW event, for some reason step don't work (even though Create does and Step does when the whole model is defined in one frame?)
 
Last edited:
Top