Jump to content
Eternal Lands Official Forums
Xaphier

OpenGL 2

Recommended Posts

The client fails to compile for me with this error:

[ 36%] Building CXX object engine/CMakeFiles/elengine.dir/scene.cpp.o
In file included from /home/schmurk/src/Eternal-Lands/engine/scene.cpp:34:0:
/home/schmurk/src/Eternal-Lands/engine/texture.hpp:55:32: erreur: ‘GL_TEXTURE_CUBE_MAP_ARRAY’ was not declared in this scope

Should I do something special to make it work?

Share this post


Link to post
Share on other sites

Looks like things are shuffling around. I downloaded the git repository and attempted to compile on Linux. It complains about 2d_objects, which looks like it was moved to map_editor/, and if I try to compile map_editor, it complains that particle_sys_def is not defined anywhere, and I can't find a typedef in the source for it. Is there a particular branch for code that should always at least compile? or am I just completely missing something. (I didn't see any docs or instructions on how to do a make, so I just attempted make -f Makefile.linux)

 

thx,

Rhonan

Share this post


Link to post
Share on other sites

Looks like things are shuffling around. I downloaded the git repository and attempted to compile on Linux. It complains about 2d_objects, which looks like it was moved to map_editor/, and if I try to compile map_editor, it complains that particle_sys_def is not defined anywhere, and I can't find a typedef in the source for it. Is there a particular branch for code that should always at least compile? or am I just completely missing something. (I didn't see any docs or instructions on how to do a make, so I just attempted make -f Makefile.linux)

 

thx,

Rhonan

Don't use make -f Makefile.linux for the opengl2 client. make a folder called build outside the source tree and cd to it.

run: cmake ../path/to/source/tree/

and then make (inside the build folder)

Share this post


Link to post
Share on other sites

The client fails to compile for me with this error:

[ 36%] Building CXX object engine/CMakeFiles/elengine.dir/scene.cpp.o
In file included from /home/schmurk/src/Eternal-Lands/engine/scene.cpp:34:0:
/home/schmurk/src/Eternal-Lands/engine/texture.hpp:55:32: erreur: ‘GL_TEXTURE_CUBE_MAP_ARRAY’ was not declared in this scope

Should I do something special to make it work?

Update glew

Share this post


Link to post
Share on other sites

Looks like things are shuffling around. I downloaded the git repository and attempted to compile on Linux. It complains about 2d_objects, which looks like it was moved to map_editor/, and if I try to compile map_editor, it complains that particle_sys_def is not defined anywhere, and I can't find a typedef in the source for it. Is there a particular branch for code that should always at least compile? or am I just completely missing something. (I didn't see any docs or instructions on how to do a make, so I just attempted make -f Makefile.linux)

 

thx,

Rhonan

Don't use make -f Makefile.linux for the opengl2 client. make a folder called build outside the source tree and cd to it.

run: cmake ../path/to/source/tree/

and then make (inside the build folder)

 

 

Thanks for the build hint. I haven't used cmake before. I saw people refer to it in posts about Windows and thought it was a Windows thing. You may want to create a brief BUILD file explaining the simple procedure to cut down on questions later. :)

 

As an FYI, using the most current (beta) version of glm ( glm-0.9.3.B ) produces the following error:

 

In file included from /usr/include/glm/./core/func_exponential.hpp:121:0,

from /usr/include/glm/glm.hpp:100,

from /tmp/elsrc/Eternal-Lands/engine/prerequisites.hpp:55,

from /tmp/elsrc/Eternal-Lands/engine/rstartree.hpp:15,

from /tmp/elsrc/Eternal-Lands/engine/rstartree.cpp:8:

/usr/include/glm/./core/func_exponential.inl: In member function ‘T glm::detail::compute_log2<PATH>::operator()(const T&) const’:

/usr/include/glm/./core/func_exponential.inl:98:110: error: invalid application of ‘sizeof’ to incomplete type ‘boost::STATIC_ASSERTION_FAILURE<false>’

/usr/include/glm/./core/func_exponential.inl:98:111: error: template argument 1 is invalid

/usr/include/glm/./core/func_exponential.inl:98:143: error: invalid type in declaration before ‘;’ token

make[2]: *** [engine/CMakeFiles/elengine.dir/rstartree.cpp.o] Error 1

make[1]: *** [engine/CMakeFiles/elengine.dir/all] Error 2

make: *** [all] Error 2

 

 

Using the most recent stable glm ( glm-0.9.2.7 ) works ok. Thought you might want to know in case the beta version goes stable at some point and breaks things in the EL code.

Edited by Rhonan

Share this post


Link to post
Share on other sites

I get the follow error and warnings, probably my old ogl version again. Still on Ubuntu 10.04;)

 

[ 36%] Building CXX object engine/CMakeFiles/elengine.dir/textureformatutil.cpp.o
/home/paul/el/opengl2_client/elc/engine/textureformatutil.cpp:235: error: ‘GL_RGB10_A2UI’ was not declared in this scope
/home/paul/el/opengl2_client/elc/engine/textureformatutil.cpp: In static member function ‘static void eternal_lands::TextureFormatUtil::get_source_format_type(eternal_lands::TextureFormatType, GLenum&, GLenum&)’:
/home/paul/el/opengl2_client/elc/engine/textureformatutil.cpp:377: warning: comparison between signed and unsigned integer expressions
/home/paul/el/opengl2_client/elc/engine/textureformatutil.cpp: In static member function ‘static eternal_lands::Uint16 eternal_lands::TextureFormatUtil::get_count(eternal_lands::TextureFormatType)’:
/home/paul/el/opengl2_client/elc/engine/textureformatutil.cpp:398: warning: comparison between signed and unsigned integer expressions
/home/paul/el/opengl2_client/elc/engine/textureformatutil.cpp: In static member function ‘static const eternal_lands::String& eternal_lands::TextureFormatUtil::get_str(eternal_lands::TextureFormatType)’:
/home/paul/el/opengl2_client/elc/engine/textureformatutil.cpp:416: warning: comparison between signed and unsigned integer expressions
/home/paul/el/opengl2_client/elc/engine/textureformatutil.cpp: In static member function ‘static bool eternal_lands::TextureFormatUtil::get_sRGB(eternal_lands::TextureFormatType)’:
/home/paul/el/opengl2_client/elc/engine/textureformatutil.cpp:434: warning: comparison between signed and unsigned integer expressions
/home/paul/el/opengl2_client/elc/engine/textureformatutil.cpp: In static member function ‘static bool eternal_lands::TextureFormatUtil::get_depth(eternal_lands::TextureFormatType)’:
/home/paul/el/opengl2_client/elc/engine/textureformatutil.cpp:453: warning: comparison between signed and unsigned integer expressions
/home/paul/el/opengl2_client/elc/engine/textureformatutil.cpp: In static member function ‘static bool eternal_lands::TextureFormatUtil::get_stencil(eternal_lands::TextureFormatType)’:
/home/paul/el/opengl2_client/elc/engine/textureformatutil.cpp:472: warning: comparison between signed and unsigned integer expressions
/home/paul/el/opengl2_client/elc/engine/textureformatutil.cpp: In static member function ‘static bool eternal_lands::TextureFormatUtil::get_compressed(eternal_lands::TextureFormatType)’:
/home/paul/el/opengl2_client/elc/engine/textureformatutil.cpp:491: warning: comparison between signed and unsigned integer expressions
/home/paul/el/opengl2_client/elc/engine/textureformatutil.cpp: In static member function ‘static bool eternal_lands::TextureFormatUtil::get_format_supported(eternal_lands::TextureFormatType)’:
/home/paul/el/opengl2_client/elc/engine/textureformatutil.cpp:510: warning: comparison between signed and unsigned integer expressions
/home/paul/el/opengl2_client/elc/engine/textureformatutil.cpp:525: error: ‘GLEW_VERSION_3_3’ was not declared in this scope
/home/paul/el/opengl2_client/elc/engine/textureformatutil.cpp: In static member function ‘static eternal_lands::Uint32 eternal_lands::TextureFormatUtil::get_size(eternal_lands::TextureFormatType)’:
/home/paul/el/opengl2_client/elc/engine/textureformatutil.cpp:597: warning: comparison between signed and unsigned integer expressions
/home/paul/el/opengl2_client/elc/engine/textureformatutil.cpp: In static member function ‘static GLenum eternal_lands::TextureFormatUtil::get_gl_format(eternal_lands::TextureFormatType)’:
/home/paul/el/opengl2_client/elc/engine/textureformatutil.cpp:616: warning: comparison between signed and unsigned integer expressions
/home/paul/el/opengl2_client/elc/engine/textureformatutil.cpp: In static member function ‘static eternal_lands::IntegerType eternal_lands::TextureFormatUtil::get_integer_type(eternal_lands::TextureFormatType)’:
/home/paul/el/opengl2_client/elc/engine/textureformatutil.cpp:635: warning: comparison between signed and unsigned integer expressions
make[2]: *** [engine/CMakeFiles/elengine.dir/textureformatutil.cpp.o] Error 1
make[1]: *** [engine/CMakeFiles/elengine.dir/all] Error 2
make: *** [all] Error 2

Share this post


Link to post
Share on other sites

after compiling el_client and dropping it into the EL directory, starting it up causes a segfault:

 

open("/usr/local/games/EternalLands/./meshes/head5_humanf.cmf", O_RDONLY|O_LARGEFILE) = 16
_llseek(16, 0, [0], SEEK_CUR)           = 0
mmap2(NULL, 528384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6c7f000
read(16, "CMF\0\274\2\0\0\1\0\0\0\16\0\0\0\23\1\0\0i\1\0\0\0\0\0\0\0\0\0\0"..., 262144) = 19116
read(16, "", 243028)                    = 0
munmap(0xb6c7f000, 528384)              = 0
close(16)                               = 0
--- {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x38} (Segmentation fault) ---
+++ killed by SIGSEGV (core dumped) +++
Segmentation fault (core dumped)


$ gdb el_client 
Reading symbols from /usr/local/games/EL192/el_client...done.
(gdb) run
Starting program: /usr/local/games/EL192/el_client 
[Thread debugging using libthread_db enabled]
[New Thread 0xb7108b70 (LWP 2919)]
[New Thread 0xb67ffb70 (LWP 2920)]

Program received signal SIGSEGV, Segmentation fault.
0x081570ac in build_buffers ()
(gdb) where
#0  0x081570ac in build_buffers ()
#1  0x08234849 in parse_actor_script ()
#2  0x082349d7 in parse_actor_defs ()
#3  0x08235113 in init_actor_defs ()
#4  0x0826b80e in init_stuff ()
#5  0x08119270 in main ()

 

And the main log file:

 


[22:54:21, /tmp/elsrc/Eternal-Lands/engine/logging.cpp:307] Git sha1: ab04adcdef358e812d90777fbb7123ea929b5580
[22:54:21, /tmp/elsrc/Eternal-Lands/engine/logging.cpp:310] Git tag: -128-NOTFOUND
[22:54:21, /tmp/elsrc/Eternal-Lands/engine/logging.cpp:313] CMAKE_BUILD_TYPE: Release
[22:54:21, /tmp/elsrc/Eternal-Lands/engine/logging.cpp:316] Log started at: Sun Jan  1 22:54:21 2012 PST
[22:54:21, /tmp/elsrc/Eternal-Lands/engine/logging.cpp:319] version: 1.9.2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'server_address = game.eternal-lands.com
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'server_port = 2001
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'no_adjust_shadows= 1
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'shadows_on= 1
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'use_shadow_mapping= 1
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'clouds_shadows= 1
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'show_reflection= 1
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'use_vertex_array = 1
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'use_mipmaps = 0
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'particles_percentage = 100
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'text_filter_replace = smeg
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'render_fog= 1
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'compass_north = 1
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'isometric= 0
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'perspective= 0.4
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'near_plane= 0.1
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'transparency_resolution_fix= 0
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'dim_sounds_on_rain= 0
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'anisotropic_filter= 2
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'render_skeleton= 0
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'render_mesh= 1
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'use_display_actors= 1
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'use_actor_bbox_check= 1
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'use_render_mesh_shader= 1
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'use_set_transformation_buffers= 1
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'use_build_actor_bounding_box= 1
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'use_model_attach_and_detach_mesh= 1
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'use_render_attached_meshs= 1
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'water_shader_quality= 2
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'use_ext_gpu_program_parameters= 0
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'use_new_selection= 0
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'far_plane= 80
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'skybox_update_every_frame= 0
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'seconds_between_shadows_updates= 10
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'use_animation_program= 1
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/elconfig.c:1328] Warning: Can't find var 'small_actor_texture_cache= 0
', type 2
[22:54:21, /tmp/elsrc/Eternal-Lands/init.c:190] Error: read_config() chdir("c:\Program Files\Eternal Lands\/") failed
[22:54:21, /tmp/elsrc/Eternal-Lands/io/elpathwrapper.c:664] Warning: Didn't find your data_dir, using the current directory instead. Please correct this in your el.ini . Given data_dir was: "c:\Program Files\Eternal Lands\/". Using "/usr/local/games/EL192.GL2".
[22:54:22, /tmp/elsrc/Eternal-Lands/elconfig.c:1267] Error: Can't find var 'clouds_shadows', type 'IN_GAME_VAR'
[22:54:22, /tmp/elsrc/Eternal-Lands/elconfig.c:1267] Error: Can't find var 'water_shader_quality', type 'IN_GAME_VAR'
[22:54:23, /tmp/elsrc/Eternal-Lands/engine/font/texturefont.cpp:114] Error: /tmp/elsrc/Eternal-Lands/engine/font/texturefont.cpp(114): Throw in function eternal_lands::{anonymous}::FtFace::FtFace(const FtLibrarySharedPtr&, const String&)
Dynamic exception type: eternal_lands::InternalErrorException
std::exception::what: std::exception
[eternal_lands::errinfo_code_*] = 1
[eternal_lands::errinfo_message_*] = cannot open resource
[22:54:23, /tmp/elsrc/Eternal-Lands/io/elfilewrapper.c:308] Error: Can't load zip file /home/mcp/.elc/unofficial_custom_clothes.zip
[22:54:23, /tmp/elsrc/Eternal-Lands/elconfig.c:1267] Error: Can't find var 'clouds_shadows', type 'IN_GAME_VAR'
[22:54:23, /tmp/elsrc/Eternal-Lands/elconfig.c:1267] Error: Can't find var 'water_shader_quality', type 'IN_GAME_VAR'

Edited by Rhonan

Share this post


Link to post
Share on other sites

@bluap: the errors look like a too old version of GLEW...

Yep, as I suspected. Last time I compiled (a while ago) it was fine, Ubuntu 10.04 LTS uses libglew1.5-dev. I tried on a VM using the latest Ubuntu which has both libglew1.5-dev and libglew1.6-dev, the 1.6 version works.

 

@Xaphier: The code now also needs libfontconfig1-dev but the cmake stage does not fail if its not installed.

Share this post


Link to post
Share on other sites

Thanks all for trying it. I hopefully have fixed some more bugs now :)

 

Looks like things are shuffling around. I downloaded the git repository and attempted to compile on Linux. It complains about 2d_objects, which looks like it was moved to map_editor/, and if I try to compile map_editor, it complains that particle_sys_def is not defined anywhere, and I can't find a typedef in the source for it. Is there a particular branch for code that should always at least compile? or am I just completely missing something. (I didn't see any docs or instructions on how to do a make, so I just attempted make -f Makefile.linux)

 

thx,

Rhonan

Don't use make -f Makefile.linux for the opengl2 client. make a folder called build outside the source tree and cd to it.

run: cmake ../path/to/source/tree/

and then make (inside the build folder)

 

 

Thanks for the build hint. I haven't used cmake before. I saw people refer to it in posts about Windows and thought it was a Windows thing. You may want to create a brief BUILD file explaining the simple procedure to cut down on questions later. :)

 

As an FYI, using the most current (beta) version of glm ( glm-0.9.3.B ) produces the following error:

 

In file included from /usr/include/glm/./core/func_exponential.hpp:121:0,

from /usr/include/glm/glm.hpp:100,

from /tmp/elsrc/Eternal-Lands/engine/prerequisites.hpp:55,

from /tmp/elsrc/Eternal-Lands/engine/rstartree.hpp:15,

from /tmp/elsrc/Eternal-Lands/engine/rstartree.cpp:8:

/usr/include/glm/./core/func_exponential.inl: In member function 'T glm::detail::compute_log2<PATH>::operator()(const T&) const':

/usr/include/glm/./core/func_exponential.inl:98:110: error: invalid application of 'sizeof' to incomplete type 'boost::STATIC_ASSERTION_FAILURE<false>'

/usr/include/glm/./core/func_exponential.inl:98:111: error: template argument 1 is invalid

/usr/include/glm/./core/func_exponential.inl:98:143: error: invalid type in declaration before ';' token

make[2]: *** [engine/CMakeFiles/elengine.dir/rstartree.cpp.o] Error 1

make[1]: *** [engine/CMakeFiles/elengine.dir/all] Error 2

make: *** [all] Error 2

 

 

Using the most recent stable glm ( glm-0.9.2.7 ) works ok. Thought you might want to know in case the beta version goes stable at some point and breaks things in the EL code.

The idea about the BUILD file is good, when I have time for it I will make it. In the meantime, any help is welcome ;)

Thanks for trying glm-0.9.3, will look at it when it's stable.

 

 

@bluap: the errors look like a too old version of GLEW...

Yep, as I suspected. Last time I compiled (a while ago) it was fine, Ubuntu 10.04 LTS uses libglew1.5-dev. I tried on a VM using the latest Ubuntu which has both libglew1.5-dev and libglew1.6-dev, the 1.6 version works.

 

@Xaphier: The code now also needs libfontconfig1-dev but the cmake stage does not fail if its not installed.

The need for fontconfig was a mistake, should be no longer needed.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×