On 4.10.2013 13:17, Sajjadul Islam wrote:
Hi Forum,

I know that this topic is widely discussed here to run shading language 4 with 
OpenGL 3 and onwards using the compatibility profile. I checked the 
osgsimplegl3 and osgvertexattrib array example. Then i try to compile the a 
simple application with a pass through shader only , but i am having the 
following error:


Code:

Got an X11ErrorHandling call display=0x9c41880 event=0xb3fadf2c
GLXBadDrawable
Major opcode: 135
Minor opcode: 11
Error code: 146
Request serial: 9503
Current serial: 9503
   ResourceID: 73400323




I am also attaching the code snippet for your kind review:


Code:

Hi Sajjadul,

1. add some window dimensions to the traits like:

  traits->x = traits->y = 20;
  traits->width = 800;
  traits->height = 600;

2. set viewport to the camera

  camera->setViewport(0,0,traits->width,traits->height);

3. you may also want to enable gc->getState()->setUseModelViewAndProjectionUniforms(true);

Robert Milharcic
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to