www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - simple OpenGL app

reply Raivo F. <raivof gmail.com> writes:
Hi!

I'm new to D programming language, altough have solid background in other
languages.

Currently I struggle with setting up simple OpenGL application.

I found D/OpenGL package called GLAD:
http://code.google.com/p/glapid/

First, it didn't include necessary opengl32.lib file, however, luckily I found
it in another OpenGL/D package.

So now I can build without missing OpenGL symbol links BUT now I get some
really weird errors, I have no idea, why:

Debug\test1.obj(test1)
 Error 42: Symbol Undefined _D4glad14glFrameContext7__ClassZ
Debug\test1.obj(test1)
 Error 42: Symbol Undefined
_D4glad14glFrameContext6__ctorMFPvG2iZC4glad14glFrameContext
Debug\test1.obj(test1)
 Error 42: Symbol Undefined _D4glad14glFrameContext6__initZ
Debug\test1.obj(test1)
 Error 42: Symbol Undefined _D4glad12__ModuleInfoZ
Debug\test1.obj(test1)
 Error 42: Symbol Undefined _D4glad14glVersionError7__ClassZ
--- errorlevel 5
Building Debug\test1.exe failed!


I think this OpenGL support should be easy setup-and-go , but now I'm scared of
the problems.

I quickly tried other OpenGL/D packages but without results. I'll try again.
Jan 04 2012
next sibling parent "Trass3r" <un known.com> writes:
Guess you just tried 'dmd test.d'?
You need to pass all source files.. or use a tool like rdmd 
(included with dmd).
Also that package is from 2010.
I think your best bet is Derelict2: 
http://www.dsource.org/projects/derelict
Jan 05 2012
prev sibling parent Zachary Lund <admin computerquip.com> writes:
On 01/05/2012 12:00 AM, Raivo F. wrote:
 Hi!

 I'm new to D programming language, altough have solid background in other
languages.

 Currently I struggle with setting up simple OpenGL application.

 I found D/OpenGL package called GLAD:
 http://code.google.com/p/glapid/

 First, it didn't include necessary opengl32.lib file, however, luckily I found
it in another OpenGL/D package.

 So now I can build without missing OpenGL symbol links BUT now I get some
really weird errors, I have no idea, why:

 Debug\test1.obj(test1)
   Error 42: Symbol Undefined _D4glad14glFrameContext7__ClassZ
 Debug\test1.obj(test1)
   Error 42: Symbol Undefined
_D4glad14glFrameContext6__ctorMFPvG2iZC4glad14glFrameContext
 Debug\test1.obj(test1)
   Error 42: Symbol Undefined _D4glad14glFrameContext6__initZ
 Debug\test1.obj(test1)
   Error 42: Symbol Undefined _D4glad12__ModuleInfoZ
 Debug\test1.obj(test1)
   Error 42: Symbol Undefined _D4glad14glVersionError7__ClassZ
 --- errorlevel 5
 Building Debug\test1.exe failed!


 I think this OpenGL support should be easy setup-and-go , but now I'm scared
of the problems.

 I quickly tried other OpenGL/D packages but without results. I'll try again.

Library bindings aren't going to provide opengl32.lib or libGL.so. The actual implementation of OpenGL is provided either through the OS or through the video card vendor. GLAD or whatever doesn't look very mature and actually looks extremely incomplete. I would suggest (currently) to use the Derelict bindings or some other more common bindings.
Jan 05 2012