logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

scene_polygon3d, scene_polygon3d_f - Puts a polygon in the scene rendering list. Allegro game programming

Description

       Puts a polygon in the rendering list. Nothing is really rendered at this moment. Should be called between
       clear_scene() and render_scene().

       Arguments are the same as for polygon3d(), except the bitmap is missing.  The one passed to clear_scene()
       will be used.

       Unlike  polygon3d(),  the polygon may be concave or self-intersecting.  Shapes that penetrate one another
       may look OK, but they are not really handled by this code.

       Note that the texture is stored as a pointer only, and you should keep the  actual  bitmap  around  until
       render_scene(), where it is used.

       Since  the  FLAT  style  is implemented with the low-level hline() function, the FLAT style is subject to
       DRAW_MODEs. All these modes are valid. Along with the polygon, this mode will be stored for the rendering
       moment, and also all the other related variables (color_map pointer,  pattern  pointer,  anchor,  blender
       values).

       The  settings of the CPU_MMX and CPU_3DNOW flags of the cpu_capabilities global variable on entry in this
       routine affect the choice of low-level asm routine that will be used by render_scene() for this polygon.

Name

       scene_polygon3d, scene_polygon3d_f - Puts a polygon in the scene rendering list. Allegro game programming
       library.

Return Value

       Returns zero on success, or a negative number if it won't be rendered for lack of a rendering routine.

See Also

create_scene(3alleg4),     clear_scene(3alleg4),      render_scene(3alleg4),      destroy_scene(3alleg4),
       polygon3d(3alleg4), cpu_capabilities(3alleg4), exscn3d(3alleg4)

Allegro                                           version 4.4.3                         scene_polygon3d(3alleg4)

Synopsis

#include<allegro.h>intscene_polygon3d(inttype,BITMAP*texture,intvc,V3D*vtx[]);intscene_polygon3d_f(inttype,BITMAP*texture,intvc,V3D_f*vtx[]);

See Also