PDA

View Full Version : Are there any other delphi - opengl programmers



svg
06-16-2001, 09:03 AM
hey guys out there.

I'm sure there are more delphi programmers than only me.

I would be greatfull if any delphi programmer will "join" this topic.
if you are ( or if you know somebody) please report you or his or her name here in the topic.

thanks guys.

VladR
06-16-2001, 09:36 AM
Hi. I also work in Delphi. But I have just started. I`m through several NeHe tutorials and by now I am working on terrain engine. How far are you by now ?

svg
06-17-2001, 01:09 AM
This is totally great. Well,
I'm just started too( a month of 3).
And know what. I want to make some kind of a flightsim. you know.
with an terrain engine.
The only problem is that i'm just 14 years old. I hope that we can help together.
I have the book "opengl Superbible - second edition".

Cool. maybe you can post your mail ( here's mine).

myemailadres := 'stijn''sadres@hotmail.com';
http://www.opengl.org/discussion_boards/ubb/smile.gif

svg
06-17-2001, 01:13 AM
maybe it's a bit confused.

my email address is
stijnsadres@hotmail.com

and

A/S/L ???????????????

ffish
06-17-2001, 02:32 AM
Tom Nuydens is a regular poster to these forums. He seems to be a Delphi expert. Check his sites out at http://www.gamedeveloper.org/delphi3d/ (old) and http://www.delphi3d.net/ (new)

Remember, OpenGL looks almost the same (and the techniques are the same) in any language (except maybe assembly) so you should be able to understand tutorials etc in other languages. Also, not meaning to be grumpy but try not to make off topic posts, especially on the advanced forum http://www.opengl.org/discussion_boards/ubb/wink.gif OpenGL questions are welcome but sometimes people don't react too well to questions that don't concern OpenGL.

Hope that helps.

svg
06-17-2001, 04:02 AM
sorry, when you told me i should not ask questions here which are not for opengl.

i looked at my question and you're right.
I forgot to say delhi - opengl prgrammers.

sorry

masonium
06-17-2001, 05:07 PM
You should know that C++ is more powerful and much easier to develop in, but that's just my opinion.

MButchers
06-17-2001, 11:25 PM
Hi there,

ive been programming in delphi-opengl for
the past 6 months, c++builder- delphi before
that for about 2 years.

As for masonium's post, well i find it all
depends on what your used to.I took a full
time position programming in delphi after
using C++ at work and thought it would
be easier to use delphi both at home and at work
than having to migrate between the two every
day.

I am currently working on an isometric engine
that is fully upadatable within the VCL and
has VCL components for list boxes etc that
use OpenGL for rendering. (all usable at
design time).

Never been to Dehli though. not even anywhere
close to India.

see yas.

Gavin
06-18-2001, 02:37 AM
How handy, Just been writing a gl app for a client in delphi (not done it before) and have a little prob.
When drawing over the top of my GL context, using the canvas I need to repaint with each mouse move (dragging stuf about etc). The GL double buffered window is fine but the canvas stuff flickers like hell. Anyway of double buffering this or stopping it?

gav

masonium
06-18-2001, 03:37 AM
Acutally, I've been wanting to migrate to a less complicated programming language. I mean, who in the world has ever used a template class? I was looking mainly at some non-curlies languages (i.e. Delphi, VB, etc.) so pretty soon I'll probably be badmouthing C++.

ffish
06-18-2001, 03:44 AM
I use templates all the time. For example, I have a template matrix class and a template quaternion class that I then specialise for doubles or floats depending on the application. Templates are just as easy to write as normal classes but much more flexible. Cheaper than polymorphism at run time too.

VladR
06-18-2001, 03:56 AM
svg:
My email address is in Profile of my reply but anyway: vladimir_repcak@hotmail.com
Please read your email at last.

masonium
06-18-2001, 03:59 AM
ffish, so someone uses template classes. But I'm not sure how to implement them. I have three books on C++, all of which seem to suck. But that's ok, though, because I combined their knowledge and it turned ou to be equivalent to one good book.

The point is, how do you use template classes?

ffish
06-18-2001, 04:29 AM
This is very off topic but anyway:



// Template for a quaternion object with common operations for performing 3D transformations.
// Note that when I say quaternion, I mean unit quaternion. Currently only useful for rotations.
// Designed to be used as quaternion<float> or quaternion<double>. Because of some specific
// function calls, won't work with other types.
template <class T> class quaternion {
public:
// Convenient rename.
typedef quaternion qt;

// Constructors & destructor.
quaternion();
explicit quaternion(const qt&amp; q);
explicit quaternion(const T&amp; rot, const T&amp; x, const T&amp; y, const T&amp; z);
explicit quaternion(const T m[]);
explicit quaternion(const T&amp; roll, const T&amp; pitch, const T&amp; yaw);
~quaternion();

// Common operations on a quaternion.
qt&amp; operator=(const qt&amp; q);
const qt conjugate() const;
void normalize();
const qt inverse() const;
void matrix(T m[]) const;
void axisAngle(T v[]) const;
const T norm() const;
const T modulus() const;
qt&amp; operator*=(const qt&amp; rhs);
// operator T*() const;

// Indices for accessing the quaternion.
enum index { w=0, x, y, z };

// Constant accessor for the values held in a quaternion.
inline const T&amp; operator[](const unsigned short int i) const { return _q[i]; };

private:
// Mutator for the values held in a quaternion.
// Don't need it public.
inline T&amp; operator[](const unsigned short int i) { return _q[i]; };

// Internal storage for a quaternion.
T* _q;
};

// Convenient rename.
template<class T>
typedef quaternion<T> qt;

// Constructor for the quaternion class. Allocates memory and assigns default values.
template<class T>
quaternion<T>::quaternion() : _q(new T[4])
{
_q[w] = 1.0f;
_q[x] = 0.0f;
_q[y] = 0.0f;
_q[z] = 0.0f;
}
// etc...

Then you use them like this:



// ...
quaternion<float> q1();
// Do some stuff with it ...
quaternion<double> q2();
// Do some stuff with it ...
quaternion<int> q3();
// Do some stuff with it (although this class is designed for floats and doubles only).

They're extremely useful, one of the most powerful features of C++. There's also a very tricky use for them called template metaprogramming. You need a good compiler (VC++ isn't one - good IDE but poor compiler) and you can do some very cool maths, etc. Do a search for template metaprogramming or buy "Game Programming Gems". Be warned, you should know how to use regular templates first and have a strong knowledge of recursion principles.

Hope that helps.

MButchers
06-18-2001, 11:43 AM
Gavin ,

what sort of controls or output
are you trying to achieve???

06-18-2001, 11:52 AM
To answer your question about how to use templates, the best answer I can think of is that a template is simply a variable for a class. In English, all it means is templates are just a variable, like T, where you would place a class name. For instance, you can declare a class like this:
template <class T>
class Node
{
...
}
In parameters, they go like this:
void SomeFunc(T * SomeClass)
The T just reserves a space for a class. The user can then stick any object in place for T. This is helpful for linked lists. Instead of implementing several versions of linked lists (lots of copying and pasting) to link several different objects, you can use the template to just implement one linked list to link many varied objects. The book I have explains it pretty clearly. It is really helpful and saves you a lot of time and grief.

masonium
06-18-2001, 12:01 PM
thanks for the info on templates, but I just remembered that the topic was Delphi. I think I'm goin to learn Delphi so that I'll be good at languages besides the curly-braced (C and Java) and the pseudo- (HTML, XML, VRML).

[This message has been edited by masonium (edited 06-18-2001).]