Jump to content

  • Log In with Google      Sign In   
  • Create Account

Mixing SFML and Horde3D: operation not allowed in current state

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1   Members   -  Reputation: 186


Posted 09 April 2013 - 08:32 AM



I'm trying to get a mix of lua, horde3d and SFML up and running, but I've come across a problem that I'm unable to solve.

I already built everything and I made up a test scenario with SFML only output:




Just some random labels:)

I tried to incorporate Horde3D, but that simply fails. So, I just commented out the SFML output, and voila:




That's a simple Tetris like piece.


But if I try to have both at the same time, the application crashes.

I "know" the problem must reside in the opengl states, and I tried to push and pop the states, but haven't figured it out.


Here's the code (in one snippet but scatered through some files):

function window:create(cfg)

  self:pushStates() -- [1]

function window:pushStates()

function window:popStates()

function window:resetStates()

function render:tick()
	llrender.render(self.camera.object) --[2]

	window:popStates() --[3]
	window:resetStates() --[4]
	overlaymanager:tick(self.dimensions) --[5]
	window:pushStates() --[6]
	llrender.finalize()	--[7]

With 1,3,4,5,6 enabled and 2,7 commented out, SFML outputs ok, but outputs this message once:


An internal OpenGL call failed in RenderTarget.cpp (269) : GL_INVALID_OPERATION, the specified operation is not allowed in the current state


With 1,3,4,5,6 commented and 2,7 enabled Horde3d outputs ok.


With any combination of these... app crashes first time that llrender.render(self.camera.object)  is called or after outputting several GL_INVALID_OPERATION messages like above.


Any help would be appreciated smile.png


P.S: sorry for my spelling/grammar, I'm portuguese.

Edited by mystb, 09 April 2013 - 08:37 AM.

#2   Members   -  Reputation: 582


Posted 16 April 2013 - 12:05 AM

are you mixing OpenGL with d3d? O_O that's not valid unless you have different windows. 1 window with GL and 1 window with DX.


OpenGL call fails because there is no valid active GL context (because you have d3d context).


In your case having DX / GL calls wrapped by some other library does not magically remove that low-level issue such as the one of active graphics context. You can't forget about everything about hardware and other APIs.

Edited by DemonDar, 16 April 2013 - 12:11 AM.

Don't ask my opinion about Unity3D.. here it is ! :D

- Big middle finger to AAA engines, indies team spreaded the word

- Then license price increase, big middle finger to indie teams too

- They integrated third-party ads, they have analytics, and missing their own ad network, missed  opportunity of a big middle finger to advertising services.

A Good tool, with a bad marketing.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.