View previous topic :: View next topic |
Author |
Message |
trevorparscal
Joined: 25 May 2005 Posts: 73 Location: Bay Area, CA (USA)
|
Posted: Thu May 26, 2005 11:55 pm Post subject: Cpw for Derelict |
|
|
I am almost done with my port of Cpw for Derelict.
Everything goes fine until I make an opengl call. Windows, menus, whatever, just no OpenGL..
I am hoping to get this fixed soon, any ideas?
Also, once I get this done, I want to contribute it to Derelict if it's wanted, otherwise, I can make a new project for it, but.. I don't see why not just add it to Derelict.?
Thanks,
Trevor Parscal |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Fri May 27, 2005 12:42 am Post subject: |
|
|
What is Cpw? |
|
Back to top |
|
|
trevorparscal
Joined: 25 May 2005 Posts: 73 Location: Bay Area, CA (USA)
|
Posted: Fri May 27, 2005 1:04 am Post subject: |
|
|
http://www.mathies.com/cpw/
Cpw is a Cross Platform Windowing toolkit aimed to be a modern replacement for GLUT. |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Fri May 27, 2005 9:13 am Post subject: |
|
|
Is it kept up to date? I was checking out the site and the last update appears to be over 3 years ago. Nice toolkit, nonetheless.
OpenGL problems might be due to using extern(C) on windows instead of extern(Windows) for the opengl functions. In this case, you really do need to use extern(Windows).
-JJR |
|
Back to top |
|
|
trevorparscal
Joined: 25 May 2005 Posts: 73 Location: Bay Area, CA (USA)
|
Posted: Fri May 27, 2005 2:13 pm Post subject: |
|
|
I tried to e-mail the author, but I got no response. I have half a mind to take the code (it's truly free) and rewite it in D completely using the core32 project, and see if someone else might want to make a linux port. The toolit is good, i love the design (to an extent) but he seems not to work on it anymore.
If I don't use extern(C) Cpw freaks out. If I don't use extern(Windows) OpenGL freaks out.
I need a new one.. like extern(MakeMyCrapWorkAlready)
or extern(IWishEverythingWasWrittenInD)
|
|
Back to top |
|
|
trevorparscal
Joined: 25 May 2005 Posts: 73 Location: Bay Area, CA (USA)
|
Posted: Fri May 27, 2005 3:13 pm Post subject: |
|
|
I am actually now just getting an Invalid Context error.
I can't even call opengl's glGetError though.. So, there might be something more going on wrong than just Cpw not creating a context or something..
Ideas = help =
- Trevor Parscal |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Fri May 27, 2005 5:44 pm Post subject: |
|
|
Trevor,
It's really hard to know what to try without seeing some code. I have enough trouble troubleshooting these sort of problems with the code!
-JJR |
|
Back to top |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Fri May 27, 2005 9:35 pm Post subject: Core32 |
|
|
trevorparscal wrote: | I have half a mind to take the code (it's truly free) and rewite it in D completely using the core32 project, and see if someone else might want to make a linux port. | If you decide to go this route, feel free to let me know if you find that Core32 lacks any definitions that you need. I know that Core32 isn't a complete port of the Windows headers, and I'd rather try to add them into the Core32 trunk than have a fork situation develop. Also, if you find some more conflicts with Phobos (Walter likes to sneak new definitions into std.c.windows.windows), I'll fix that, too. |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Fri May 27, 2005 10:32 pm Post subject: Re: Core32 |
|
|
jcc7 wrote: | Also, if you find some more conflicts with Phobos (Walter likes to sneak new definitions into std.c.windows.windows), I'll fix that, too. |
For what it's worth, I noticed during a recent build of DerelictGL that std.c.windows.windows now declares COLORREF, whereas in the past it didn't. That caused a conflict with DerelictGL's internal GDI declarations. Don't know if that affect's Core32 or not. |
|
Back to top |
|
|
trevorparscal
Joined: 25 May 2005 Posts: 73 Location: Bay Area, CA (USA)
|
Posted: Fri May 27, 2005 11:37 pm Post subject: |
|
|
I hope not to have to change anything in Core32, but if I need something, i will let you know for sure! And any changes will hopefully make it into the Core32 project. I agree, a fork is bad.
And as you thought, I am indeed using Core32 to make a new version of Cpw in D. the new library is Terra, and I hope to impliment the same core functionality of Cpw in a more object oriented manner, and in D of course.
If anyone knows of a developer who might want to work with me on this to make a linux compatibility layer, let me know.
Otherwise, I am still going to be prting those pesky freetype headers, so that needs some help too.
I need a project space for Terra... Brad, (or anyone for that matter) you can IM me at trevorparscal (aim) or trevorparscal@hotmail.com (msn) or email me at trevorparscal@hotmail.com if you have any questions.
I am looking into that Lua license.. Seems really healthy for a project.
Thanks for the help so far.
- Trevor Parscal |
|
Back to top |
|
|
|