Project

General

Profile

Download (2.76 KB) Statistics
| Branch: | Revision:

library / src / main / java / org / distorted / library / exception / VertexUniformsException.java @ 6a06a912

1
package org.distorted.library.exception;
2

    
3
///////////////////////////////////////////////////////////////////////////////////////////////////
4
/**
5
 *  Thrown by {@link org.distorted.library.Distorted#onSurfaceCreated(android.opengl.GLSurfaceView)} 
6
 *  if compilation of the Vertex Shader fails because of too many uniforms there, i.e. because
7
 *  we have set {@link org.distorted.library.Distorted#setMaxVertex(int)} to too high value.
8
 */
9

    
10
@SuppressWarnings("serial")
11
public class VertexUniformsException extends Exception 
12
  {
13
  private int max=0;
14
  
15
///////////////////////////////////////////////////////////////////////////////////////////////////
16
/**
17
 * Default empty constructor  
18
 */      
19
  public VertexUniformsException() 
20
    {
21
   
22
    }
23

    
24
///////////////////////////////////////////////////////////////////////////////////////////////////
25
/**
26
 * Constructor with a message describing why compilation failed.  
27
 *   
28
 * @param detailMessage Message describing why compilation failed
29
 */   
30
  public VertexUniformsException(String detailMessage) 
31
    {
32
    super(detailMessage);
33
    }
34

    
35
///////////////////////////////////////////////////////////////////////////////////////////////////
36
/**
37
 * Constructor necessary to make Chained Exceptions working.
38
 *  
39
 * @param throwable The parent Throwable.
40
 */ 
41
  public VertexUniformsException(Throwable throwable) 
42
    {
43
    super(throwable);
44
    }
45

    
46
///////////////////////////////////////////////////////////////////////////////////////////////////
47
/**
48
 * Constructor necessary to make Chained Exceptions working.
49
 *   
50
 * @param detailMessage Message describing why compilation failed
51
 * @param throwable The parent Throwable.
52
 */    
53
  public VertexUniformsException(String detailMessage, Throwable throwable) 
54
    {
55
    super(detailMessage, throwable);
56
    }
57

    
58
///////////////////////////////////////////////////////////////////////////////////////////////////
59
/**
60
 * Constructor with a message describing why compilation failed and integer holding the maximum
61
 * number of uniforms in Vertex Shader supported by current hardware.   
62
 *   
63
 * @param detailMessage Message describing why compilation failed
64
 * @param m maximum number of uniforms in Vertex Shader supported by current hardware.   
65
 */     
66
  public VertexUniformsException(String detailMessage, int m) 
67
    {
68
    super(detailMessage);
69
    max = m;
70
    }
71

    
72
///////////////////////////////////////////////////////////////////////////////////////////////////  
73
/**
74
 * Gets the maximum number of uniforms in Vertex Shader supported by current hardware.
75
 * 
76
 * @return Maximum number of uniforms in Vertex Shader supported by current hardware.   
77
 */
78
  public int getMax()
79
    {
80
    return max;  
81
    }
82
  
83
///////////////////////////////////////////////////////////////////////////////////////////////////  
84
  }
(5-5/5)