PDA

View Full Version : opengl in C/C++



zak
21-07-2009, 11:11
Hi Petr, Hi all
i want to tell you that i have posted a question in the opengl forum here :
http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=261029#Post261029
in the beginners questions, with a reference to the page:
http://community.thinbasic.com/index.php?topic=2675.0
please have a look at the page.
the second issue: is it possible to use your thinBasic_TBGL.dll as a general dll like the Oxygen dll ??
regards

Michael Hartlef
21-07-2009, 11:48
Hi zak, right now it is not possible to use TBGL as a general DLL.

Petr Schreiber
21-07-2009, 12:00
Hi Zak,

thanks a lot for the links, I am happy you found the code interesting enough to translate :)

Mike is right - TBGL is currently not possible to use from other than ThinBASIC language, because it is build like module, not like standard DLL. The difference is mainly in the way parametrs are passed.

I will consider doing general purpose DLL, but currently I know I would not have time to give proper support to it, on many forums, many languages.

I also like some hacks which ThinBASIC SDK allows me to do, because of community here and SDK I keep it ThinBASIC exclusive for the moment.

But as I said - I am keeping it in mind and don't say no, just need to solve some productivity issues (documentation, tutorial service, design, ... :))
Which parts of TBGL do you consider most useful / do you use most?

Regarding the light problem - I did not looked in much detail to it, but I posted reply on possibly related problem at OpenGL forums.


Petr

zak
21-07-2009, 13:02
Hie Petr, Hi MikeHart
the major features in tbgl is the conciseness , i guess a one instruction embed many opengl instructions, this is why the fan example in thinbasic is very small, while in the vc6++ is very big, when i want to make a glScalef to a sphere in c++ i must add glEnable(GL_NORMALIZE); after it, else the lighting will be dim. while in thinbasic i think i can make scaling without degenerating the light quality.
so managing the normal pitfalls is important.
but also i suggest to keep the parameters available in the original opengl ; such as in Tbgl we have:
TBGL_Torus MinorRadius, MajorRadius
while in the opengl:
glutSolidTorus ( innerRadius , outerRadius , nsides , rings )
this is most important with the wire representations:
glutWireTorus ( innerRadius , outerRadius , nsides , rings )
because we may need to display more or less wires in the figure.
i am using programming as a hobby , this is why i am jumping from language to another without being expert in any one language.
the fan rotation example i have translated it first to perl, with the same lighting problem, then i have a hard time in translating it to vc6
to be able to post in the opengl forum
i will try again your suggestion about the push/pop instructions.
best wishes

Petr Schreiber
21-07-2009, 13:55
Hi Zak,

thanks a lot for your input, it is very important :occasion:

It is true some of TBGL commands encapsulate more code, some are internally very polymorph and adapt with different code to best match the architecture it runs on.

Torus and all primitives in TBGL as custom coded, they do not rely on quadrics functions. Overall quality can be controlled using TBGL_SetPrimitiveQuality, but I will make some further enhancements in the future, to make the primitive setup more versatile.


Petr