1

OpenGL ES で 1 つのテクスチャを別のテクスチャに割り当てるにはどうすればよいですか?

オブジェクトと呼ばれるクラスがあり、テクスチャと呼ばれるメンバーがあります。すべてのデータをコピーするためのコピー コンストラクターがあります。すでにテクスチャが設定されているオブジェクトを渡して、それを割り当てると、

texture = obj.texture

それは動作しません。機能させるにはどうすればよいですか?

実際には、gameObjects と呼ばれます。ここにコピーコンストラクターがあります

GameObject::GameObject(const GameObject &dummy)
{
orientation = dummy.orientation;
speed = dummy.speed;
deltax = dummy.deltax;
deltay = dummy.deltay;
position = dummy.position;
active =true;
name = dummy.name;
texture = dummy.texture;
rect = dummy.rect;
fixedWidthRatio = dummy.fixedWidthRatio;
fixedHeightRatio = dummy.fixedHeightRatio;

currentWidthRatio = dummy.currentWidthRatio;
currentHeightRatio = dummy.currentHeightRatio;

}
4

0 に答える 0