Project

General

Profile

« Previous | Next » 

Revision 2ed1c692

Added by Leszek Koltunski about 7 years ago

1) stop culling back face
2) reset OpenGL state beore each render (and not in onCreate)
3) Improve Matrix3D so that we can test negative Scales

View differences:

src/main/java/org/distorted/library/Distorted.java
105 105
  throws FragmentCompilationException,VertexCompilationException,VertexUniformsException,FragmentUniformsException,LinkingException
106 106
    {
107 107
    final Resources resources = context.getResources();
108

  
109
    GLES30.glDepthFunc(GLES30.GL_LEQUAL);
110
    GLES30.glEnable(GLES30.GL_BLEND);
111
    GLES30.glBlendFunc(GLES30.GL_SRC_ALPHA, GLES30.GL_ONE_MINUS_SRC_ALPHA);
112
    GLES30.glEnable(GLES30.GL_CULL_FACE);
113
    GLES30.glCullFace(GLES30.GL_BACK);
114
    GLES30.glFrontFace(GLES30.GL_CW);
115

  
116 108
    DistortedEffects.createProgram(resources);
117 109
    EffectQueuePostprocess.createProgram(resources);
118

  
119 110
    EffectMessageSender.startSending();
120 111

  
121 112
    mInitialized = true;
src/main/java/org/distorted/library/DistortedFramebuffer.java
26 26
 * Class which represents a OpenGL Framebuffer object.
27 27
 * <p>
28 28
 * User is able to create offscreen FBOs and both a) render to them b) use their COLOR0 attachment as
29
 * an input texture.
29
 * an input texture. Attaching Depths and/or Stencils is also possible.
30 30
 */
31 31
public class DistortedFramebuffer extends DistortedOutputSurface implements DistortedInputSurface
32 32
  {
src/main/java/org/distorted/library/DistortedOutputSurface.java
143 143
      DistortedSurface.debugLists();
144 144
      }
145 145
*/
146
    GLES30.glDepthFunc(GLES30.GL_LEQUAL);
147
    GLES30.glEnable(GLES30.GL_BLEND);
148
    GLES30.glBlendFunc(GLES30.GL_SRC_ALPHA, GLES30.GL_ONE_MINUS_SRC_ALPHA);
149
    GLES30.glDisable(GLES30.GL_CULL_FACE);
150

  
146 151
    int numRenders = 0;
147 152

  
148 153
    for(int i=0; i<mNumChildren; i++)

Also available in: Unified diff