X_PRINT and light sources?

Previous topic - Next topic

planetm

Another 3D question, sorry!

I have my program plotting points on a 3D graph and I can fly around them. When I press L each point is labelled using X_PRINT. Currently I have one X_AMBIENT_LT light source, but the label text appears white when viewed from one side and dark grey when viewed from the other side. Surely if the light source is ambient both sides should be lit equally? The side facing 0,0,0 is lit brightly. Adding X_SPOT_LT sources doesn't seem to help, in fact, if I remove the ambient source, they don't seem to illuminate X_PRINT text at all.

Is this a bug or am I doing something wrong? (You can grab my program executable from http://on.plu.to/The_Nuclear_Valley_0.4b.zip to see for yourself)

Secondly, has the Linux segmentation error bug appeared again, I compiled my code for linux last night and it failed to run on my OpenSuse PC?

Thanks for the continued support Gernot,

Matt.

Kitty Hello

Please post the Linux output when starting from a console window.
I think X_PRINT should not be lit at all, so it's a bug, yes.

planetm

But if X_PRINT is not lit then my nice white font appears dark grey on a black background and is almost unreadable, how can I work around this?

here's the linux console output:
Code (glbasic) Select
Set Vidmode
Screen BPP: 32

Vendor     : NVIDIA Corporation
Renderer   : GeForce FX 5700/AGP/SSE/3DNOW!
Version    : 1.2 (2.1.0 NVIDIA 96.31)
Extensions : GL_ARB_depth_texture GL_ARB_imaging GL_ARB_multitexture GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_shadow GL_ARB_texture_border_clamp GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat GL_ARB_window_pos GL_ARB_vertex_program GL_ARB_fragment_program GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_packed_pixels GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_EXT_texture3D GL_EXT_texture_edge_clamp GL_EXT_texture_env_add GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_lod GL_EXT_texture_lod_bias GL_EXT_texture_object GL_EXT_vertex_array GL_HP_occlusion_test GL_IBM_texture_mirrored_repeat GL_NV_blend_square GL_NV_texgen_reflection GL_NV_texture_rectangle GL_NV_texture_env_combine4 GL_SGIS_generate_mipmap GL_SGIS_texture_lod GL_SGIX_depth_texture GL_SGIX_shadow

SDL_GL_RED_SIZE: requested 8, got 8
SDL_GL_GREEN_SIZE: requested 8, got 8
SDL_GL_BLUE_SIZE: requested 8, got 8
SDL_GL_DEPTH_SIZE: requested 24, got 24
SDL_GL_DOUBLEBUFFER: requested 1, got 1
Extensions
ext: glActiveTextureARB   [ OK ]
ext: glMultiTexCoord2fARB   [ OK ]
ext: glClientActiveTextureARB   [ OK ]
ext: glGenBuffersARB   [ OK ]
ext: glBindBufferARB   [ OK ]
ext: glBufferDataARB   [ OK ]
ext: glDeleteBuffersARB   [ OK ]
ext: glMapBufferARB   [ OK ]
ext: glUnmapBufferARB   [ OK ]
ext: glCreateProgramObjectARB   [ OK ]
ext: glDeleteObjectARB   [ OK ]
ext: glCreateShaderObjectARB   [ OK ]
ext: glShaderSourceARB   [ OK ]
ext: glCompileShaderARB   [ OK ]
ext: glGetObjectParameterivARB   [ OK ]
ext: glAttachObjectARB   [ OK ]
ext: glGetInfoLogARB   [ OK ]
ext: glLinkProgramARB   [ OK ]
ext: glUseProgramObjectARB   [ OK ]
ext: glGetUniformLocationARB   [ OK ]
ext: glUniform1fARB   [ OK ]
ext: glUniform1iARB   [ OK ]
Init OK
Segmentation fault

Kitty Hello

Strange. It crashes in your main function. So, can you try a HelloWorld?

planetm

Hello world works fine!

I also tried PaperPlanes2, that crashed with the same error, but only after saving the plane.ddd file. My guess would be that it's a 3D related problem although I haven't tested further yet.

Regarding the X_PRINT text, you said 'X_PRINT should not be lit at all', does that mean that once the bug is fixed my text will all appear white (as it is in the font bmp) or will it all appear dark grey because it's not being lit up?

Thanks as always for the support...

Matt.

Kitty Hello

It will look like the 2D Print command. For now, please turn the light off.

planetm

Hi again Gernot,

Thanks for fixing the x_print command.

I'm still having the segmentation error on linux though. Would it help if I sent you the source for my project? It's not very long and may help you to find the problem.

Matt.

Kitty Hello


planetm

Just in case anybody reading this thread in the future wonders the cause of my linux problems, Gernot provided a great deal of support and it turned out to be my old version of xgl/compiz causing the problems with opengl.

All sorted now, thanks :)