• Create Account

#Actualmystb

Posted 09 April 2013 - 08:37 AM

Helo,

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)
...
...
llwindow.set_window_style(style)
llwindow.create_window(title)

self:pushStates() -- [1]
end

function window:pushStates()
llwindow.get_handle().__RenderTarget__:pushGLStates()
end

function window:popStates()
llwindow.get_handle().__RenderTarget__:popGLStates()
end

function window:resetStates()
llwindow.get_handle().__RenderTarget__:resetGLStates()
end

function render:tick()
self:setWireFrameMode(self.d3doptions.WireFrameMode)
self:setDebugViewMode(self.d3doptions.DebugViewMode)
window:clear()
self.camera.object:update()
llrender.render(self.camera.object) --[2]

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

llrender.finalize()	--[7]
window:display()
end


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

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

#1mystb

Posted 09 April 2013 - 08:32 AM

Helo,

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)
...
...
llwindow.set_window_style(style)
llwindow.create_window(title)

self:pushStates() -- [1]
end

function window:pushStates()
llwindow.get_handle().__RenderTarget__:pushGLStates()
end

function window:popStates()
llwindow.get_handle().__RenderTarget__:popGLStates()
end

function window:resetStates()
llwindow.get_handle().__RenderTarget__:resetGLStates()
end

function render:tick()
self:setWireFrameMode(self.d3doptions.WireFrameMode)
self:setDebugViewMode(self.d3doptions.DebugViewMode)
window:clear()
self.camera.object:update()
llrender.render(self.camera.object) --[2]

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

llrender.finalize()	--[7]
window:display()
end


With 1,3,4,5,6 enabled and 2,4 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,4 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

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

PARTNERS