Project

General

Profile

« Previous | Next » 

Revision 12f9e4bb

Added by Leszek Koltunski almost 6 years ago

a mix of two changes:

1) remove the DistortedInputSurface interface (now every Surface is Input)
2) make the OIT SSBO self-adjustable in size

View differences:

src/main/java/org/distorted/library/main/DistortedSurface.java
19 19

  
20 20
package org.distorted.library.main;
21 21

  
22
///////////////////////////////////////////////////////////////////////////////////////////////////
22
import android.opengl.GLES31;
23 23

  
24
abstract class DistortedSurface extends DistortedObject
24
///////////////////////////////////////////////////////////////////////////////////////////////////
25
/**
26
 * This is not really part of the public API.
27
 *
28
 * @y.exclude
29
 */
30
public abstract class DistortedSurface extends DistortedObject
25 31
{
26 32
  int mColorCreated;
27 33
  int mNumColors;
......
96 102
    {
97 103
    return mesh==null ? 0 : (int)(mWidth*mesh.zFactor);
98 104
    }
105

  
106
///////////////////////////////////////////////////////////////////////////////////////////////////
107
/**
108
 * Bind the underlying rectangle of pixels as a OpenGL Texture.
109
 *
110
 * @return <code>true</code> if successful.
111
 */
112
  public boolean setAsInput()
113
    {
114
    if( mColorH[0]>0 )
115
      {
116
      GLES31.glActiveTexture(GLES31.GL_TEXTURE0);
117
      GLES31.glBindTexture(GLES31.GL_TEXTURE_2D, mColorH[0]);
118
      return true;
119
      }
120

  
121
    return false;
122
    }
99 123
}

Also available in: Unified diff