Lines Matching defs:target
150 * Return a pointer to the current texture object for the given target
152 * Note: all <target> error checking should have been done by this point.
155 _mesa_get_current_tex_object(struct gl_context *ctx, GLenum target)
160 switch (target) {
224 _mesa_problem(NULL, "bad target in _mesa_get_current_tex_object(): 0x%04x", target);
231 * Get the texture object for given target and texunit
236 _mesa_get_texobj_by_target_and_texunit(struct gl_context *ctx, GLenum target,
243 if (_mesa_is_proxy_texture(target) && allowProxyTarget) {
244 return _mesa_get_current_tex_object(ctx, target);
255 targetIndex = _mesa_tex_target_to_index(ctx, target);
257 _mesa_error(ctx, GL_INVALID_ENUM, "%s(target)", caller);
270 * \param target the texture target
275 GLuint name, GLenum target )
277 assert(target == 0 ||
278 target == GL_TEXTURE_1D ||
279 target == GL_TEXTURE_2D ||
280 target == GL_TEXTURE_3D ||
281 target == GL_TEXTURE_CUBE_MAP ||
282 target == GL_TEXTURE_RECTANGLE_NV ||
283 target == GL_TEXTURE_1D_ARRAY_EXT ||
284 target == GL_TEXTURE_2D_ARRAY_EXT ||
285 target == GL_TEXTURE_EXTERNAL_OES ||
286 target == GL_TEXTURE_CUBE_MAP_ARRAY ||
287 target == GL_TEXTURE_BUFFER ||
288 target == GL_TEXTURE_2D_MULTISAMPLE ||
289 target == GL_TEXTURE_2D_MULTISAMPLE_ARRAY);
295 obj->Target = target;
296 if (target != 0) {
297 obj->TargetIndex = _mesa_tex_target_to_index(ctx, target);
310 if (target == GL_TEXTURE_RECTANGLE_NV ||
311 target == GL_TEXTURE_EXTERNAL_OES) {
390 * \param target either GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D,
397 _mesa_new_texture_object(struct gl_context *ctx, GLuint name, GLenum target)
405 if (!_mesa_initialize_texture_object(ctx, obj, name, target)) {
414 * target it's getting bound to (GL_TEXTURE_1D/2D/etc).
417 finish_texture_init(struct gl_context *ctx, GLenum target,
423 obj->Target = target;
427 switch (target) {
654 * According to the texture target, verifies that each of the mipmaps is
926 * Return pointer to a default/fallback texture of the given type/target.
943 GLenum target;
955 target = GL_TEXTURE_2D_ARRAY;
959 target = GL_TEXTURE_1D_ARRAY;
963 target = GL_TEXTURE_CUBE_MAP;
968 target = GL_TEXTURE_3D;
972 target = GL_TEXTURE_RECTANGLE;
976 target = GL_TEXTURE_2D;
980 target = GL_TEXTURE_1D;
984 target = GL_TEXTURE_BUFFER;
988 target = GL_TEXTURE_CUBE_MAP_ARRAY;
993 target = GL_TEXTURE_EXTERNAL_OES;
997 target = GL_TEXTURE_2D_MULTISAMPLE;
1001 target = GL_TEXTURE_2D_MULTISAMPLE_ARRAY;
1009 texObj = _mesa_new_texture_object(ctx, 0, target);
1020 texFormat = st_ChooseTextureFormat(ctx, target,
1026 const GLenum faceTarget = _mesa_cube_face_target(target, face);
1161 * "If the target of <texture> is TEXTURE_RECTANGLE, TEXTURE_BUFFER,
1185 * glCreateTextures should throw errors if target = 0. This is not exposed to
1188 * \param target either 0 or a valid / error-checked texture target enum
1191 create_textures(struct gl_context *ctx, GLenum target,
1209 texObj = _mesa_new_texture_object(ctx, textures[i], target);
1225 create_textures_err(struct gl_context *ctx, GLenum target,
1236 create_textures(ctx, target, n, textures, caller);
1277 * \param target the texture target for each name to be generated.
1288 _mesa_CreateTextures_no_error(GLenum target, GLsizei n, GLuint *textures)
1291 create_textures(ctx, target, n, textures, "glCreateTextures");
1296 _mesa_CreateTextures(GLenum target, GLsizei n, GLuint *textures)
1306 targetIndex = _mesa_tex_target_to_index(ctx, target);
1308 _mesa_error(ctx, GL_INVALID_ENUM, "glCreateTextures(target)");
1312 create_textures_err(ctx, target, n, textures, "glCreateTextures");
1377 /* Bind the default texture for this unit/target */
1527 * Convert a GL texture target enum such as GL_TEXTURE_2D or GL_TEXTURE_3D
1528 * into the corresponding Mesa texture target index.
1530 * \return TEXTURE_x_INDEX or -1 if target is invalid
1533 _mesa_tex_target_to_index(const struct gl_context *ctx, GLenum target)
1535 switch (target) {
1581 * to calling this function. Note that the texture target (1D, 2D, etc) is
1645 _mesa_lookup_or_create_texture(struct gl_context *ctx, GLenum target,
1653 if (_mesa_is_proxy_texture(target)) {
1656 _mesa_error(ctx, GL_INVALID_OPERATION, "%s(target = %s)", caller,
1657 _mesa_enum_to_string(target));
1660 return _mesa_get_current_tex_object(ctx, target);
1662 if (GL_TEXTURE_CUBE_MAP_POSITIVE_X <= target &&
1663 target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z) {
1664 target = GL_TEXTURE_CUBE_MAP;
1668 targetIndex = _mesa_tex_target_to_index(ctx, target);
1670 _mesa_error(ctx, GL_INVALID_ENUM, "%s(target = %s)", caller,
1671 _mesa_enum_to_string(target));
1688 newTexObj->Target != 0 && newTexObj->Target != target) {
1689 /* The named texture object's target doesn't match the
1690 * given target
1693 "%s(target mismatch)", caller);
1697 finish_texture_init(ctx, target, newTexObj, targetIndex);
1707 newTexObj = _mesa_new_texture_object(ctx, texName, target);
1718 assert(newTexObj->Target == target);
1728 * \param target texture target.
1733 bind_texture(struct gl_context *ctx, GLenum target, GLuint texName,
1737 _mesa_lookup_or_create_texture(ctx, target, texName, no_error, false,
1746 _mesa_BindTexture_no_error(GLenum target, GLuint texName)
1749 bind_texture(ctx, target, texName, ctx->Texture.CurrentUnit, true,
1755 _mesa_BindTexture(GLenum target, GLuint texName)
1761 _mesa_enum_to_string(target), (GLint) texName);
1763 bind_texture(ctx, target, texName, ctx->Texture.CurrentUnit, false,
1769 _mesa_BindMultiTextureEXT(GLenum texunit, GLenum target, GLuint texture)
1785 bind_texture(ctx, target, texture, unit, false, "glBindMultiTextureEXT");
1797 * If the named texture is 0, this will reset each target for the specified
1830 /* Texture object was gen'd but never bound so the target is not set */
1831 _mesa_error(ctx, GL_INVALID_OPERATION, "glBindTextureUnit(target)");
2161 * don't exist in a given texture target)."
2312 texture_page_commitment(struct gl_context *ctx, GLenum target,
2332 if (target == GL_TEXTURE_CUBE_MAP)
2344 ctx, target, image->TexFormat, tex_obj->VirtualPageSizeIndex, &px, &py, &pz);
2364 _mesa_TexPageCommitmentARB(GLenum target, GLint level, GLint xoffset,
2371 texObj = _mesa_get_current_tex_object(ctx, target);
2373 _mesa_error(ctx, GL_INVALID_ENUM, "glTexPageCommitmentARB(target)");
2377 texture_page_commitment(ctx, target, texObj, level, xoffset, yoffset, zoffset,