An OpenGL Application

Share Tips, Code Samples, etc. with the Visual Prolog community.
Post Reply
Chan Bok
Active Member
Posts: 69
Joined: 13 Sep 2000 23:01

An OpenGL Application

Unread post by Chan Bok » 9 Sep 2009 8:35

I recently launched a beta version of Axon Idea Processor (Axon2010) that uses GDI+ for 2D and OpenGL for 3D display (switcheable).

Many thanks to Gildas for pioneering OpenGL in VIP and sharing his knowhow by publishing the V3D package. Unlike V3D, the Axon version uses only opengl.lib and glu32.lib, but does not use vip7opengl.lib, glaux.lib, or c glue-codes.

OpenGL has many of the graphics features of GDI+, but is lacking in font support and hatch patterns. Performance is highly satisfactory due to the use of the graphics processor, frame buffers, and threading.

The software is still in the beta stage, and beta testers are most welcome.

Chan Bok
Axon Research
http://web.singnet.com.sg/~axon2000
Attachments
oo-gui.gif
An example of the 3D display.
oo-gui.gif (119.48 KiB) Viewed 9549 times

Chan Bok
Active Member
Posts: 69
Joined: 13 Sep 2000 23:01

Unread post by Chan Bok » 16 Sep 2009 0:05

Axon2010 is now post beta.
The Lite version is, as usual, freely available for download.

Chan Bok
Axon Research

Eki
Posts: 13
Joined: 17 Mar 2006 6:44

Re:

Unread post by Eki » 23 Jan 2010 14:20

Chan Bok wrote:Axon2010 is now post beta.
The Lite version is, as usual, freely available for download.

Chan Bok
Axon Research
Hi Chan,
your displays in your product seem interesting. Perhaphs you remember my work in St.Petersburg.
My blog is here: http://symbolicanalysis.wordpress.com/c ... mputation/

My purpose is to create and display symbols from source code. There are many dimensional links between codes symbols: control flow, data flow etc. Making animations could be nice.
There are some common elements in my work and your presentation about Vip dialog classes.

Do you have any recommendations how to program them in Prolog?

Best regards
Erkki

Chan Bok
Active Member
Posts: 69
Joined: 13 Sep 2000 23:01

Unread post by Chan Bok » 23 Jan 2010 16:15

Dear Erkki,

Firstly a belated congratulations to your PhD, and to your excellent work and blog,
and also your book that you showed me while in St. Petersberg.
I must admit I am overwhelmed by what I see.

As you can see I have experimented with both 2D and 3D.
I am not sure if you are referring to 2D or 3D, or both.

For 2D display I still use the GDI+ flat API on a conventional window for historical reason.
For a new project I will certainly consider the OO version.

For 3D much can be learned about OpenGL programming by studying Gildas' V3D package.

For a complex display with animation, performance become an issue.
For 2D, double-buffering is needed for smooth display.
3D has the advantage of hardware acceleration and buffer swapping.

Best Regards,

Chan Bok
Axon Research
Chan Bok
Axon Research

Eki
Posts: 13
Joined: 17 Mar 2006 6:44

Re:

Unread post by Eki » 25 Jan 2010 20:02

Chan Bok wrote:Dear Erkki,

Firstly a belated congratulations to your PhD, and to your excellent work and blog,
and also your book that you showed me while in St. Petersberg.
I must admit I am overwhelmed by what I see.

As you can see I have experimented with both 2D and 3D.
I am not sure if you are referring to 2D or 3D, or both.

For 2D display I still use the GDI+ flat API on a conventional window for historical reason.
For a new project I will certainly consider the OO version.
Gildas
For 3D much can be learned about OpenGL programming by studying Gildas' V3D package.

For a complex display with animation, performance become an issue.
For 2D, double-buffering is needed for smooth display.
3D has the advantage of hardware acceleration and buffer swapping.

Best Regards,

Chan Bok
Axon Research
Thank you for your friendlt words, Chan!
At first I will create 2D models as demos, but later I will check Guildas' 3D package.
In my current version symbols are VIP controls, because they are so easy to be programmed.

Regards
Erkki
Do you have some examples

Chan Bok
Active Member
Posts: 69
Joined: 13 Sep 2000 23:01

Unread post by Chan Bok » 29 Jan 2010 12:35

I don't have any examples other than the complete source codes (for Axon).
There are some examples in the Examples (that come with Visual Prolog) for drawing including a gdiplus demo.

Best Regards,

Chan Bok
Axon Research
Chan Bok
Axon Research

User avatar
jgbest
Active Member
Posts: 25
Joined: 22 Feb 2010 12:58

Unread post by jgbest » 10 Aug 2010 18:37

Chan,

I've used Axon and it's an amazing program that came to me naturally because I can create models that are designed after the way I think. I'm writing a program right now in Visual Prolog using OpenGL. I noticed how you have it where users can click on objects and move them around. I'm trying to do something similar in my own program and was wondering what OpenGL Library you used? I'm using the one from the example :

http://www.visual-prolog.com/vip/exampl ... OpenGL.htm

And it works nicely, although, I'm having trouble finding the GL_SELECT render modes, and even more importantly, the get pixel color method(s). I'm using the unique-color-for-each-object method and I need to be able to get the pixel colors. How were you able to get the selection of your objects working? Did you use a different library, did you write your own algorithm? Any help you could provide would be awesome.

Thank you!
James

Gildas Menier
Active Member
Posts: 78
Joined: 8 Jun 2004 23:01

Unread post by Gildas Menier » 10 Aug 2010 19:43

Hi James,

This may help you (see the end of the page for a (temp) download link) : http://www.arsaniit.com/en/prolog-tools ... opengl-v3d

The code should provide more or less what you need (the selection is also implemented using a single pass one-color draw when the user clicks with an off line buffer - I guess you see what I mean)

I am completely rewriting this package from scratch so this link won't be available too long. Feel free to pm to arsaniit if you have questions.

Best regards

Gildas

User avatar
jgbest
Active Member
Posts: 25
Joined: 22 Feb 2010 12:58

Unread post by jgbest » 11 Aug 2010 13:08

Glidas,

Thank you so much for your help. That source code has exactly what I'm looking for.

Thanks again!
James

User avatar
jgbest
Active Member
Posts: 25
Joined: 22 Feb 2010 12:58

Unread post by jgbest » 11 Aug 2010 16:36

Glidas,

One more thing: I'm having trouble compiling my code with yours. I only added everything in v3d to my project, but I'm getting this fatal error:

t process.
fatal error lnk2561: Fatal error 2561: Obj\opengl_bind.obj(Obj\opengl_bind.obj), file offset: 0000071E - Can't process.

Any idea what that means?

Thanks,
James

Post Reply