<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: 3D Dialog using OpenGL in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/3d-dialog-using-opengl/m-p/1356956#M26247</link>
    <description>You can't use glut as it is expecting a main program, if you have an Arx program it is a .dll and Autocdad is the main program. &lt;BR /&gt;
&lt;BR /&gt;
You need to encapsulate the opengl in an activeX control, then you should be able to use it like any other control in VC++ or VB or dotnet.</description>
    <pubDate>Fri, 17 Jun 2005 12:59:50 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2005-06-17T12:59:50Z</dc:date>
    <item>
      <title>3D Dialog using OpenGL</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/3d-dialog-using-opengl/m-p/1356955#M26246</link>
      <description>I am trying to create my own AutoCAD dialog box with interactive 3D graphics and animation. To this end, I wrote a simple ARX program that use OpenGL's GLUT utilities. Everything works beautifully until I close the dialog box. I have tried many things, but so far nothing works. Here is the basic code:&lt;BR /&gt;
&lt;BR /&gt;
// (arxload "Test.arx")&lt;BR /&gt;
#include &lt;ACED.H&gt;&lt;BR /&gt;
#include &lt;GL&gt; // glut.h&lt;BR /&gt;
int argc=1, dialog; char *argv[]={""};&lt;BR /&gt;
void display(void) {char str[]="Press 'Esc' to exit";&lt;BR /&gt;
 glColor3f(1,1,1); glRasterPos2f(0,0);&lt;BR /&gt;
 for(int i=0; i&amp;lt;(int)strlen(str); i++) {&lt;BR /&gt;
  glutBitmapCharacter(GLUT_BITMAP_HELVETICA_12, str&lt;I&gt;);&lt;BR /&gt;
 }&lt;BR /&gt;
 glutSwapBuffers();&lt;BR /&gt;
}&lt;BR /&gt;
void keyboard(unsigned char key, int x, int y) {if(key==27) {&lt;BR /&gt;
 glutDestroyWindow(dialog);&lt;BR /&gt;
 glutLeaveMainLoop(); // requires freeglut.h&lt;BR /&gt;
}}&lt;BR /&gt;
extern "C" AcRx::AppRetCode acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt) {&lt;BR /&gt;
 switch (msg) {&lt;BR /&gt;
  case AcRx::kInitAppMsg:&lt;BR /&gt;
   acrxDynamicLinker-&amp;gt;unlockApplication(pkt);&lt;BR /&gt;
   acrxDynamicLinker-&amp;gt;registerAppMDIAware(pkt);&lt;BR /&gt;
   glutInit(&amp;amp;argc,argv);&lt;BR /&gt;
   glutInitDisplayMode(GLUT_DOUBLE);&lt;BR /&gt;
   dialog=glutCreateWindow("My Dialog");&lt;BR /&gt;
   glutDisplayFunc(display);&lt;BR /&gt;
   glutKeyboardFunc(keyboard);&lt;BR /&gt;
   glutMainLoop(); // this might be a problem&lt;BR /&gt;
  break;&lt;BR /&gt;
 }&lt;BR /&gt;
 return AcRx::kRetOK;&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
Maybe it has something to do with my acrxEntryPoint. Any suggestions? I think it will be very cool if I can get this to work right.&lt;/I&gt;&lt;/GL&gt;&lt;/ACED.H&gt;</description>
      <pubDate>Fri, 17 Jun 2005 03:39:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/3d-dialog-using-opengl/m-p/1356955#M26246</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-06-17T03:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: 3D Dialog using OpenGL</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/3d-dialog-using-opengl/m-p/1356956#M26247</link>
      <description>You can't use glut as it is expecting a main program, if you have an Arx program it is a .dll and Autocdad is the main program. &lt;BR /&gt;
&lt;BR /&gt;
You need to encapsulate the opengl in an activeX control, then you should be able to use it like any other control in VC++ or VB or dotnet.</description>
      <pubDate>Fri, 17 Jun 2005 12:59:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/3d-dialog-using-opengl/m-p/1356956#M26247</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-06-17T12:59:50Z</dc:date>
    </item>
  </channel>
</rss>

