Giter Site home page Giter Site logo

Ubuntu 14.04编译异常 about ejoy2d HOT 6 OPEN

ejoy avatar ejoy commented on June 1, 2024
Ubuntu 14.04编译异常

from ejoy2d.

Comments (6)

cloudwu avatar cloudwu commented on June 1, 2024

首先你要确定你的系统有运行现代 3d 游戏的能力,比如可以运行 3d 桌面。

其次,你需要有 opengl 的开发库,并支持 opengl es 2.0 api .

from ejoy2d.

sunxfancy avatar sunxfancy commented on June 1, 2024

libgl1-mesa-dev和libgles2-mesa-dev我都已经安装过了
运行3d也没问题,而且我还开发过opengl1的C程序,也能正常工作

from ejoy2d.

cloudwu avatar cloudwu commented on June 1, 2024

看起来是你的 opengl 不支持 VAO,

#if !defined (VAO_DISABLE) && !defined (__ANDROID__)
// If your platform doesn't support VAO, comment it out.
// Or define VAO_DISABLE first
#define VAO_ENABLE
#if defined (GL_OES_vertex_array_object)
#define glBindVertexArray glBindVertexArrayOES
#define glGenVertexArrays glGenVertexArraysOES
#define glDeleteVertexArrays glDeleteVertexArraysOES
#endif
#endif

你可以编译的时候定义宏 VAO_DISABLE

from ejoy2d.

cloudwu avatar cloudwu commented on June 1, 2024

btw, MacOSX 的最新版强制要求用 VAO 了, 这是为什么 ejoy2d 给了一个 VAO 的实现的缘故。

from ejoy2d.

sunxfancy avatar sunxfancy commented on June 1, 2024

确实是这个问题, 已解决, 非常感谢云风大神

from ejoy2d.

zhangchunlin avatar zhangchunlin commented on June 1, 2024

记录下我最终在ubuntu14.04上编译过要做的事情:
安装包:

sudo apt-get install libglew-dev libgles2-mesa-dev liblua5.2-dev libfreetype6-dev

然后将 posix/winfont.c 里的 ttc 文件路径改成对应系统的,比如:

static const char* TTFONT = "/usr/share/fonts/truetype/wqy/wqy-zenhei.ttc";

编译命令:

make CFLAGS='-DVAO_DISABLE -Ilib -Ilib/render -Ilua -I/usr/include/freetype2' linux

from ejoy2d.

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.