flyx / OpenGLAda

Thick Ada binding for OpenGL and GLFW
flyx.github.io/OpenGLAda/
MIT License
95 stars 13 forks source link

Update common.gpr #101

Closed rogermc2 closed 6 years ago

rogermc2 commented 6 years ago

Remove references to OpenGL.Shared.

rogermc2 commented 6 years ago

OK. Please hold off merging until I've done that, probably, tomorrow.

rogermc2 commented 6 years ago

I have come across a problem with the Durian example buffers_and_textures which involves SOIL. Initially the problem was missing stdio.h which I overcame by installing X-Code command tools. Apparently they get deleted every time that you upgrade XCode! I recall that last time I "fixed" this problem I used an alias to a version of std.io in usr or usr/local. This time installing X-Code command tools fixed that but now the build fails with:

Builder results (4 items)
   Authorization.h (1 item)
       193:7 error: variably modified 'bytes' at file scope
   CGFont.h (1 item)
  CGPath.h (2 items

Sounds like possibly wrong C compiler? Can you suggest a solution. Thanks.

rogermc2 commented 6 years ago

I tried fixing styles for Durian Buffers and Textures a file at a time but Buffers.adb fails to compile with

Compile
   [Ada]          my_buffers.adb
my_buffers.adb:100:17: iterator is an Ada 2012 feature
my_buffers.adb:100:17: unit must be compiled with -gnat2012 switch
gprbuild: *** compilation phase failed

This seems strange as iterators have been part of Ada for a long time and I have used them often on other projects. Also, Buffers and Textures obviously used to compile. I tried setting the 2012 switch but it reverts to 2005. I assume that this is due to package Compiler renames Opengl.Compiler; in the gpr file?

rogermc2 commented 6 years ago

Style corrections have been completed.

rogermc2 commented 6 years ago

I've had to enter a test for zero. length strings ahead of calls to GL.Text.To_Texture which seems to cause an exception when called with Width = 0.