[Development] problem toolbar on mac osx 10.9.2

2015-09-08 Thread Alessio Mochi
Hello,
I have a mainwindow application with a QGLWidget component and a left toolbar.
When I try to show hide toolbar button the behavior on window 7 is different 
from that in mac osx 10.9.2.
Hide toolbar button in windows 7 overlap the qglwidget component in the right 
way while on mac osx does not overlap.
I attach some screenshot to explain better and the complete c++ source code.

Window 7 screen shot (ok)screenW7.png

|   |
|   |  |   |   |   |   |   |
| screenW7.png |
|  |
| Visualizza su drive.google.com | Anteprima per Yahoo |
|  |
|   |

Mac osx 10.9.2 (issue)mac.png

|   |
|   |  |   |   |   |   |   |
| mac.png |
|  |
| Visualizza su drive.google.com | Anteprima per Yahoo |
|  |
|   |


Full source code about this 
application:https://drive.google.com/file/d/0BzoYtkGko_O3dzh6VFpzRkFpSTA/view?usp=sharing
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


[Development] glew question

2015-08-04 Thread Alessio Mochi
Hello,someone can say me if is possible use glew with qt 5.4 or qt 5.5?I would 
like avoid to change my code.___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


[Development] strange behavior with plugin

2015-04-21 Thread Alessio Mochi
Hello,

I tried to add some code for opengl vbo creation inside my qt plugin. 
I initialize vbo buffer inside the plugin and after it my program crash in 
rendering vbo method on one glBindBuffer call.

this function is called when plugin start and after it my application crash on 
a rendering method while 
render the tooth node just created.
bool testPlugin::StartEdit(RenderNode & r, GLArea *gla ) 
{ 
   connect(this,SIGNAL(createVbo()),gla,SLOT(updateVbo())); 
   RenderNode * meshNode=new Tooth("test",&r); 
   MeshModel * model=new MeshModel("test.ply"); 
   int result=vcg::tri::io::ImporterPLY::Open(model->cm, 
"d:/debugMesh/save.ply", NULL); 
   vcg::tri::UpdateNormal::PerVertexPerFace(model->cm); 
   meshNode->toMeshNode()->setMeshModel(model); 
   r.appendChild(meshNode);
   emit createVbo();
}


createVbo is a signal connected to updateVbo() 
GLArea slot. GLArea is a derivate of GLWidget class.

I don't know why but if I create an external slot inside GLArea with the code 
contains in 
testPlugin::StartEdit function my program run correctly while if I let all the 
code inside the 
testPlugin::StartEdit the rendering function called in GLArea crash.
My render code is in my application (.exe) and is in a method of GLArea.


I noticed a strange behavior with debugger looking the stack call function. 
When the Tooth and MeshModel object is instanced inside my plugin class the 
method draw in GLArea call the draw method relative to Tooth object and 
referring to plugin code.

while when Tooth and MeshModel object is instanced outside my plugin class the 
draw method for the Tooth object is relative to application code (.exe). When 
the tooth draw code is referred to plugin my application crash.
Tooth is subclass of MeshNode.

This is the stack call of render function when plugin code is outside from it 
and it's connected
to plugin signal. Inside the plugin there is only a emit that call external vbo 
initialization code.

DentalCad.exe!MeshModel::Render(vcg::GLW::DrawMode _dm=DMSmooth, 
vcg::GLW::ColorMode _cm=CMPerMesh, vcg::GLW::TextureMode _tm=TMNone)  Line 111 
C++ 
DentalCad.exe!MeshNode::draw(const RenderMode & rmode={...})  Line 125 + 0x39 
bytes C++ 
DentalCad.exe!GLArea::renderSceneGraph(RenderNode * root=0x0519b330, bool 
filterTooths=false, const vcg::Color4 & colorPerMesh={...})  
Line 591  C++ 
DentalCad.exe!GLArea::paintEvent(QPaintEvent * event=0x0035cb4c)  Line 400  
C++ 



and this is the stack call when all the code is inside the plugin (in this case 
application crash!)
testPlugin.dll!vcg::GlTrimesh > >::DrawFill<1,1,0>()  Line 477   C++ 
testPlugin.dll!vcg::GlTrimesh > >::Draw<6,1,0>()  Line 433   C++ 
testPlugin.dll!vcg::GlTrimesh > >::Draw<6,1>(vcg::GLW::TextureMode tm=TMNone)  
Line 394 + 0x8 bytes  C++ 
testPlugin.dll!vcg::GlTrimesh > >::Draw<6>(vcg::GLW::ColorMode cm=CMPerMesh, 
vcg::GLW::TextureMode tm=TMNone)  Line 382 + 0xc bytes  C++ 
testPlugin.dll!vcg::GlTrimesh > >::Draw(vcg::GLW::DrawMode dm=DMSmooth, 
vcg::GLW::ColorMode cm=CMPerMesh, vcg::GLW::TextureMode tm=TMNone)  Line 370 + 
0x10 bytesC++ 
testPlugin.dll!MeshModel::Render(vcg::GLW::DrawMode _dm=DMSmooth, 
vcg::GLW::ColorMode _cm=CMPerMesh, vcg::GLW::TextureMode _tm=TMNone)  Line 115  
  C++ 
testPlugin.dll!MeshNode::draw(const RenderMode & rmode={...})  Line 125 + 0x39 
bytesC++ 
DentalCad.exe!GLArea::renderSceneGraph(RenderNode * root=0x05019768, bool 
filterTooths=false, const vcg::Color4 & colorPerMesh={...})  
Line 591  C++ 
DentalCad.exe!GLArea::paintEvent(QPaintEvent * event=0x0041ca14)  Line 400  
C++ 



Thanks in advance.

Ale.
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] share opengl resource

2015-03-31 Thread Alessio Mochi
Hello Matthew,


thanks for reply. 
 
Actually I have two or three different rendering context (create multiple 
QGLWidget).
Your solution for qt 4.7 is right for share resource (I would like share vbo 
between different rendering context)? 
Can you link a qt example or documentation? 

Thanks in advance.

Ale.
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


[Development] share opengl resource

2015-03-31 Thread Alessio Mochi
Hello,I am reading that share opengl resource is possible with wglShareList.My 
software run on windows and mac and I would like know ifexist some qt support 
to share opengl resource. I use qt 4.7.4. ___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


[Development] ot: qt development information

2015-02-24 Thread Alessio Mochi
I would like know if exist an integration plugin for vs2013 that work with qt 
4.8.Thanks. ___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


[Development] QGLWidget and GL_ALPHA_BITS

2015-01-29 Thread Alessio Mochi
Hello,I don't know why when I retrive information on GL_ALPHA_BITS in qt 
programreturn 0.
GLint alpha_bits; glGetIntegerv(GL_ALPHA_BITS, & alpha_bits);
alpha_bits return 0 while in glut application return 8.

I tried to initialize QGLWidget with QGLFormat but does not work.
QGLFormat glFormat; glFormat.setAlpha(true); glFormat.setAlphaBufferSize(8); 
glFormat.setStencil(true); GLApp w(glFormat);
where class GLApp : public QGLWidget
Please help me.

 ___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development