1Name
2
3    APPLE_texture_max_level
4
5Name Strings
6
7    GL_APPLE_texture_max_level
8
9Contributors
10
11    Contributors to SGIS_texture_lod desktop OpenGL extension from which 
12    this extension borrows heavily.
13
14Contacts
15
16    Benj Lipchak, Apple (lipchak 'at' apple.com)
17
18Status
19
20    Complete
21
22Version
23
24    Last Modified Date: February 24, 2011
25    Revision: #2
26
27Number
28
29    OpenGL ES Extension #80
30
31Dependencies
32
33    Written based on the wording of the OpenGL ES 2.0 specification.
34
35    OpenGL ES 1.1 affects the definition of this extension.
36
37Overview
38
39    This extension allows an application to specify the maximum (coarsest) 
40    mipmap level that may be selected for the specified texture.  This maximum
41    level is also used to determine which mip levels are considered when 
42    determining texture completeness.
43
44IP Status
45
46    No known IP claims.
47
48New Procedures and Functions
49
50    None
51
52New Tokens
53
54    Accepted by the <pname> parameter of TexParameteri, TexParameterf,
55    TexParameteriv, TexParameterfv, GetTexParameteriv, and GetTexParameterfv:
56
57        TEXTURE_MAX_LEVEL_APPLE          0x813D
58
59Additions to Chapter 2 of the OpenGL ES 2.0 Specification (OpenGL Operation)
60
61    None
62
63Additions to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization)
64
65    Add the following line to Table 3.10 (Texture parameters and their values):
66
67        Name                            Type        Legal Values
68        ----                            ----        ------------
69        TEXTURE_MAX_LEVEL_APPLE         integer     any non-negative integer
70
71    In section 3.7.4, insert the following paragraph before the paragraph
72    beginning "Texture parameters for a cube map texture...":
73    
74    "In the remainder of section 3.7, denote by level_max the value of the 
75    texture parameter TEXTURE_MAX_LEVEL_APPLE."
76
77    In section 3.7.7 subsection "Mipmapping" modify the second paragraph
78    such that p and q are defined as follows:
79    
80        p = floor(log2(max(w_b, h_b)))
81        q = min{p, level_max}
82
83    In section 3.7.7 subsection "Mipmapping" insert the following paragraph 
84    before the paragraph beginning "The mipmap is used in conjunction...":
85    
86    "The value of level_max may be respecified for a specific texture by
87    calling TexParameter[if] with <pname> set to TEXTURE_MAX_LEVEL_APPLE.
88    The error INVALID_VALUE is generated if the specified value is negative."
89
90    In section 3.7.12, modify the last three sentences to read as follows:
91    
92    "Next, there are the two sets of texture properties; each consists of the
93    selected minification and magnification filters, the maximum array level,
94    and the wrap modes for s and t.  In the initial state, the value assigned
95    to TEXTURE_MIN_FILTER is NEAREST_MIPMAP_LINEAR, and the value for 
96    TEXTURE_MAG_FILTER is LINEAR.  s and t wrap modes are both set to REPEAT.
97    The value of TEXTURE_MAX_LEVEL_APPLE is 1000."
98
99Additions to Chapter 4 of the OpenGL ES 2.0 Specification (Per-Fragment 
100Operations and the Frame Buffer)
101
102    None
103
104Additions to Chapter 5 of the OpenGL ES 2.0 Specification (Special Functions)
105
106    None
107
108Additions to Chapter 6 of the OpenGL ES 2.0 Specification (State and State 
109Requests)
110
111    None
112
113Dependencies on OpenGL ES 1.1
114
115    On an OpenGL ES 1.1 implementation, include fixed-point flavors of
116    TexParameter and GetTexParameter commands.
117    
118Errors
119
120    INVALID_VALUE is generated if an attempt is made to set
121    TEXTURE_MAX_LEVEL_APPLE to a negative value.
122
123New State
124
125    Add the following to Table 6.8 (Textures (state per texture object):
126                                                           Initial
127    Get Value                 Get Command         Type     Value     Description       Sec.
128    ---------                 -----------------   ------   -------   -----------       ----
129    TEXTURE_MAX_LEVEL_APPLE   GetTexParameteriv   n x Z+   1000      Maximum texture   3.7
130                                                                     array level
131
132New Implementation Dependent State
133
134    None
135
136Revision History
137
138    #2  02/24/2011    Benj Lipchak     Assign extension number
139    #1  10/29/2009    Benj Lipchak     First draft
140