Code Monkey home page Code Monkey logo

Comments (6)

Robert-M-Muench avatar Robert-M-Muench commented on September 27, 2024

The above problem an be solved by adding a couple of includes for and

from fastuidraw.

Robert-M-Muench avatar Robert-M-Muench commented on September 27, 2024

Further down compiling it I now get this problem:

mac-pro:fastuidraw robby$ make demos-GL-release
Generating release/GL/src/fastuidraw/gl_backend/gl_binding.d
c++ -O3 -fstrict-aliasing -Wall -Wextra -Wcast-qual -Wwrite-strings -Iinc  `freetype-config --cflags` -std=c++11 -D_USE_MATH_DEFINES   -fPIC -c src/fastuidraw/gl_backend/gl_binding.cpp -o release/GL/src/fastuidraw/gl_backend/gl_binding.o
src/fastuidraw/gl_backend/gl_binding.cpp:111:14: error: no member named 'get_function_ptr_glGetError' in namespace 'fastuidraw::gl_binding'
  if(fptr == FASTUIDRAWglfunctionPointer(glGetError))
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
inc/fastuidraw/gl_backend/ngl_gl.hpp:30:67: note: expanded from macro 'FASTUIDRAWglfunctionPointer'
#define FASTUIDRAWglfunctionPointer(name) fastuidraw::gl_binding::get_function_ptr_##name()
                                          ~~~~~~~~~~~~~~~~~~~~~~~~^
<scratch space>:281:1: note: expanded from here
get_function_ptr_glGetError
^
src/fastuidraw/gl_backend/gl_binding.cpp:116:15: error: use of undeclared identifier 'glGetError'
  errorcode = glGetError();
              ^
src/fastuidraw/gl_backend/gl_binding.cpp:125:65: error: use of undeclared identifier 'glGetError'
  for(count = 0; errorcode != GL_NO_ERROR; ++count, errorcode = glGetError() )
                                                                ^
src/fastuidraw/gl_backend/gl_binding.cpp:172:35: error: no member named 'get_function_ptr_glGetError' in namespace 'fastuidraw::gl_binding'
  if(log_gl_commands() && fptr != FASTUIDRAWglfunctionPointer(glGetError) && logger())
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
inc/fastuidraw/gl_backend/ngl_gl.hpp:30:67: note: expanded from macro 'FASTUIDRAWglfunctionPointer'
#define FASTUIDRAWglfunctionPointer(name) fastuidraw::gl_binding::get_function_ptr_##name()
                                          ~~~~~~~~~~~~~~~~~~~~~~~~^
<scratch space>:281:1: note: expanded from here
get_function_ptr_glGetError
^
4 errors generated.
make: *** [release/GL/src/fastuidraw/gl_backend/gl_binding.o] Error 1
rm release/GL/src/fastuidraw/gl_backend/gl_binding.d
mac-pro:fastuidraw robby$
´´´

from fastuidraw.

krogueintel avatar krogueintel commented on September 27, 2024

I want FastUIDraw to support OS-X. However, I have never built FastUIDraw first hand on OS-X myself. There was some activity quite some time back where someone was getting it to build on OS-X, but it failed to run. The build system has changed a little bit since then, so the changes from that issue no longer apply cleanly. You can see it here: #3

With that caveat in mind....

For the issue in static_resource.cpp, post a merge request for your fix so that I may review it and take it.

For the issue in gl_binding.cpp, the fix is partially documented in the README.md:

"The expected place of those headers is hard-coded to be system headers in the typical location. For Linux this is /usr/include and for MinGW this is /mingw/include. If the headers are located elsewhere on your system, edit Makefile.gl_backend.settings.mk and change GL_INCLUDEPATH (and possibly GL_RAW_HEADER_FILES and/or GLES_RAW_HEADER_FILES) as required by your system."

Mac OS-X has a different place for the GL headers and also different names than all other platforms.. if memory servers they are OpenGL/gl3.h and OpenGL/gl3ext.h (I think). Edit Makefile.gl_backend.settings.mk to make adjustments for OS-X. If you make it detect Dawrin or not and get it building, please submit a merge request so I can take your work.

Then if you get it to build, let me know what demos (if any) work. At the last time it was tried, only some demos worked....

Let me know of your progress.

from fastuidraw.

Robert-M-Muench avatar Robert-M-Muench commented on September 27, 2024

Using the OpenGL/gl3.h and OpenGL/gl3ext.h doesn't help. Still get:

no member named 'get_function_ptr_glGetError' in namespace 'fastuidraw::gl_binding'

How is the function added to the namespace? At runtime? There is no reference to glGetError anywhere in the namespace.

from fastuidraw.

krogueintel avatar krogueintel commented on September 27, 2024

Before continuing, I think it will be helpful to understand what the files ngl_gl.cpp and ngl_gl.hpp are and how they are generated.

  • The files ngl_gl.cpp and ngl_gl.hpp are machine generated.
  • They are generated from the system's GL header files.
  • Where those system header files are located and their names is specified in Makefile.gl_backend.lib.mk.
  • The generation process is essentially to scan the header file for GL function names and generate for each GL function declaration some functions that are used by macros.

With the above in mind, to have any hope of getting FastUIDraw to build on OS-X, one needs to change Makefile.gl_backend.lib.mk AND to by hand delete ngl_gl.cpp and ngl_gl.hpp so that they are correctly regenerated.

Please look to pinealservo's (very old now) branch where he has made preliminary work to get FastUIDraw to build on OS-X (this is all in Issue 3). For reference, https://github.com/01org/fastuidraw/compare/master...pinealservo:darwin_build?expand=1 , should show you the changes necessary to get FastUIDraw to build...

Please read through issue #3 to get a better handle.

Again, if you get it to build on OS-X in such a way that Darwin is auto-detected (likely via using uname), please create a pull request so that I can review and merge your work.

-Kevin

from fastuidraw.

krogueintel avatar krogueintel commented on September 27, 2024

Given the lack of response and that the FastUIDraw build system now supports setting both the name(s) of the GL headers to use and the directory in which to find them, I am closing this issue.

However, I strongly suspect that OS-X support is not ready and I personally do not have such a device on which to test.

from fastuidraw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.