mojoshader.h
changeset 1055 3295380ce6fc
parent 1043 6227066350b4
child 1066 ff14db741834
equal deleted inserted replaced
1054:63dd1a46ce13 1055:3295380ce6fc
   530      *  this shader. See discussion on MOJOSHADER_sampler for details.
   530      *  this shader. See discussion on MOJOSHADER_sampler for details.
   531      * This can be NULL on error or if (sampler_count) is zero.
   531      * This can be NULL on error or if (sampler_count) is zero.
   532      */
   532      */
   533     MOJOSHADER_sampler *samplers;
   533     MOJOSHADER_sampler *samplers;
   534 
   534 
       
   535     /* !!! FIXME: this should probably be "input" and not "attribute" */
   535     /*
   536     /*
   536      * The number of elements pointed to by (attributes).
   537      * The number of elements pointed to by (attributes).
   537      */
   538      */
   538     int attribute_count;
   539     int attribute_count;
   539 
   540 
       
   541     /* !!! FIXME: this should probably be "input" and not "attribute" */
   540     /*
   542     /*
   541      * (attribute_count) elements of data that specify Attributes to be set
   543      * (attribute_count) elements of data that specify Attributes to be set
   542      *  for this shader. See discussion on MOJOSHADER_attribute for details.
   544      *  for this shader. See discussion on MOJOSHADER_attribute for details.
   543      * This can be NULL on error or if (attribute_count) is zero.
   545      * This can be NULL on error or if (attribute_count) is zero.
   544      */
   546      */
   545     MOJOSHADER_attribute *attributes;
   547     MOJOSHADER_attribute *attributes;
   546 
   548 
   547     /*
   549     /*
       
   550      * The number of elements pointed to by (outputs).
       
   551      */
       
   552     int output_count;
       
   553 
       
   554     /*
       
   555      * (output_count) elements of data that specify outputs this shader
       
   556      *  writes to. See discussion on MOJOSHADER_attribute for details.
       
   557      * This can be NULL on error or if (output_count) is zero.
       
   558      */
       
   559     MOJOSHADER_attribute *outputs;
       
   560 
       
   561     /*
   548      * The number of elements pointed to by (swizzles).
   562      * The number of elements pointed to by (swizzles).
   549      */
   563      */
   550     int swizzle_count;
   564     int swizzle_count;
   551 
   565 
       
   566     /* !!! FIXME: this should probably be "input" and not "attribute" */
   552     /*
   567     /*
   553      * (swizzle_count) elements of data that specify swizzles the shader will
   568      * (swizzle_count) elements of data that specify swizzles the shader will
   554      *  apply to incoming attributes. This is a copy of what was passed to
   569      *  apply to incoming attributes. This is a copy of what was passed to
   555      *  MOJOSHADER_parseData().
   570      *  MOJOSHADER_parseData().
   556      * This can be NULL on error or if (swizzle_count) is zero.
   571      * This can be NULL on error or if (swizzle_count) is zero.
  2994  * This call requires a valid MOJOSHADER_glContext to have been made current,
  3009  * This call requires a valid MOJOSHADER_glContext to have been made current,
  2995  *  or it will crash your program. See MOJOSHADER_glMakeContextCurrent().
  3010  *  or it will crash your program. See MOJOSHADER_glMakeContextCurrent().
  2996  *
  3011  *
  2997  * Vertex attributes are not shared between contexts.
  3012  * Vertex attributes are not shared between contexts.
  2998  */
  3013  */
       
  3014  /* !!! FIXME: this should probably be "input" and not "attribute" */
       
  3015  /* !!! FIXME: or maybe "vertex array" or something. */
  2999 void MOJOSHADER_glSetVertexAttribute(MOJOSHADER_usage usage,
  3016 void MOJOSHADER_glSetVertexAttribute(MOJOSHADER_usage usage,
  3000                                      int index, unsigned int size,
  3017                                      int index, unsigned int size,
  3001                                      MOJOSHADER_attributeType type,
  3018                                      MOJOSHADER_attributeType type,
  3002                                      int normalized, unsigned int stride,
  3019                                      int normalized, unsigned int stride,
  3003                                      const void *ptr);
  3020                                      const void *ptr);