From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,75fb93409baf1e22 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!c32g2000vbq.googlegroups.com!not-for-mail From: Vadim Godunko Newsgroups: comp.lang.ada Subject: Re: OpenGL in Ada Date: Sun, 10 Oct 2010 12:49:59 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <2f006952-2814-4775-935c-e9f095c7f79c@k10g2000yqa.googlegroups.com> <33c3fe9d-e8e5-4511-b69e-4920b49ac783@l14g2000yqb.googlegroups.com> NNTP-Posting-Host: 109.165.61.183 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1286740199 19035 127.0.0.1 (10 Oct 2010 19:49:59 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 10 Oct 2010 19:49:59 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: c32g2000vbq.googlegroups.com; posting-host=109.165.61.183; posting-account=niG3UgoAAAD7iQ3takWjEn_gw6D9X3ww User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.10) Gecko/20100914 SUSE/3.6.10-0.3.1 Firefox/3.6.10,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:14476 Date: 2010-10-10T12:49:59-07:00 List-Id: On Oct 9, 12:42=A0am, Yves Bailly wrote: > > Actually, I don't think it's enough, because different drivers and > hardwares > provide different OpenGL coverage. For example, maybe you can use > pragma import(C, "glGenFramebuffers") with an OpenGL lib providing > at least OpenGL 3, but it will fail if the lib provides only an older > version. > What is an extension in a given GL version may not be in another. > > The use of =A0a GetProcAddress function allows to work in any case, > just some subprogram pointers stay null. Note that it's the only > dependency imported from SDL, it could be replaced by a hand- > written equivalent, therefore removing the dependency (I'm just too > lazy for this). To be able to use "pragma import" in any case would > require to link with something like Glew. > Another option can be generation of set of checks to detect availability of features/extensions at configuration time and generation of supported subset only (or preprocessing of generated code). > That said, remains the question of the creation of the GL context, > the handling of events and so on, much things very system-dependent. > As far as I know, GLUT is just too old for this, e.g. it doesn't > handle > Unicode at all. But I guess that's another story. > It is another story definitely. GtkAda and QtAda both provide all needed functionality in cross-platform way.