Should dmd have given me a warning at least?

Mike Parker via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Sep 13 01:09:14 PDT 2014


On 9/13/2014 7:44 AM, WhatMeWorry wrote:
>
> // the following two lines compile cleanly but when executed, I get
> // D:\Projects\Derelict>02_SimpleOpenGL_3_3_program.exe
> // object.Error: Access Violation
> // ----------------
>
> string glShadingLangVer =
> to!string(glGetString(GL_SHADING_LANGUAGE_VERSION));
> writeln("glShadingLangVer is ", glShadingLangVer);
>
>
>
>
> glGetString has the following signature:
>
> const GLubyte* glGetString(GLenum name);
>
> I presume the const is causing the problem.  Is there a work around?
>
> Thanks.

Can you show more of your code so we can get some context?

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com



More information about the Digitalmars-d-learn mailing list