Project

General

Profile

« Previous | Next » 

Revision 39086ebb

Added by Leszek Koltunski about 7 years ago

New method of rendering.
Advantage: now there's one (well, ATM two, but I hope soon really in one) place where we can have a look at all the Meshes that are being rendered to a OutputSurface.
This should help with proper per-object POSTPROCESSING effects like Multiblur.

View differences:

src/main/java/org/distorted/library/DistortedOutputSurface.java
103 103
///////////////////////////////////////////////////////////////////////////////////////////////////
104 104
// PUBLIC API
105 105
///////////////////////////////////////////////////////////////////////////////////////////////////
106

  
107
  public int render(long time)
108
    {
109
    DistortedAttachDaemon.toDo();
110
    toDo();
111
    DistortedRenderState.reset();
112

  
113
    int numRenders=0;
114

  
115
    for(int i=0; i<mNumChildren; i++)
116
      {
117
      numRenders += mChildren.get(i).renderRecursive(time);
118
      }
119

  
120
    setAsOutput();
121

  
122
    // 'renderChildren'
123
    for(int i=0; i<mNumChildren; i++)
124
      {
125
      numRenders += mChildren.get(i).draw(time,this);
126
      }
127

  
128
    return numRenders;
129
    }
130

  
131
///////////////////////////////////////////////////////////////////////////////////////////////////
132

  
106 133
/**
107 134
 * Draws all the attached children to this OutputSurface.
108 135
 * <p>
......
111 138
 * @param time Current time, in milliseconds. This will be passed to all the Effects stored in the children Nodes.
112 139
 * @return Number of objects rendered.
113 140
 */
114
  public int render(long time)
141
  public int renderOld(long time)
115 142
    {
116 143
    // change tree topology (attach and detach children)
117 144
/*

Also available in: Unified diff