Ubuntu 8.10 and OpenWindowedScreen()

Linux specific forum
User avatar
Comtois
Addict
Addict
Posts: 1432
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Ubuntu 8.10 and OpenWindowedScreen()

Post by Comtois »

With the code that follows, I see two windows!
while under windows, there is only one.

I wonder if it is only me, or if it's the same for others?

Then, if I turn InitEngine3D() by deleting the comment, then I get an error on the line ClearScreen(), And you ?

Code: Select all

;InitEngine3D()
InitSprite()

If OpenWindow(0, 100, 200, 195, 260, "PureBasic Window", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget)
OpenWindowedScreen(WindowID(0),0,0,195,260,1,0,0)


  Repeat
    Event = WindowEvent()

    If Event = #PB_Event_CloseWindow  ; If the user has pressed on the close button
      Quit = 1
    EndIf
  ClearScreen(RGB(120,120,0))
  Until Quit = 1

 
EndIf

End   ; All the opened windows are closed automatically by PureBasic
Please correct my english
http://purebasic.developpez.com/
Violet
Enthusiast
Enthusiast
Posts: 106
Joined: Sun Dec 23, 2007 6:30 pm

Post by Violet »

The thing with the two Windows is normal, because PureBasic uses SDL, and SDL opens an own rendering Screen. You can hide the Window you've created with HideWindow(#Window).
I think because of the portability it's that way, because under Microsoft Windows the windowed screen can be opened in a Window created by you.
best regards,

Violet
User avatar
Comtois
Addict
Addict
Posts: 1432
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Post by Comtois »

Violet wrote:The thing with the two Windows is normal, because PureBasic uses SDL, and SDL opens an own rendering Screen. You can hide the Window you've created with HideWindow(#Window).
I think because of the portability it's that way, because under Microsoft Windows the windowed screen can be opened in a Window created by you.
Thank you.


And did you test with InitEngine3D() ?
Please correct my english
http://purebasic.developpez.com/
User avatar
Comtois
Addict
Addict
Posts: 1432
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Post by Comtois »

:oops: I forgot to activate the subsystem opengl !

with this code (and subsystem opengl enabled) I get this message
the debugged executable quit unexpectedly

Code: Select all

InitEngine3D()
InitSprite()

If OpenWindow(0, 100, 200, 195, 260, "PureBasic Window", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget)
OpenWindowedScreen(WindowID(0),0,0,195,260,1,0,0)
CreateCamera(0,0,0,100,100)

  Repeat
    Event = WindowEvent()

    If Event = #PB_Event_CloseWindow  ; If the user has pressed on the close button
      Quit = 1
    EndIf
   RenderWorld()
  ClearScreen(RGB(120,120,0))
  Until Quit = 1

  
EndIf

End   ; All the opened windows are closed automatically by PureBasic
i'm alone with this problem ?
Please correct my english
http://purebasic.developpez.com/
Fred
Administrator
Administrator
Posts: 18351
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

could you check the Ogre.log ?
User avatar
Comtois
Addict
Addict
Posts: 1432
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Post by Comtois »

here it's
14:15:23: Creating resource group General
14:15:23: Creating resource group Internal
14:15:23: Creating resource group Autodetect
14:15:23: SceneManagerFactory for type 'DefaultSceneManager' registered.
14:15:23: Registering ResourceManager for type Material
14:15:23: Registering ResourceManager for type Mesh
14:15:23: Registering ResourceManager for type Skeleton
14:15:23: MovableObjectFactory for type 'ParticleSystem' registered.
14:15:23: OverlayElementFactory for type Panel registered.
14:15:23: OverlayElementFactory for type BorderPanel registered.
14:15:23: OverlayElementFactory for type TextArea registered.
14:15:23: Registering ResourceManager for type Font
14:15:23: ArchiveFactory for archive type FileSystem registered.
14:15:23: ArchiveFactory for archive type Zip registered.
14:15:23: FreeImage version: 3.10.0
14:15:23: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
14:15:23: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,koa,iff,lbm,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,dds,gif,g3,sgi,j2k,j2c,jp2
14:15:23: DDS codec registering
14:15:23: Registering ResourceManager for type HighLevelGpuProgram
14:15:23: Registering ResourceManager for type Compositor
14:15:23: MovableObjectFactory for type 'Entity' registered.
14:15:23: MovableObjectFactory for type 'Light' registered.
14:15:23: MovableObjectFactory for type 'BillboardSet' registered.
14:15:23: MovableObjectFactory for type 'ManualObject' registered.
14:15:23: MovableObjectFactory for type 'BillboardChain' registered.
14:15:23: MovableObjectFactory for type 'RibbonTrail' registered.
14:15:23: OGRE EXCEPTION(6:FileNotFoundException): 'plugins.cfg' file not found! in ConfigFile::load at OgreConfigFile.cpp (line 84)
14:15:23: plugins.cfg not found, automatic plugin loading disabled.
14:15:23: *-*-* OGRE Initialising
14:15:23: *-*-* Version 1.6.0RC1 (Shoggoth)
14:15:23: OpenGL Rendering Subsystem created.
14:15:23: Particle Emitter Type 'Point' registered
14:15:23: Particle Emitter Type 'Box' registered
14:15:23: Particle Emitter Type 'Ellipsoid' registered
14:15:23: Particle Emitter Type 'Cylinder' registered
14:15:23: Particle Emitter Type 'Ring' registered
14:15:23: Particle Emitter Type 'HollowEllipsoid' registered
14:15:23: Particle Affector Type 'LinearForce' registered
14:15:23: Particle Affector Type 'ColourFader' registered
14:15:23: Particle Affector Type 'ColourFader2' registered
14:15:23: Particle Affector Type 'ColourImage' registered
14:15:23: Particle Affector Type 'ColourInterpolator' registered
14:15:23: Particle Affector Type 'Scaler' registered
14:15:23: Particle Affector Type 'Rotator' registered
14:15:23: Particle Affector Type 'DirectionRandomiser' registered
14:15:23: Particle Affector Type 'DeflectorPlane' registered
14:15:23: CPU Identifier & Features
14:15:23: -------------------------
14:15:23: * CPU ID: GenuineIntel: Intel(R) Pentium(R) 4 CPU 2.66GHz
14:15:23: * SSE: yes
14:15:23: * SSE2: yes
14:15:23: * SSE3: no
14:15:23: * MMX: yes
14:15:23: * MMXEXT: yes
14:15:23: * 3DNOW: no
14:15:23: * 3DNOWEXT: no
14:15:23: * CMOV: yes
14:15:23: * TSC: yes
14:15:23: * FPU: yes
14:15:23: * PRO: no
14:15:23: * HT: yes
14:15:23: -------------------------
14:15:23: ******************************
*** Starting GLX Subsystem ***
******************************
14:15:23: SceneManagerFactory for type 'OctreeSceneManager' registered.
14:15:23: SceneManagerFactory for type 'TerrainSceneManager' registered.
14:15:23: SceneManagerFactory for type 'BspSceneManager' registered.
14:15:23: Registering ResourceManager for type BspLevel
14:15:23: GLRenderSystem::_createRenderWindow "PureBasic Ogre", 195x260 windowed miscParams: FSAA=0 externalWindowHandle=56623137
14:15:23: GLXWindow::create: The externalWindowHandle parameter is deprecated.
Use the parentWindowHandle or currentGLContext parameter instead.
14:15:23: GLXWindow::create used FBConfigID = 153
14:15:23: GL_VERSION = 2.1.2 NVIDIA 177.80
14:15:23: GL_VENDOR = NVIDIA Corporation
14:15:23: GL_RENDERER = GeForce 6800/AGP/SSE2
14:15:23: GL_EXTENSIONS = GL_ARB_color_buffer_float GL_ARB_depth_texture GL_ARB_draw_buffers GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_half_float_pixel GL_ARB_imaging GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query GL_ARB_pixel_buffer_object GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_shadow GL_ARB_shader_objects GL_ARB_shading_language_100 GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_ARB_texture_float GL_ARB_texture_mirrored_repeat GL_ARB_texture_non_power_of_two GL_ARB_texture_rectangle GL_ARB_transpose_matrix GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_window_pos GL_ATI_draw_buffers GL_ATI_texture_float GL_ATI_texture_mirror_once GL_S3_s3tc GL_EXT_texture_env_add GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_equation_separate GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_compiled_vertex_array GL_EXT_Cg_shader GL_EXT_depth_bounds_test GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_framebuffer_object GL_EXT_gpu_program_parameters GL_EXT_multi_draw_arrays GL_EXT_packed_depth_stencil GL_EXT_packed_pixels GL_EXT_pixel_buffer_object GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs GL_EXT_stencil_two_side GL_EXT_stencil_wrap GL_EXT_texture3D GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod GL_EXT_texture_lod_bias GL_EXT_texture_mirror_clamp GL_EXT_texture_object GL_EXT_texture_sRGB GL_EXT_timer_query GL_EXT_vertex_array GL_IBM_rasterpos_clip GL_IBM_texture_mirrored_repeat GL_KTX_buffer_region GL_NV_blend_square GL_NV_copy_depth_to_color GL_NV_depth_clamp GL_NV_fence GL_NV_float_buffer GL_NV_fog_distance GL_NV_fragment_program GL_NV_fragment_program_option GL_NV_fragment_program2 GL_NV_framebuffer_multisample_coverage GL_NV_half_float GL_NV_light_max_exponent GL_NV_multisample_filter_hint GL_NV_occlusion_query GL_NV_packed_depth_stencil GL_NV_pixel_data_range GL_NV_point_sprite GL_NV_primitive_restart GL_NV_register_combiners GL_NV_register_combiners2 GL_NV_texgen_reflection GL_NV_texture_compression_vtc GL_NV_texture_env_combine4 GL_NV_texture_expand_normal GL_NV_texture_rectangle GL_NV_texture_shader GL_NV_texture_shader2 GL_NV_texture_shader3 GL_NV_vertex_array_range GL_NV_vertex_array_range2 GL_NV_vertex_program GL_NV_vertex_program1_1 GL_NV_vertex_program2 GL_NV_vertex_program2_option GL_NV_vertex_program3 GL_NVX_conditional_render GL_SGIS_generate_mipmap GL_SGIS_texture_lod GL_SGIX_depth_texture GL_SGIX_shadow GL_SUN_slice_accum
14:15:23: Supported GLX extensions: GLX_EXT_visual_info GLX_EXT_visual_rating GLX_SGIX_fbconfig GLX_SGIX_pbuffer GLX_SGI_video_sync GLX_SGI_swap_control GLX_EXT_texture_from_pixmap GLX_ARB_multisample GLX_NV_float_buffer GLX_ARB_fbconfig_float GLX_ARB_get_proc_address
14:15:23: ***************************
14:15:23: *** GL Renderer Started ***
14:15:23: ***************************
14:15:23: Registering ResourceManager for type GpuProgram
14:15:23: GLSL support detected
14:15:23: GL: Using GL_EXT_framebuffer_object for rendering to textures (best)
14:15:23: FBO PF_UNKNOWN depth/stencil support: D16S0 D24S0 D32S0 Packed-D24S8
14:15:23: FBO PF_R5G6B5 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8
14:15:23: FBO PF_B5G6R5 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8
14:15:23: FBO PF_R8G8B8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8
14:15:23: FBO PF_B8G8R8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8
14:15:23: FBO PF_A8R8G8B8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8
14:15:23: FBO PF_B8G8R8A8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8
14:15:23: FBO PF_A2R10G10B10 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8
14:15:24: FBO PF_A2B10G10R10 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8
14:15:24: FBO PF_FLOAT16_RGB depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8
14:15:24: FBO PF_FLOAT16_RGBA depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8
14:15:24: FBO PF_FLOAT32_RGB depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8
14:15:24: FBO PF_FLOAT32_RGBA depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8
14:15:24: FBO PF_X8R8G8B8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8
14:15:24: FBO PF_X8B8G8R8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8
14:15:24: FBO PF_SHORT_RGBA depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8
14:15:24: FBO PF_R3G3B2 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8
14:15:24: FBO PF_SHORT_RGB depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8
14:15:24: [GL] : Valid FBO targets PF_UNKNOWN PF_R5G6B5 PF_B5G6R5 PF_R8G8B8 PF_B8G8R8 PF_A8R8G8B8 PF_B8G8R8A8 PF_A2R10G10B10 PF_A2B10G10R10 PF_FLOAT16_RGB PF_FLOAT16_RGBA PF_FLOAT32_RGB PF_FLOAT32_RGBA PF_X8R8G8B8 PF_X8B8G8R8 PF_SHORT_RGBA PF_R3G3B2 PF_SHORT_RGB
14:15:24: RenderSystem capabilities
14:15:24: -------------------------
14:15:24: RenderSystem Name: OpenGL Rendering Subsystem
14:15:24: GPU Vendor: nvidia
14:15:24: Device Name: GeForce 6800/AGP/SSE2
14:15:24: Driver Version: 2.1.2.0
14:15:24: * Fixed function pipeline: yes
14:15:24: * Hardware generation of mipmaps: yes
14:15:24: * Texture blending: yes
14:15:24: * Anisotropic texture filtering: yes
14:15:24: * Dot product texture operation: yes
14:15:24: * Cube mapping: yes
14:15:24: * Hardware stencil buffer: yes
14:15:24: - Stencil depth: 8
14:15:24: - Two sided stencil support: yes
14:15:24: - Wrap stencil values: yes
14:15:24: * Hardware vertex / index buffers: yes
14:15:24: * Vertex programs: yes
14:15:24: * Fragment programs: yes
14:15:24: * Supported Shader Profiles: arbfp1 arbvp1 fp20 fp30 fp40 glsl vp30 vp40
14:15:24: * Texture Compression: yes
14:15:24: - DXT: yes
14:15:24: - VTC: yes
14:15:24: * Scissor Rectangle: yes
14:15:24: * Hardware Occlusion Query: yes
14:15:24: * User clip planes: yes
14:15:24: * VET_UBYTE4 vertex element type: yes
14:15:24: * Infinite far plane projection: yes
14:15:24: * Hardware render-to-texture: yes
14:15:24: * Floating point textures: yes
14:15:24: * Non-power-of-two textures: yes
14:15:24: * Volume textures: yes
14:15:24: * Multiple Render Targets: 4
14:15:24: - With different bit depths: yes
14:15:24: * Point Sprites: yes
14:15:24: * Extended point parameters: yes
14:15:24: * Max Point Size: 63.375
14:15:24: * Vertex texture fetch: yes
14:15:24: - Max vertex textures: 4
14:15:24: - Vertex textures shared: yes
14:15:24: * GL 1.5 without VBO workaround: no
14:15:24: * Frame Buffer objects: yes
14:15:24: * Frame Buffer objects (ARB extension): no
14:15:24: * Frame Buffer objects (ATI extension): no
14:15:24: * PBuffer suppport: no
14:15:24: * GL 1.5 without HW-occlusion workaround: no
14:15:24: Registering ResourceManager for type Texture
14:15:24: ResourceBackgroundQueue - threading disabled
14:15:24: Particle Renderer Type 'billboard' registered
14:15:24: Creating viewport on target 'PureBasic Ogre', rendering from camera 'C0', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
Please correct my english
http://purebasic.developpez.com/
Violet
Enthusiast
Enthusiast
Posts: 106
Joined: Sun Dec 23, 2007 6:30 pm

Post by Violet »

@Comtois: Just by the way because of your question if I tried with OGRE; OGRE didn't work here on my Ubuntu at all, never get further than a specific point in the log... I think it was not far beyond something with "Terrain". But anyway, now I reinstalled Ubuntu and used the 64-Bit AMD Version, so PureBasic is not avaible for me on Linux right now (but doesn't matter, started coding in C++ a.s.o. :D ).
best regards,

Violet
GBeebe
Enthusiast
Enthusiast
Posts: 263
Joined: Sat Oct 09, 2004 6:52 pm
Location: Franklin, PA - USA
Contact:

one window

Post by GBeebe »

Hey, if I had the #PB_Window_Invisible flag to OpenWindow(), the window made by OpenWindowedScreen() is still visible...
Hope this helps.
User avatar
Comtois
Addict
Addict
Posts: 1432
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Post by Comtois »

i dont understand this
14:15:23: GLRenderSystem::_createRenderWindow "PureBasic Ogre", 195x260 windowed miscParams: FSAA=0 externalWindowHandle=56623137
14:15:23: GLXWindow::create: The externalWindowHandle parameter is deprecated.
Use the parentWindowHandle or currentGLContext parameter instead.
is it a problem with my driver ? or something else (old graphic card ?) ?

I cant use 3D under Linux.
Please correct my english
http://purebasic.developpez.com/
matty47
User
User
Posts: 35
Joined: Fri Sep 26, 2003 10:21 pm

Post by matty47 »

I am having trouble with PB V4.3B5 under Ubuntu 8.1 as well. For example on the terrain example running from the ide and selecting windowed mode the terrain shows in greyscale only and appears to be running at say 1 FPS. (I am using Nvidia display driver and desktop effects are turned off. Other GL programs seem to run fully accelerated without problem, even those under WINE.) Keyboard and mouse response seems very sluggish. If I select fullscreen no size choices are available in the dialog. I tried making an executable to run outside the ide but when I tried to run this it told me it could not find the 3d engine library. (tried running by double clicking in Nautilus file explorer - perhaps I should try from command line).
The latest version does seem to run well on both Windows and OS X.
Would dearly love to see this running under the alternate OS :D
Post Reply