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 for some other reason than too many uniforms.
|
7
|
* <p>
|
8
|
* This can happen on older OpenGL ES 2.0 devices if they, say, do not support variable loops in the shaders.
|
9
|
* Theoretically should never happen on devices supporting at least OpenGL ES 3.0.
|
10
|
*/
|
11
|
|
12
|
@SuppressWarnings("serial")
|
13
|
public class VertexCompilationException extends Exception
|
14
|
{
|
15
|
|
16
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
17
|
/**
|
18
|
* Default empty constructor
|
19
|
*/
|
20
|
public VertexCompilationException()
|
21
|
{
|
22
|
|
23
|
}
|
24
|
|
25
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
26
|
/**
|
27
|
* Constructor with a message describing why compilation failed.
|
28
|
*
|
29
|
* @param detailMessage Message describing why compilation failed
|
30
|
*/
|
31
|
public VertexCompilationException(String detailMessage)
|
32
|
{
|
33
|
super(detailMessage);
|
34
|
}
|
35
|
|
36
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
37
|
/**
|
38
|
* Constructor necessary to make Chained Exceptions working.
|
39
|
*
|
40
|
* @param throwable The parent Throwable.
|
41
|
*/
|
42
|
public VertexCompilationException(Throwable throwable)
|
43
|
{
|
44
|
super(throwable);
|
45
|
}
|
46
|
|
47
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
48
|
/**
|
49
|
* Constructor necessary to make Chained Exceptions working.
|
50
|
*
|
51
|
* @param detailMessage Message describing why compilation failed
|
52
|
* @param throwable The parent Throwable.
|
53
|
*/
|
54
|
public VertexCompilationException(String detailMessage, Throwable throwable)
|
55
|
{
|
56
|
super(detailMessage, throwable);
|
57
|
}
|
58
|
|
59
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
60
|
}
|