class RenderQueue
{
public:
/* type define */
typedef std::vector<Material*> MaterialSet;
typedef std::multimap<MaterialSet, Movable*> RenderMap;
typedef std::pair<MaterialSet, Movable*> RenderMapPair;
typedef std::multimap<MaterialSet, Movable*> ::iterator RenderMapIterator;
void addMovable(MaterialSet, Movable *);
void render();
private:
RenderMap m_renderList;
std::vector<MaterialSet> m_materialSetList;
GraphicDevice * m_device;
};
void RenderQueue::addMovable(MaterialSet material, Movable *Movable)
{
m_renderList.insert(RenderMapPair(material, Movable));
}
runtime error
You're not making too much sense. Could you ask in more of a question rather than a couple hard-to-understand sentances?
Another stunningly informative derek7 post [grin]
Seriously, man, you have to learn to start formulating proper questions and background information if you plan to have people help you in any way at all. Your post needs a little bit of something, such as perhaps more information on what is going wrong, code where it's going wrong, etc.
Seriously, man, you have to learn to start formulating proper questions and background information if you plan to have people help you in any way at all. Your post needs a little bit of something, such as perhaps more information on what is going wrong, code where it's going wrong, etc.
Quote:Original post by SirLuthor
Seriously, man, you have to learn to start formulating proper questions
Try to have some patience. He's Chinese and (obviously) not fluent in English.
void RenderQueue::addMovable(MaterialSet material, Movable *Movable)
That shouldn't even compile, because you are using a class name as a variable. So if you're getting a runtime error something is quite wrong.
CM
That shouldn't even compile, because you are using a class name as a variable. So if you're getting a runtime error something is quite wrong.
CM
Quote:Original post by Conner McCloud
void RenderQueue::addMovable(MaterialSet material, Movable *Movable)
That shouldn't even compile, because you are using a class name as a variable. So if you're getting a runtime error something is quite wrong.
CM
Perhaps he actually meant compile-time error?.
Use this code instead:
void RenderQueue::addMovable(MaterialSet material, Movable *movable){ m_renderList.insert(RenderMapPair(material, movable));}
Off topic: derek7, perhaps occasionaly use an online translator to compose longer posts, sometimes your posts are a bit hard to understand. Keep practicing english though, using a translator is fine but don't get lazy [wink]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement