www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Is there a module that supports OpenGL 2.0?

reply Cris <central_p hotmail.com> writes:
Is there a module that supports OpenGL 2.0 in D?
All I see is support for 1.1,1.2 and I think GLFW has 1.4 or 1.5.


Cris
Feb 21 2006
parent reply clayasaurus <clayasaurus gmail.com> writes:
Cris wrote:
 Is there a module that supports OpenGL 2.0 in D?
 All I see is support for 1.1,1.2 and I think GLFW has 1.4 or 1.5.
 
 
 Cris

http://www.lessequal.com/software/ for win32.
Feb 21 2006
parent reply Cris <central_p hotmail.com> writes:
clayasaurus wrote:
 Cris wrote:
 Is there a module that supports OpenGL 2.0 in D?
 All I see is support for 1.1,1.2 and I think GLFW has 1.4 or 1.5.


 Cris

http://www.lessequal.com/software/ for win32.

Great! I wonder if there will be a Linux version too.
Feb 21 2006
parent reply bobef <bobef lessequal.com> writes:
Cris wrote:
 clayasaurus wrote:
 Cris wrote:
 Is there a module that supports OpenGL 2.0 in D?
 All I see is support for 1.1,1.2 and I think GLFW has 1.4 or 1.5.


 Cris

http://www.lessequal.com/software/ for win32.

Great! I wonder if there will be a Linux version too.

Yes.
Feb 22 2006
parent reply Cris <central_p hotmail.com> writes:
Thank you, bobef.

You'll be our saviour! I see that it has some linux support already if 
I'm not mistaken.

Then I'll switch to GLEE & D (I'm using C++ & GLEW) immediately and hope 
that there will be a Linux version soon too.

I like your lincense: "'bobef license 1.0': use without restrictions at 
your own risk"


bobef wrote:
 Cris wrote:
 clayasaurus wrote:
 Cris wrote:
 Is there a module that supports OpenGL 2.0 in D?
 All I see is support for 1.1,1.2 and I think GLFW has 1.4 or 1.5.


 Cris

http://www.lessequal.com/software/ for win32.

Great! I wonder if there will be a Linux version too.

Yes.

Feb 22 2006
parent reply bobef <bobef lessequal.com> writes:
Yes, it has linux support and extensions but I haven't yet did the linux 
part (simply because I don't have linux), but I installed it few days 
ago. Of course I broke it so maybe after few more reinstallations I will 
be ready to run D ;]

Cris wrote:
 Thank you, bobef.
 
 You'll be our saviour! I see that it has some linux support already if 
 I'm not mistaken.
 
 Then I'll switch to GLEE & D (I'm using C++ & GLEW) immediately and hope 
 that there will be a Linux version soon too.
 
 I like your lincense: "'bobef license 1.0': use without restrictions at 
 your own risk"
 
 
 bobef wrote:
 Cris wrote:
 clayasaurus wrote:
 Cris wrote:
 Is there a module that supports OpenGL 2.0 in D?
 All I see is support for 1.1,1.2 and I think GLFW has 1.4 or 1.5.


 Cris

http://www.lessequal.com/software/ for win32.

Great! I wonder if there will be a Linux version too.

Yes.


Feb 22 2006
parent reply Cris <central_p hotmail.com> writes:
bobef wrote:
 Yes, it has linux support and extensions but I haven't yet did the linux 
 part (simply because I don't have linux), but I installed it few days 
 ago. Of course I broke it so maybe after few more reinstallations I will 
 be ready to run D ;]
 

After I first tried Linux in 97 and I had it for a few months, finally I deleted it simply because I needed the space and it didn'y bring me anything that my amazingly STABLE Win95 PE couldn't do for me. Really, no joke - I actually never understood the troubles of the people complaning about 95, when I installed Win98SE it was a completely different story... Then I looked into Linux again, then again and again, until last year I was finally able to install a Linux that would run almost out of the box with my hardware: Ubuntu and it works! So I have it for many months now (although installing propriatery ATI drivers is a little bit tricky but there is a good HOWTO already). And because I don't really have much use for Linux I've decided to do cross-platform OGL/OAL demos with it. :) So I'll say with a few words what I've said above: If you haven't, I recommend you to try Ubuntu (I haven't needed more than 2 reinstallations to make it work as I want). Initially I hesitated to offer you help with GLEE for Linux but since I'm not experienced with D, I decided not to do it for now but I still can be a tester ;) Best regards Cris
Feb 22 2006
parent reply bobef <bobef lessequal.com> writes:
Ubuntu was the distro I broke yesterday ;] I guess I am very talented ;] 
I had no problems with the ATI drivers but it works too slow for me. I 
don't like it. I think am giving a VectorLinux another try, because few 
months ago it worked very well for me...

Cris wrote:
 bobef wrote:
 Yes, it has linux support and extensions but I haven't yet did the 
 linux part (simply because I don't have linux), but I installed it few 
 days ago. Of course I broke it so maybe after few more reinstallations 
 I will be ready to run D ;]

After I first tried Linux in 97 and I had it for a few months, finally I deleted it simply because I needed the space and it didn'y bring me anything that my amazingly STABLE Win95 PE couldn't do for me. Really, no joke - I actually never understood the troubles of the people complaning about 95, when I installed Win98SE it was a completely different story... Then I looked into Linux again, then again and again, until last year I was finally able to install a Linux that would run almost out of the box with my hardware: Ubuntu and it works! So I have it for many months now (although installing propriatery ATI drivers is a little bit tricky but there is a good HOWTO already). And because I don't really have much use for Linux I've decided to do cross-platform OGL/OAL demos with it. :) So I'll say with a few words what I've said above: If you haven't, I recommend you to try Ubuntu (I haven't needed more than 2 reinstallations to make it work as I want). Initially I hesitated to offer you help with GLEE for Linux but since I'm not experienced with D, I decided not to do it for now but I still can be a tester ;) Best regards Cris

Feb 23 2006
parent reply Lucas Goss <lgoss007 gmail.com> writes:
bobef wrote:
 Ubuntu was the distro I broke yesterday ;] I guess I am very talented ;] 
 I had no problems with the ATI drivers but it works too slow for me. I 
 don't like it. I think am giving a VectorLinux another try, because few 
 months ago it worked very well for me...

I break Ubuntu all of the time... but only because I mess around with it and upgrade to unreleased versions (running dapper now). But I've installed Ubuntu on many machines without problems. I even run a script to download/compile/install enlightenment (unstable) for my desktop, since it's faster and nicer than gnome. Are you running an older machine? VectorLinux is faster but I don't think it's as noticeable on newer machines (for older machines it's probably better). I think gnome is a big problem for the slowness in Ubuntu, which a lot of memory problems have been fixed recently. So if you're daring (though it's pretty stable for me) you can give dapper (newest Ubuntu) a try. On another note, I've never used GLEE. But if you want help testing/porting it, I'd be glad to help (anything that deals with Linux and OpenGL sparks my interest).
Feb 23 2006
parent reply bobef <bobef lessequal.com> writes:
I wasted whole day installing vector, making ati hardware acceleration 
work, configuring kde, etc...
Then I translated GLee to linux but I was unable to test it. It compiles 
but I failed at the link step (some unresolved symbols even after 
linking with all the required libraries 
(x11,xf86blah,a,m,,s,d,f,g,h,f,5,f,jh,i,56,,gf,g,dl,gl, what ever (can't 
they think of names longer than 3 letters?!?)). So I read some forum and 
they said reinstalling glibc may solve this. Bad idea. So guess what. I 
broke it ;] Anyway if you want give it a try, maybe it works. I uploaded 
the new stuff here http://www.lessequal.com/software/gleed/gleed.zip . 
And it is updated it to GLee 5.1... And I made few more changes after 
that (in windows) so maybe I broke something in the linux version (i.e. 
some imports)...

 Are you running an older machine? VectorLinux is faster but I don't
 think it's as noticeable on newer machines (for older machines it's
 probably better). I think gnome is a big problem for the slowness in
 Ubuntu, which a lot of memory problems have been fixed recently. So if
 you're daring (though it's pretty stable for me) you can give dapper
 (newest Ubuntu) a try.

Noo... 2500+mhz 512ram.. I guess GNOME is just slow... And KDE too... This is so annoying... I like IceWM but it doesn't have desktop and many other things... damn.... I will give Ubuntu another try if you say. But I need some rest. I broke 3 distros in 48h... P.S. why the hell they call Kate "programmers editor"? it don't even have macros... Guess I won't be programming linux until akide is ported to it (or at least editplus)...
Feb 23 2006
next sibling parent reply Cris <central_p hotmail.com> writes:
 Then I translated GLee to linux but I was unable to test it. It compiles 
 but I failed at the link step (some unresolved symbols even after 
 linking with all the required libraries 

Are you using some tool?
 
 Noo... 2500+mhz 512ram.. I guess GNOME is just slow... And KDE too... 
 This is so annoying... I like IceWM but it doesn't have desktop and many 
 other things... damn.... I will give Ubuntu another try if you say. But 
 I need some rest. I broke 3 distros in 48h...

I have 3.2GHz P4M, 512RAM Laptop and I find that WindowsXP and GNOME run just fine. Ubunty installs easily but a downside is that you have to have a broadband to install the additional packages that are not available on the CD and you have to install GCC version 3.4.4 (whatever it was) to be able to install ATI drivers. If you are careful it doesn't seem that easy to break.
 
 
 P.S. why the hell they call Kate "programmers editor"? it don't even 
 have macros... Guess I won't be programming linux until akide is ported 
 to it (or at least editplus)...

I use Code::Blocks on Linux (well not very much at the moment) and it looks the best thing out there. On Windows it supports D at some degree bu there is no support for D in Linux. Are you porting akide by yourself to Linux? :) Will you have a fully working version in the forseeable future. I've tried to Windows version and I see some strange stuff: some of the menu fonts are blurred and I can't get the compiler configured.
Feb 23 2006
parent reply bobef <bobef lessequal.com> writes:
Cris wrote:
 
 Then I translated GLee to linux but I was unable to test it. It 
 compiles but I failed at the link step (some unresolved symbols even 
 after linking with all the required libraries 

Are you using some tool?

Tool for what? For the translation - Kate, for the build - bash (i.e manually calling dmd). In other words no. But for the main work I've used akide (or could use editplus the same way) because they both have (I got this idea from editplus actually) *quick* macros. Notice the word quick. They are really quick and really really really really really useful for any key pattern which you have to repeat more than 3-4 times...
 Noo... 2500+mhz 512ram.. I guess GNOME is just slow... And KDE too... 
 This is so annoying... I like IceWM but it doesn't have desktop and 
 many other things... damn.... I will give Ubuntu another try if you 
 say. But I need some rest. I broke 3 distros in 48h...

I have 3.2GHz P4M, 512RAM Laptop and I find that WindowsXP and GNOME run just fine. Ubunty installs easily but a downside is that you have to have a broadband to install the additional packages that are not available on the CD and you have to install GCC version 3.4.4 (whatever it was) to be able to install ATI drivers. If you are careful it doesn't seem that easy to break.
 P.S. why the hell they call Kate "programmers editor"? it don't even 
 have macros... Guess I won't be programming linux until akide is 
 ported to it (or at least editplus)...

I use Code::Blocks on Linux (well not very much at the moment) and it looks the best thing out there. On Windows it supports D at some degree bu there is no support for D in Linux. Are you porting akide by yourself to Linux? :) Will you have a fully working version in the forseeable future.

Since I am the only one who is working on it - yes. But I am not porting it directly to Linux, I am porting it to DWT (with linux in mind), so even if I complete it in forseeable future, still depends on the DWT port...
 I've tried to Windows version and I see some strange stuff: some of the 
 menu fonts are blurred and I can't get the compiler configured.

The menu fonts are blurred? I've seen this on LCD, since they are custom drawn I guess the API I am using (TextOut) is not working 100% correctly with this clearlooks thing (or I am not using it correctly)... The compiler configuration could be a bit tricky. I mean it is very easy if you know what you are doing, unfortunately akide is very poorly documented, so it is hard to know what you are doing, and nobody asks so... I suggest you use the project wizard or see the akide.akw workspace which comes with the source for example...
Feb 23 2006
parent reply Cris <central_p hotmail.com> writes:
 The menu fonts are blurred? I've seen this on LCD, since they are custom 
 drawn I guess the API I am using (TextOut) is not working 100% correctly 
 with this clearlooks thing (or I am not using it correctly)...

Since the only computer I use is a 1280x800 laptop - yes I've used it on LCD. I don't see if I have cleartype installed or whatever it is called. I remember I've tried it but perhaps it is on the second Windows installation I have. Do you plan to add docking of windows? And are you interested in feedback?
Feb 23 2006
parent bobef <bobef lessequal.com> writes:
Cris wrote:
 
 The menu fonts are blurred? I've seen this on LCD, since they are 
 custom drawn I guess the API I am using (TextOut) is not working 100% 
 correctly with this clearlooks thing (or I am not using it correctly)...

Since the only computer I use is a 1280x800 laptop - yes I've used it on LCD. I don't see if I have cleartype installed or whatever it is called. I remember I've tried it but perhaps it is on the second Windows installation I have. Do you plan to add docking of windows? And are you interested in feedback?

Yes, I am very interested in feedback. For the docking see the 'Window' menu there is the docking...
Feb 23 2006
prev sibling next sibling parent reply Lucas Goss <lgoss007 gmail.com> writes:
bobef wrote:
 I wasted whole day installing vector, making ati hardware acceleration 
 work, configuring kde, etc...

I don't have an ATI card, I bought an nVidia soley for Linux. To get hardware acceleration to work was as simple as: $ sudo nvidia-glx-config enable
 Then I translated GLee to linux but I was unable to test it. It compiles 
 but I failed at the link step (some unresolved symbols even after 
 linking with all the required libraries...

Hmm, I got it to link ok, but I had to comment out some glut functions to get it to work. And I had to change glee_h as it had a bunch of redefinitions (GL_BYTE, GL_PHONG_WIN, GL_VERTEX_ARRAY_EXT, etc). Anyways, when I include glutDisplayFunc in the program, I get this error: test.d(127): function glut.glutDisplayFunc (void(C *)()) does not match argument types (void(*)()) test.d(127): cannot implicitly convert expression (& renderScene) of type void(*)() to void(C *)() Any clues how to fix this? I've never seen this one before.
 Noo... 2500+mhz 512ram.. I guess GNOME is just slow... And KDE too... 

Hmm, I don't have any problems on my 2600+ 512ram... maybe I'm slow? Anyways, I would say try Dapper, but the ati and nvidia drivers are in a state of flux at the moment. So here's some alternatives then: - Xubuntu (Xfce on ubuntu) - https://wiki.ubuntu.com/Xubuntu - Elive - http://www.elivecd.org/ I haven't tried the newest Elive yet, but I do run Enlightenment on Ubuntu and it works nicely. I've tried the previous version of Elive and it was pretty good, but they just came out with a new version that looks a whole lot better.
 P.S. why the hell they call Kate "programmers editor"? it don't even 
 have macros... Guess I won't be programming linux until akide is ported 
 to it (or at least editplus)...

Um, don't know. I don't use Kate (or any kde stuff). I try to stick to purely gnome, as I'm always afraid using kde programs will add extra services running on the computer (maybe that's some of your slowness?). But I just use gedit, a simple text editor... :|
Feb 23 2006
parent Lucas Goss <lgoss007 gmail.com> writes:
Lucas Goss wrote:
 Anyways, when I include glutDisplayFunc in the program, I get this error:
 
 test.d(127): function glut.glutDisplayFunc (void(C *)()) does not match 
 argument types (void(*)())
 test.d(127): cannot implicitly convert expression (& renderScene) of 
 type void(*)() to void(C *)()
 
 Any clues how to fix this? I've never seen this one before.

Nevermind. Adding "extern (C)" to the functions fixed it. Well now I have it compiling... however I get a segmentation fault. I wonder if it has anything to do with my video drivers...
Feb 23 2006
prev sibling next sibling parent reply Lucas Goss <lgoss007 gmail.com> writes:
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Ok, attached are the files that I changed.

glee_h - redefinition of symbols (just commented out redefinitions)
build.sh - uses build (and some other stuff)
test.d - added "extern (C)" to three functions.

version (linix) <- was mispelled (and I didn't realize it at first). 
However trying to uncomment that line gave me some weird phobos errors 
after I changed it to (linux)?, so I just stuck with the extern (C).

Anyways, I think that's all I changed... hopefully.

Doh... files too big...
Feb 23 2006
next sibling parent Lucas Goss <lgoss007 gmail.com> writes:
And in glee_h.d (too big to post whole thing), I added comments to the 
following:

line 3813:
//const int GL_VERTEX_ARRAY_EXT=0x8074;
//const int GL_NORMAL_ARRAY_EXT=0x8075;
//const int GL_COLOR_ARRAY_EXT=0x8076;
//const int GL_INDEX_ARRAY_EXT=0x8077;
//const int GL_TEXTURE_COORD_ARRAY_EXT=0x8078;
//const int GL_EDGE_FLAG_ARRAY_EXT=0x8079;
//const int GL_VERTEX_ARRAY_SIZE_EXT=0x807A;
//const int GL_VERTEX_ARRAY_TYPE_EXT=0x807B;
//const int GL_VERTEX_ARRAY_STRIDE_EXT=0x807C;
//const int GL_VERTEX_ARRAY_COUNT_EXT=0x807D;
//const int GL_NORMAL_ARRAY_TYPE_EXT=0x807E;
//const int GL_NORMAL_ARRAY_STRIDE_EXT=0x807F;
//const int GL_NORMAL_ARRAY_COUNT_EXT=0x8080;
//const int GL_COLOR_ARRAY_SIZE_EXT=0x8081;
//const int GL_COLOR_ARRAY_TYPE_EXT=0x8082;
//const int GL_COLOR_ARRAY_STRIDE_EXT=0x8083;
//const int GL_COLOR_ARRAY_COUNT_EXT=0x8084;
//const int GL_INDEX_ARRAY_TYPE_EXT=0x8085;
//const int GL_INDEX_ARRAY_STRIDE_EXT=0x8086;
//const int GL_INDEX_ARRAY_COUNT_EXT=0x8087;
//const int GL_TEXTURE_COORD_ARRAY_SIZE_EXT=0x8088;
//const int GL_TEXTURE_COORD_ARRAY_TYPE_EXT=0x8089;
//const int GL_TEXTURE_COORD_ARRAY_STRIDE_EXT=0x808A;
//const int GL_TEXTURE_COORD_ARRAY_COUNT_EXT=0x808B;
//const int GL_EDGE_FLAG_ARRAY_STRIDE_EXT=0x808C;
//const int GL_EDGE_FLAG_ARRAY_COUNT_EXT=0x808D;
//const int GL_VERTEX_ARRAY_POINTER_EXT=0x808E;
//const int GL_NORMAL_ARRAY_POINTER_EXT=0x808F;
//const int GL_COLOR_ARRAY_POINTER_EXT=0x8090;
//const int GL_INDEX_ARRAY_POINTER_EXT=0x8091;
//const int GL_TEXTURE_COORD_ARRAY_POINTER_EXT=0x8092;
//const int GL_EDGE_FLAG_ARRAY_POINTER_EXT=0x8093;

line 4414:
//const int GL_COLOR_INDEX1_EXT=0x80E2;
//const int GL_COLOR_INDEX2_EXT=0x80E3;
//const int GL_COLOR_INDEX4_EXT=0x80E4;
//const int GL_COLOR_INDEX8_EXT=0x80E5;
//const int GL_COLOR_INDEX12_EXT=0x80E6;
//const int GL_COLOR_INDEX16_EXT=0x80E7;

line 4725:
//const int GL_PHONG_WIN=0x80EA;
//const int GL_PHONG_HINT_WIN=0x80EB;

line 4735:
//const int GL_FOG_SPECULAR_TEXTURE_WIN=0x80EC;

line 4795:
//const int GL_BGR_EXT=0x80E0;
//const int GL_BGRA_EXT=0x80E1;

line 8500:
//const int GL_COMPRESSED_RGB_S3TC_DXT1_EXT=0x83F0;
//const int GL_COMPRESSED_RGBA_S3TC_DXT1_EXT=0x83F1;

line 8582:
//const int GL_BYTE=0x1400;
Feb 23 2006
prev sibling parent bobef <bobef lessequal.com> writes:
Thank you.
This is in my todo list. To get it to work in linux. Unfortunately, as I 
said, I broke 3 distros (to the point they wont boot) in 2 days so I 
need some rest before installing linux again...
But if you want to test is it some more, I would suggest trying it 
without glut. I.e just main and call some glFunction. See if it crashes. 
Something like in setShaders()... And writefln() some of the GLEE_ 
querying variables after GLeeInit...
Feb 23 2006
prev sibling parent John Reimer <terminal.node gmail.com> writes:
bobef wrote:
 I wasted whole day installing vector, making ati hardware acceleration 
 work, configuring kde, etc...
 Then I translated GLee to linux but I was unable to test it. It compiles 
 but I failed at the link step (some unresolved symbols even after 
 linking with all the required libraries 
 (x11,xf86blah,a,m,,s,d,f,g,h,f,5,f,jh,i,56,,gf,g,dl,gl, what ever (can't 
 they think of names longer than 3 letters?!?)). So I read some forum and 
 they said reinstalling glibc may solve this. Bad idea. So guess what. I 
 broke it ;] Anyway if you want give it a try, maybe it works. I uploaded 
 the new stuff here http://www.lessequal.com/software/gleed/gleed.zip . 
 And it is updated it to GLee 5.1... And I made few more changes after 
 that (in windows) so maybe I broke something in the linux version (i.e. 
 some imports)...
 

What ATI card are you using? Apparently ATI and Linux don't go well together, especially with the newer cards. They are a source of many problems. ATI has a reputation for slow, reluctant support for their cards on Linux. This is sad because I actually have preferred ATI cards. Older cards are fairly well supported, but don't expect much support for the X series. NVidia, on the other hand, is well respected for the support of their cards on Linux. Apparently, they do an excellent job keeping their graphics drivers optimized, stable, and up to date on Linux, almost equivalent to their windows drivers. -JJR
Feb 24 2006