Kaminario Shiroy Utilisateur confirmé: Rang **

Nombre de messages: 472 Localisation: Watch me fly into the wind Projet Actuel: ... Avancement:
 | Sujet: [Résolu] "draw_polygon" de gm5 avec primitives ? Lun 5 Oct - 21:02 | |
| Bien le bonjour à tous. J'ai tenté de faire une conversion vers gm7 du "DestroyMod" du site, en ayant besoin pour un projet. Le seul problème, est que le DestroyMod utilise les fonctions : draw_polygon_begin et draw_polygon_vertex. Comment reproduire avec les vertex de GM7 ceci ? (Je suis un noob total en vertex). J'ai tenter les différent fonction de "draw_primitive_begin", mais pas une ne conviens... Merci d'avance si quelqu'un connais l'équivalent =) ! |
|
shm31 *Excellent utilisateur*

Nombre de messages: 12381 Projet Actuel: Cotoniser (générateur de nuages) Avancement:
 | Sujet: Re: [Résolu] "draw_polygon" de gm5 avec primitives ? Mar 6 Oct - 0:00 | |
| ben il faut d'abord définir le mode de dessin je crois tu peux toujours montrer le code gml pour voir.  _________________ | Citation: | Mario never had any adventure...he is a delusional old Plumber (Or had something to do with him eating Shrooms/Drugs)
The Giant Turtles and Goombas are what he sees everyday while working on the sewers, Dry bones being the corpses of dead turtles kid flushes through the toilets... And Bowser is the constant fear to those "Alligator in the sewers" urban legends Peach is just a Pin up girl turned Princess in his own twisted mind.... |
|
|
Kaminario Shiroy Utilisateur confirmé: Rang **

Nombre de messages: 472 Localisation: Watch me fly into the wind Projet Actuel: ... Avancement:
 | Sujet: Re: [Résolu] "draw_polygon" de gm5 avec primitives ? Mar 6 Oct - 6:38 | |
| C'est le code suivant : | Code: | _bc = brush_color; _pc = pen_color;
pen_color = argument2; brush_color = argument3;
draw_polygon_begin();
draw_polygon_vertex( room_width, room_height ); draw_polygon_vertex( -1, room_height );
draw_polygon_vertex( -1, room_height - variable_global_array_get(argument0, 0) );
_v = room_width / argument1;
for( _i = 1; _i < argument1; _i += 1 ) { draw_polygon_vertex( _i * _v, room_height - variable_global_array_get(argument0, _i) ); }
draw_polygon_vertex( room_width, room_height - variable_global_array_get(argument0, 0) );
draw_polygon_end();
brush_color = _bc; pen_color = _pc;
|
Voici la version que j'ai tenté :
| Code: | draw_set_color(c_white) draw_primitive_begin_texture(pr_linestrip,sprite_get_texture(spr_tex,0));
draw_vertex_texture( room_width, room_height , 0, 0); draw_vertex_texture( -1, room_height , 0,0);
draw_vertex_texture( -1, room_height - variable_global_array_get(argument0, 0) , 0,0);
_v = room_width / argument1;
for( _i = 1; _i < argument1; _i += 1 ) { draw_vertex_texture( _i * _v, room_height - variable_global_array_get(argument0, _i) , 0,0); }
draw_vertex_texture( room_width, room_height - variable_global_array_get(argument0, 0) , 0,0);
draw_primitive_end();
|
Mais ça ne marche avec aucun mode de dessin... Le mieux, c'est "pr_trianglefan", mais certaines parties du dessin son cachés par le triangle pointant vers le premier point. (autre bug, il semblerait que seulement un pixel de la texture soit prit en compte, car j'obtient un aplat de couleur)_________________ | Spoiler: | | | 
 |
|
|
[TheDarkTiger] Modérateur 'Programmation'

Nombre de messages: 6165 Localisation: Essonne Avancement:
 | Sujet: Re: [Résolu] "draw_polygon" de gm5 avec primitives ? Mer 7 Oct - 14:59 | |
| Bon, alors, il faut régler le bon mode, ET la texture. Du coup, faut rajouter des lignes de code partout ... Je te fait ça . EDIT: http://www.megaupload.com/?d=SLACEJVPet voilà ^^ _________________ Bonne chance pour vos projets actuels! Prêt à aider ceux qui en ont besoin ^^   actuellement à Liverpool http://leaveherpool.canalblog.com/Bienvenue au 1388eme utilisateur : lionelvader ! |
|
Kaminario Shiroy Utilisateur confirmé: Rang **

Nombre de messages: 472 Localisation: Watch me fly into the wind Projet Actuel: ... Avancement:
 | |
[TheDarkTiger] Modérateur 'Programmation'

Nombre de messages: 6165 Localisation: Essonne Avancement:
 | Sujet: Re: [Résolu] "draw_polygon" de gm5 avec primitives ? Mar 13 Oct - 3:47 | |
| à ton service^^ _________________ Bonne chance pour vos projets actuels! Prêt à aider ceux qui en ont besoin ^^   actuellement à Liverpool http://leaveherpool.canalblog.com/Bienvenue au 1388eme utilisateur : lionelvader ! |
|