c++ - Qt 5.0.2 and OpenGL 3+ rendering problems -
i have written tiny opengl engine uses 3+ functions. trying integrate engine in qglwidget , have problems. when rendering obj model without qt framework have got expected results, when using qt opengl buffers corrupted in way see wrong result or nothing.
without qt:
in qglwidget:
i want ask whether qt changes opengl states between qglwidget::paintgl() calls. objects initialized , rendered in following order:
initialization:
create , bind vertex array create , bind vertex buffer fill vertex buffer (works fine - obj loader tested many times) calls glvertexattribpointer() , glenablevertexattribarray()
rendering:
bind vertex array shaders, uniforms, etc. gldraw*()
the issue seeing because qt setting c locale on system you, expecting floats comma delimited instead of period delimited.
you can work around resetting local else after invoke qapplication
for example:
std::setlocale(lc_all, "posix");
Comments
Post a Comment