PDA

View Full Version : clanlib3.0 GUI Program crashed



kyelin
05-20-2015, 03:32 PM
crash info:
76852
76853

only gui Program crashed


computer info:
winxp sp3, graphics card: mobile intel 965 express chipset family, support opengl2.0

how to fix
or
any way can check support before crash

rombust
05-21-2015, 07:36 AM
Please can you verify that the attachment works, I am getting "Invalid Attachment specified".

kyelin
05-21-2015, 09:51 AM
ho! sorry, I had submit image again
and today i got another crash

stack:
> atioglxx.dll!69368c80()
game.exe!clan::GL1FrameBufferProvider::sync_pbuffe r() line 263 C++
game.exe!clan::GL1FrameBufferProvider::attach_colo r(const std::queue<ClientPacket *,std::deque<ClientPacket *,std::allocator<ClientPacket *> > > & attachment_index=0) line 118 C++

code postion
file: gl1_frame_buffer_provider.cpp
func: void GL1FrameBufferProvider::sync_pbuffer()
crashed when call glBindTexture(GL_TEXTURE_2D, 0);

rombust
05-22-2015, 08:23 AM
I see from that screen shot that you are using ClanLib 3.0

The crash appears in sync_pbuffer, that's the GL1 (legacy GL) clanGL target, for OpenGL that is less than 3.2

Looking at the GIT logs, the framebuffer handling has had some bug fixes, for example: https://github.com/sphair/ClanLib/commit/785521bbed7cc55aea93216d1b5537160f94b570#diff-bc27ee6c0000ca8fa291e53fb0adb897L179
It's possible, that you might have to manually apply these.

Personally, I would avoid using clanGUI. It was removed in clanlib 4.0. Although it works, it was too complex, replaced with clanUI.
However, clanUI doesn't support legacy GL. It supports the Direct3D target, that your card might support.

Sorry, I can't be more help.

kyelin
05-23-2015, 06:28 AM
Thank you all the same, i confirmed the GL1FrameBufferProvider was latest.

is possible to post clanUI to ClanLib3.0 for i have to use vs2010?

rombust
05-26-2015, 09:39 PM
It would be possible, but to be honest, it is not something that I would personally attempt.

clanUI requires OpenGL 3.2 (for the path drawing). Although this could be stripped out, you would loose the CSS style rendering.

Porting from ClanLib 3.x to ClanLib 4.x should be simple, as long as you have a C++11 compiler.

kyelin
05-27-2015, 02:02 PM
clanlib3.0, opengl_window_provider_wgl.cpp


void OpenGLWindowProvider::update(const Rect &_rect)
{

OpenGL::set_active(gc);
glFlush();
if (using_gl3)
{
update_helper(_rect);
}
else
{
int width = get_viewport().get_width();
int height = get_viewport().get_height();
GLint old_viewport[4], old_matrix_mode;
GLfloat old_matrix_projection[16], old_matrix_modelview[16];
glGetIntegerv(GL_VIEWPORT, old_viewport);
glGetIntegerv(GL_MATRIX_MODE, &old_matrix_mode);
glGetFloatv(GL_PROJECTION_MATRIX, old_matrix_projection);
glGetFloatv(GL_MODELVIEW_MATRIX, old_matrix_modelview);
GLboolean blending = glIsEnabled(GL_BLEND);
glDisable(GL_BLEND);

glViewport(0, 0, width, height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glMultMatrixf(Mat4f::ortho_2d(0.0f, (float)width, 0.0f, (float)height, handed_right, clip_negative_positive_w));
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();

update_helper(_rect);

if (blending)
glEnable(GL_BLEND);
glViewport(old_viewport[0], old_viewport[1], old_viewport[2], old_viewport[3]);
glMatrixMode(GL_PROJECTION);
glLoadMatrixf(old_matrix_projection);
glMatrixMode(GL_MODELVIEW);
glLoadMatrixf(old_matrix_modelview);
glMatrixMode(old_matrix_mode);
}
OpenGL::check_error();
}


whether using_gl3 is true or not , function update_helper will be called, then glBlitFramebuffer be called in update_helper,
bug glBlitFramebuffer only supported by opengl 3.0. (https://www.opengl.org/wiki/GLAPI/glBlitFramebuffer)

bug i am a blindman in opengl, i don't know how to fix.

rombust
05-27-2015, 04:06 PM
I guess nobody has had to use the GUI System Manager with Legacy GL in ClanLib 3.0.

It looks like the update() function is also incorrect for ClanLib 4.0 as well, but as far as I know, no one uses it.

This code "might" work, instead of calling update_helper() for legacy gl.



glReadBuffer(GL_BACK);
glDrawBuffer(GL_FRONT);

glRasterPos2i(rect.left, height - rect.bottom);
gPixelZoom(1.0f, 1.0f);

glCopyPixels(
rect.left, height - rect.bottom,
rect.right - rect.left, rect.bottom - rect.top,
GL_COLOR);

glDrawBuffer(GL_BACK);
glFlush();

kyelin
05-28-2015, 03:38 AM
:hat:, I will try it, tks for you and your Patience.