如何在没有加载纹理的情况下显示纹理四边形(Android,opengles 2.0)(How to display a textured quad without the texture loaded yet(Android,opengles 2.0))
目前在我的应用程序中使用opengl es,我必须显示一堆具有不同纹理的四边形。 我想异步加载纹理,显示“空白”的四边形,直到纹理加载,并在纹理完成加载时开始显示纹理....最理想的方法是什么?
Currently in my app using opengl es, I have to display a bunch of quads with Different Textures. I want to asynchronously load textures with the quads displaying "blank" until the texture is loaded and start displaying the texture as the texture finishes loading.... what is the most desired way to achieve this?
原文:https://stackoverflow.com/questions/30818676
最满意答案
$queryBuilder ->select('u', 'i.item_name', 't.otherColumns2') ->from('user_lp_requirement', 'u') ->innerJoin('u', 'item_master', 'i', 'u.item_id = i.item_id') ->innerJoin('u', 'training_program', 't', 'u.item_id = t.item_id');
这假设您希望将用户表映射到项表,并将用户表映射到训练表,而不是映射到训练表和项表的连接的用户表。
$queryBuilder ->select('u', 'i.item_name', 't.otherColumns2') ->from('user_lp_requirement', 'u') ->innerJoin('u', 'item_master', 'i', 'u.item_id = i.item_id') ->innerJoin('u', 'training_program', 't', 'u.item_id = t.item_id');
This assumes that you want the user table mapped to the item table AND the user table mapped to the training table rather than the user table mapped to a join of the training table and the item table.
相关问答
更多-
尝试使用以下代码,似乎你的语法不正确。 $qb = $this->em->createQueryBuilder(); $query = $qb->select('t1.name', 't2.name') ->from('table1', 't1') ->leftJoin('t1', 'table2', 't2', 't2.id = t1.Uid') ->leftJoin('t1', 'table3', 't3', 't3.id = t1.Rid') ->where('t1.Uid = :Uid') ->an ...
-
如果架构是正确的,那么用户应该有一个Pages(或类似的东西)关系。 您可以像这样编写查询: $query = $this->createQuery('u') ->innerJoin('u.Pages p') ->andWhere('u.published = ?', 1) ->andWhere('u.is_preview = ?', 0) ->andWhere('u.featured = ?', 1) ->addWhere('p.section_id = ?', $section_id ...
-
Doctrine join语法错误(Doctrine join syntax is wrong)[2024-01-06]
Doctrine是对的 - 这不是有效的DQL,因为你使用的是double equals(==)。 你可能想要这个: $qb->join('Person','p','WITH','i.owner_id = p.id'); Doctrine is right - that's not valid DQL because you are using double equals (==). You probably want this: $qb->join('Person','p','WITH','i.own ... -
如何在doctrine中的同一列上实现多个表的连接(how to implement join to more than one table on same column in doctrine)[2024-02-01]
$queryBuilder ->select('u', 'i.item_name', 't.otherColumns2') ->from('user_lp_requirement', 'u') ->innerJoin('u', 'item_master', 'i', 'u.item_id = i.item_id') ->innerJoin('u', 'training_program', 't', 'u.item_id = t.item_id'); 这假设您希望将用户表映射 ... -
不,你不能,在你的联结表中有ManyToMany关联和附加列,你需要重写你的映射,以便在你的用户和组实体之间有一个联结实体,如下所示 对于用户来说,你的映射就像 OneToMany ------------> User UserHasGroups <------------ ManyToOne 团体实体也一样 OneToMany -----------> Group UserHasGr ...
-
加入原则的问题(An issue with join doctrine)[2022-08-21]
你写了: $qb->select('i') ->from('item','i')->join('a.character', 'u'); 你为什么用' a '和' u '? 你至少明白你在写什么吗? 你不能这样的随机字母。 别名'i'仅被使用,因为您已将i定义为from item别名。 ->leftJoin('character', 'cha', 'i.owner_id = cha.id') 在这个例子中,我为character定义了一个别名' cha ',然后你可以使用' cha ... -
你应该删除行@ORM\Column(name="user_id", type="integer")来覆盖你的映射并且只留下: /** * @ORM\ManyToOne(targetEntity="User", inversedBy="users") * @ORM\JoinColumn(name="user_id", referencedColumnName="id") */ protected $user; 此外,您应该将您的属性命名$user ,而不是$userId因为它包含User对象,而不是其 ...
-
您正在考虑使用SQL而不是DQL。 您将返回一个对象数组,它的关系将是聚合对象。 您的代码应该是这样的: $q = $em->createQuery('SELECT c.name as name , s.title as title FROM DefaultAppBundle:Client c INNER JOIN c.service s'); $result = $q->getScalarResult(); 要回答更准确,你需要像@xabbuh那样展示你的映射。 在这里检查一下。 You are th ...
-
教义一对多没有加入表(Doctrine One To Many No Join Table)[2022-11-14]
只有m:n关系才需要连接表。 A join table is only required for m:n relations. -
我猜你的Order :: addProduct看起来像这样: class Order { addProduct($product) { $this->products[] = $product; 如果是这样,那么您不会告诉产品有关新订单的信息。 你需要添加 $product->addOrder($order); 这将完成您的双向引用,并应允许持久性按预期工作。 如果你已经有上面的代码,那么其他的东西就不对了。 I am guessing that your Order::addPro ...