VOGONS


Openglide on MacOS X

Topic actions

  • This topic is locked. You cannot reply or edit posts.

Reply 41 of 69, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator
gcc bc.c -I/opt/local/include -I/usr/local/include/openglide -arch i386 -lglide2x /usr/local/include/openglide
In file included from /usr/local/include/openglide/sdk2_glide.h:36,
from test.h:20,
from bc.c:3:
/usr/local/include/openglide/sdk2_3dfx.h:100:4: warning: #warning define FX_ENTRY & FX_CALL for your compiler
ld: in /usr/local/include/openglide, can't map file, errno=22
collect2: ld returned 1 exit status
g++ bc.c -I/opt/local/include -I/usr/local/include/openglide -arch i386 -lglide2x /usr/local/include/openglide
In file included from /usr/local/include/openglide/sdk2_glide.h:36,
from test.h:20,
from bc.c:3:
/usr/local/include/openglide/sdk2_3dfx.h:100:4: warning: #warning define FX_ENTRY & FX_CALL for your compiler
In file included from bc.c:3:
test.h: In function ‘int main(int, char**)’:
test.h:43: error: ‘getch’ was not declared in this scope
test.h:62: error: ‘getch’ was not declared in this scope

I'm not sure if I'm doing this right at all. Whether to compile this with gcc or g++ or with something different.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox

Reply 42 of 69, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

I don't know what the map file is supposed to be, but try to replace that getch with some sleep or scanf or something (it is there just to make sure the program does not exit immediately). You could also add something like int i = some_really_big number; while(i--); 😀

http://www.si-gamer.net/gulikoza

Reply 49 of 69, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

nope, it's quite frustrating this way and I'm sure if you could tinker around with it directly you'd find the culprit 😀

In the meantime, I'm still yours for whatever you throw at me 😀

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox

Reply 50 of 69, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

How about this? 😁
Indeed it seems openglide requires -Wl,-framework,OpenGL and not -lGL and -lGLU (I thought if -lGL wouldn't work it wouldn't compile, not that it would crash 😜).
I had all sorts of other problems compiling (how is it that it went that smooth for you?), I'll try to prepare a patch that solves all the problems and see how it goes from there...

Attachments

  • image.jpg
    Filename
    image.jpg
    File size
    416.82 KiB
    Views
    6277 views
    File license
    Fair use/fair dealing exception

http://www.si-gamer.net/gulikoza

Reply 52 of 69, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Indeed it seems openglide requires -Wl,-framework,OpenGL and not -lGL and -lGLU (I thought if -lGL wouldn't work it wouldn't compile, not that it would crash Sticking Tongue Out).

woot woot woot!!!

I had all sorts of other problems compiling (how is it that it went that smooth for you?), I'll try to prepare a patch that solves all the problems and see how it goes from there...

We did eliminate some stuff before in the other thread, but now that I threw in the framework OpenGL stuff in there, I get problems too, but never mind, I'll wait for your patch 😀
Actually I'm really stupid, I *should* have noticed the wrong OpenGL library call, I knew the correct one from Exult... It had to be somethin obvious...

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox

Reply 53 of 69, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

This seems to work for me with current cvs. Should compile out of the box with only those few CFLAGS and LDFLAGS settings (I used CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-arch i386", don't know if any more are required? Dominus?). The patch is relatively simple, only some minor fixes and I added proper return values to InitialiseOpenGLWindow. It should be noted only the SDL version builds under MacOS X, there is no native version.

Patch tested to compile on:
MacOS X 10.6.2 (xcode 3.2.1) x86 & x86_64 - SDL only
Still working:
MINGW & MSVC6 - SDL & native
Centos5 x86 & x86_64 - SDL & native

BTW, it is interesting that MacOS X 10.6.2 gets detected as i386-darwin in configure, yet gcc builds 64-bit binaries by default (dosbox does not compile without forcing gcc to make 32-bit binaries). Yet, SDL configure script detects it as x86_64-darwin, I can't find why...I could build both SDL and openglide in 64-bit mode, but I couldn't build dosbox...

Attachments

  • Filename
    openglide-macosx.diff
    File size
    12.28 KiB
    Downloads
    401 downloads
    File license
    Fair use/fair dealing exception

http://www.si-gamer.net/gulikoza

Reply 54 of 69, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

I'll give it a try now.

You should be able to build Dosbox in 64bit, I did so via MacPort but it is better to build it in 32bit or else you will lose the dynamic core. And you need to build all the libraries that Dosbox needs in universal, meaning 32- and 64bit. I recommend using MacPorts if you don't want to lose too much hair building all the stuff on OS X 😀

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox

Reply 55 of 69, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

ok, it is working now. Many thanks! Looks fun now 😀

When Tomb Raider starts the actual game I get the console message:
"Warning: Severe Problem: OpenGL GL_EXT_packed_pixels extension is required for OpenGLide!"

Also when I run Dosbox windowed the screen gets very bright whenever Glide initialises.

Lands of Lore 3 has texture errors, if that is of interest 😀

In the log this is listed:
--------------------------------------------------------
** OpenGL Information **
--------------------------------------------------------
Vendor: ATI Technologies Inc.
Renderer: ATI Radeon HD 4850 OpenGL Engine
Version: 2.1 ATI-1.6.6
Extensions: GL_ARB_transpose_matrix GL_ARB_vertex_program GL_ARB_vertex_blend GL_ARB_window_pos GL_ARB_shader_objects GL_ARB_vertex_shader GL_ARB_shading_language_100 GL_EXT_multi_draw_arrays GL_EXT_clip_volume_hint GL_EXT_rescale_normal GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_gpu_program_parameters GL_EXT_geometry_shader4 GL_EXT_transform_feedback GL_APPLE_client_storage GL_APPLE_specular_vector GL_APPLE_transform_hint GL_APPLE_packed_pixels GL_APPLE_fence GL_APPLE_vertex_array_object GL_APPLE_vertex_program_evaluators GL_APPLE_element_array GL_APPLE_flush_render GL_APPLE_aux_depth_stencil GL_NV_texgen_reflection GL_NV_light_max_exponent GL_IBM_rasterpos_clip GL_SGIS_generate_mipmap GL_ARB_imaging GL_ARB_point_parameters GL_ARB_texture_env_crossbar GL_ARB_texture_border_clamp GL_ARB_multitexture GL_ARB_texture_env_add GL_ARB_texture_cube_map GL_ARB_texture_env_dot3 GL_ARB_multisample GL_ARB_texture_env_combine GL_ARB_texture_compression GL_ARB_texture_mirrored_repeat GL_ARB_shadow GL_ARB_depth_texture GL_ARB_shadow_ambient GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_occlusion_query GL_ARB_point_sprite GL_ARB_texture_non_power_of_two GL_ARB_vertex_buffer_object GL_ARB_pixel_buffer_object GL_ARB_draw_buffers GL_ARB_shader_texture_lod GL_ARB_color_buffer_float GL_ARB_half_float_vertex GL_ARB_texture_rg GL_ARB_texture_compression_rgtc GL_EXT_compiled_vertex_array GL_EXT_draw_buffers2 GL_EXT_framebuffer_object GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_texture_rectangle GL_ARB_texture_rectangle GL_EXT_texture_env_add GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_texture_lod_bias GL_EXT_abgr GL_EXT_bgra GL_EXT_stencil_wrap GL_EXT_texture_filter_anisotropic GL_EXT_separate_specular_color GL_EXT_secondary_color GL_EXT_blend_func_separate GL_EXT_shadow_funcs GL_EXT_stencil_two_side GL_EXT_texture_compression_s3tc GL_EXT_texture_compression_dxt1 GL_EXT_texture_sRGB GL_EXT_blend_equation_separate GL_EXT_texture_mirror_clamp GL_EXT_packed_depth_stencil GL_EXT_bindable_uniform GL_EXT_texture_integer GL_EXT_gpu_shader4 GL_EXT_framebuffer_sRGB GL_APPLE_flush_buffer_range GL_APPLE_ycbcr_422 GL_APPLE_rgb_422 GL_APPLE_vertex_array_range GL_APPLE_texture_range GL_APPLE_float_pixels GL_ATI_texture_float GL_ARB_texture_float GL_ARB_half_float_pixel GL_APPLE_pixel_buffer GL_APPLE_object_purgeable GL_NV_blend_square GL_NV_fog_distance GL_ATI_texture_mirror_once GL_ATI_blend_equation_separate GL_ATI_blend_weighted_minmax GL_ATI_texture_env_combine3 GL_ATI_separate_stencil GL_ATI_texture_compression_3dc GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_SGI_color_matrix
--------------------------------------------------------
OpenGL Extensions:
--------------------------------------------------------
Severe Problem: OpenGL GL_EXT_packed_pixels extension is required for OpenGLide!Extension GL_EXT_secondary_color is present and ENABLED
Extension GL_ARB_multitexture is present and ENABLED
Extension GL_EXT_fog_coord is present and ENABLED
Extension GL_EXT_texture_env_add is present and ENABLED
Note: OpenGL GL_EXT_texture_env_combine extension is not supported, emulating behavior.
Extension GL_EXT_texture_lod_bias is present and ENABLED
Note: OpenGL GL_SGIS_generate_mipmap extension is supported but disabled by user
Note: OpenGL GL_EXT_paletted_texture extension is not supported, emulating behavior.
Note: OpenGL GL_EXT_vertex_array extension is not supported, emulating behavior.
Extension GL_EXT_blend_func_separate is present and ENABLED
--------------------------------------------------------
MultiTexture Textures Units = 8
--------------------------------------------------------
Setting in Use:
--------------------------------------------------------
Init Full Screen = true
Fog = true
Precision Fix = false
Wrap 565 to 5551 = true
Texture Memory Size = 16 Mb
Frame Buffer Memory Size = 8 Mb
MMX is present
--------------------------------------------------------
--------------------------------------------------------
** Glide Calls **
----------------------------------------------------

Reply 56 of 69, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

Yes, I've noticed the GL_EXT_packed_pixels error, but openglide luckily does not abort and it seems to work fine anyway 😀

The bright screen is actually the game setting the gamma, but SDL seems only to be able to adjust the gamma of the whole screen not just the window (if that's possible at all).

http://www.si-gamer.net/gulikoza

Reply 57 of 69, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

And not being able to switch Dosbox from windowed mode to fullscreen is probably known, right?
Other than that it seems to work fine, only when you start a game/load a game in Tomb Raider it sometimes fails to load... I'll see if I can log it 😀

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox

Reply 59 of 69, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

oh, it didn't do that before? Lucky me now 😀
It has been fun now playing with this. Now I need to find what other glide games I have besides Tomb Raider and Lands of Loare 3 😀

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox