Solved

openGL or active x for drawing 3d

Posted on 2009-05-09
12
879 Views
Last Modified: 2013-12-26
Hi.
I'd like to make my programming easier by using openGL or some active x to allow me to draw surfaces (square planes) and do rotation.
The reason that I don't want to do the transformations by myself is that its hard to draw planes that intersect.
I've tried:
http://www.ondotnet.com/pub/a/dotnet/2003/04/28/opengl.html
http://embedded.org.ua/opengles/lessons.html
and some other free dll's.
but I could not get them to work.
They complain about the missing glaux,glu,...
and then i realized that these are no longer in vb 2008, ...i tried to fix the errors, but there are still errors such as "Error spawning 'cmd.exe'."
Could you please submit a vb net 2008 code that actually works to draw a simple plane?
Thanks
0
Comment
Question by:kouroshparsa
  • 8
  • 4
12 Comments
 
LVL 20

Accepted Solution

by:
ikework earned 300 total points
ID: 24348573
hi kouroshparsa

if you want to start learning opengl, nehe has a lot of good tutorials, from first stepsto advanced technics, plus they have all tutorials as projects to download, so you dont have to worry about that. nehe is here:

http://nehe.gamedev.net

i recommend you to read particulary the first lessons ..

if you have any question, dont hesitate to ask .. :)


ike
0
 
LVL 2

Author Comment

by:kouroshparsa
ID: 24359727
Thanks for the comment.
I actually have looked at that website.
The sample codes do not work on VS Basic 2008 because of the header files:
#include <gl\gl.h>                                    
#include <gl\glu.h>      
#include <gl\glaux.h>
That's what I was talking about.
0
 
LVL 20

Expert Comment

by:ikework
ID: 24361805
there is visual basic code at the bottom of each lesson too ..
0
 
LVL 20

Expert Comment

by:ikework
ID: 24361838
0
 
LVL 2

Author Comment

by:kouroshparsa
ID: 24370837
I finally got it working. It needs a CSGL library , and installing the library does not work on vista, so i copied the library to the project folder and linked the project to it.
Fankly, i wish to get to know openGL quickly.

by the way, do you know why we use the "translatef" method to draw something else?
Don't all the shapes use the same coordinate?
0
 
LVL 20

Expert Comment

by:ikework
ID: 24371871
>> by the way, do you know why we use the "translatef" method to draw something else?
>> Don't all the shapes use the same coordinate?

"translatef" is used to put an object to its position in 3D-space. imagine you have a chair and a table, you dont want to render them both at the same position, do you?
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 2

Author Comment

by:kouroshparsa
ID: 24400872
no. but still it's ambiguous.
Let's say i want to draw a line from (100,100) to (100,200).

The demo that i downloaded does this:

draws a line from (0,0) to (0,100)
then translates it by <100,100>

so, is there any problem with creating a line object directly from (100,100) to (100,200) in openGL ?
0
 
LVL 20

Expert Comment

by:ikework
ID: 24401695
>> so, is there any problem with creating a line object directly from (100,100) to (100,200) in openGL ?

no, you can draw it directly like that
0
 
LVL 20

Expert Comment

by:ikework
ID: 24401722
its used to move complex objects like a car. if you want to move and rotate it in the *world*, you can use "translate" and "rotate", without recalculating the cars data (local-coordinates).
all you have to *recalculate* in order to move it, are the parameters for the "translate"-function, without changing the cars local-coordinates.
0
 
LVL 20

Expert Comment

by:ikework
ID: 24401729
btw. if you have open-gl specific questions, there is an opengl area here too:

http://www.experts-exchange.com/Programming/Game/Game_Graphics/OpenGL/
0
 
LVL 2

Author Comment

by:kouroshparsa
ID: 24404251
Thanks alot ikework.
0
 
LVL 20

Expert Comment

by:ikework
ID: 24405590
you're very welcome .. good luck, eh .. :)
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now