Do not use on any
shared computer
July 24, 2008 07:47pm pdt
null
[x]
Attachment Details

OGRE EXCEPTION(3:RenderingAPIException): Failed to DrawPrimitive : Invalid call in D3D9RenderSystem::_render

Tags: C++ OGRE, OGRE EXCEPTION(3:RenderingAPIException): Failed to DrawPrimitive
I am working a game in C++ with OGRE and CEGUI. The game works fine on our workstations but when we try to run it on our game platform, which is Samsung Ultra Mobile Personal Computer (UMPC), the game crashes and the log says this:

OGRE EXCEPTION(3:RenderingAPIException): Failed to DrawPrimitive : Invalid call in D3D9RenderSystem::_render at ..\src\OgreD3D9RenderSystem.cpp (line 2719)

[Exception: 4] "Error details in ogre.log" in Star::OgreGraphicsSystemImpl::startRenderCycle (.\Graphics\Ogre\OgreGraphicsSystemImpl.cpp:174)

And ogre.log says pretty much the same thing:

11:09:42: Can't assign material HairScruffy to SubEntity of hair-male-scruffy.meshHeadMount13552 because this Material does not exist. Have you forgotten to define it in a .material script?
11:09:42: Mesh: Loading shoe.mesh.
11:09:42: WARNING: shoe.mesh is an older format ([MeshSerializer_v1.30]); you should upgrade it as soon as possible using the OgreMeshUpgrade tool.
11:09:42: Texture: shoe.jpg: Loading 1 faces(PF_R8G8B8,256x256x1) with 5 generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
11:09:43: Mesh: Loading ../media/models/rain.mesh.
11:09:43: WARNING: ../media/models/rain.mesh is an older format ([MeshSerializer_v1.30]); you should upgrade it as soon as possible using the OgreMeshUpgrade tool.
11:09:43: Texture: rain.png: Loading 1 faces(PF_A8R8G8B8,512x512x1) with 5 generated mipmaps from Image. Internal format is PF_A8R8G8B8,512x512x1.
11:09:44: OGRE EXCEPTION(3:RenderingAPIException): Failed to DrawPrimitive : Invalid call in D3D9RenderSystem::_render at ..\src\OgreD3D9RenderSystem.cpp (line 2719)
11:09:45: Render Target 'rtt/34656128' Average FPS: 8.26735 Best FPS: 32.07 Worst FPS: 0.247944
11:09:45: *-*-* OGRE Shutdown

Again, this only happens on the UMPC. I can't find file OgreD3D9RenderSystem.cpp anywhere on my computer. Here is the code for OgreGraphicsSystemImpl:

void OgreGraphicsSystemImpl::startRenderCycle()
{
try {
bool keepGoing = true;
while(keepGoing)
{
#ifdef NOVIDEO
keepGoing = mRoot->_fireFrameStarted();
keepGoing &= mRoot->_fireFrameEnded();
#else

//Ogre::WindowEventUtilities::messagePump();
Ogre::WindowEventUtilities::messagePump();
keepGoing = mRoot->renderOneFrame();
//std::stringstream ss;
//ss << mWindow->getAverageFPS();
mWindow->update();

// update the movie
if(mVideo)
mVideo->update();
#endif
}
//mRoot->startRendering();
}
catch(Ogre::Exception &e)
{
Logger::getSingletonPtr()->logf(Logger::LOG_CRITICAL, e.getFullDescription().c_str());
THROW_EXCEPTION(Exception::SUBSYSTEM_ERROR, "Error details in ogre.log");
}
}

where line 174 is:

THROW_EXCEPTION(Exception::SUBSYSTEM_ERROR, "Error details in ogre.log");

Does anybody have any idea what is going on here?
Start your free trial to view this solution
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Question Stats
Zone: Programming
Question Asked By: Lou1
Solution Provided By: Lou1
Participating Experts: 1
Solution Grade: A
Views: 0
Translate:
Loading Advertisement...
 
[+][-]Assisted Solution by JoseParrot

Rank: Master

Assisted Solution by JoseParrot:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by Lou1
Author Comment by Lou1:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by Lou1
Author Comment by Lou1:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Accepted Solution by Lou1
Accepted Solution by Lou1:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080723-EE-VQP-34 / EE_QW_2_20070628