Project

General

Profile

« Previous | Next » 

Revision 9c198dba

Added by Leszek Koltunski about 4 years ago

Minor.

View differences:

src/main/java/org/distorted/library/main/DistortedTexture.java
130 130
    this(TYPE_USER);
131 131
    }
132 132

  
133
///////////////////////////////////////////////////////////////////////////////////////////////////
134
/**
135
 * Bind the underlying rectangle of pixels as a OpenGL Texture.
136
 */
137
  public boolean setAsInput()
138
    {
139
    if( mColorH[0]>0 )
140
      {
141
      GLES31.glActiveTexture(GLES31.GL_TEXTURE0);
142
      GLES31.glBindTexture(GLES31.GL_TEXTURE_2D, mColorH[0]);
143
      return true;
144
      }
145

  
146
    return false;
147
    }
148

  
149 133
///////////////////////////////////////////////////////////////////////////////////////////////////
150 134
/**
151 135
 * Sets the underlying android.graphics.Bitmap object.
src/main/java/org/distorted/library/main/InternalSurface.java
22 22
import android.opengl.GLES31;
23 23

  
24 24
///////////////////////////////////////////////////////////////////////////////////////////////////
25
// common parent class of Texture & OutputSurface; so that we can store either in Nodes.
25 26

  
26 27
abstract class InternalSurface extends InternalObject
27 28
{
......
58 59
    }
59 60

  
60 61
///////////////////////////////////////////////////////////////////////////////////////////////////
61
// PUBLIC API
62
///////////////////////////////////////////////////////////////////////////////////////////////////
63
/**
64
 * Bind the underlying rectangle of pixels as a OpenGL Texture.
65
 *
66
 * @return <code>true</code> if successful.
67
 */
68
  public boolean setAsInput()
62

  
63
  boolean setAsInput()
69 64
    {
70 65
    if( mColorH[0]>0 )
71 66
      {

Also available in: Unified diff