Files |  Tutorials |  Articles |  Links |  Home |  Team |  Forum |  Wiki |  Impressum

Aktuelle Zeit: Fr Jul 18, 2025 19:18

Foren-Übersicht » English » English Programming Forum
Unbeantwortete Themen | Aktive Themen



Ein neues Thema erstellen Auf das Thema antworten  [ 31 Beiträge ]  Gehe zu Seite 1, 2, 3  Nächste
Autor Nachricht
 Betreff des Beitrags: Helios - Lite
BeitragVerfasst: Di Sep 28, 2004 19:56 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 21, 2004 22:39
Beiträge: 360
Wohnort: UK, Scotland
Note to SOS: ET Maps do not load (lightmaps array is nil yet, the faces reference lightmap id's.....).

UPDATED: 5th Nov 2004
Version 1.1
- Helios Lite (1.05MB)
- Helios Full (3.77MB)

Changelog
1.1 Alpha (Changes since 0.9 Alpha)
- revisions by Stucuk:
- Added: Support for Q3 type ladders and water(not tested)
- Added: RTCW Scripts(Doesn't include Ai and model support) and Camera support
- Added: Fog
- Added: DDS Support
- Added: Cutscene mode to cameras
- Added: When a basedir is entered for a mod, that mod can read files from the basedir before it checks the Main dir for the files (meaning RTCW mods can work)
- Added: Basic RTCW Menu system(non interactive)
- BugFix: The problem with faces not being drawn when going up stairs has been fixed, Players height wasn't factored in
- BugFix: FSOUND_Update(); removed from Helios_Sound.pas, big fps improvements in most levels
- Changed: Pause now pauses: RTCW Camera's, RTCW Scripts, Movement, Entity's Think, Sounds
- Changed: Shaders can now read from the mod dir, the base dir and the Main dir

Full's Extras
- Particle Test map + its textures
- Shader Editor
- MD3 Viewer
- Particle Editor
- Vector Particle Editor

Particles
You can view the particles in the engine (with no map running, type closemap in console). You can also add particles to maps tho its best when no map is running.

usage: addparticles <name>

Current Particles:
Smoke
Fire
Drip
Fountain
Shower
Sprinkler
Space


Note: Its best to use the launcher and its best to have fullscreen unchecekd the first time its run (incase it crashes)


Dateianhänge:
Dateikommentar: Helios's Launcher
Launcher1.jpg
Launcher1.jpg [ 49.43 KiB | 8895-mal betrachtet ]
Dateikommentar: Helios - RTCW Mode
escape1_0023.jpg [230.32 KiB]
181-mal heruntergeladen

_________________
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Zuletzt geändert von Stucuk am Fr Nov 05, 2004 17:45, insgesamt 5-mal geändert.
Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Di Sep 28, 2004 21:50 
Offline
DGL Member
Benutzeravatar

Registriert: Mo Sep 23, 2002 19:27
Beiträge: 5812
Programmiersprache: C++
Just wanted to try it out, but I got many errors that it can't convert floating point values, after loading a level. Seems that you haven't taken into account that there are countries (like germany), where the decimal separator is a "," instead of a ".". So if you could fix this, I could try out helios on my Radeon.

_________________
www.SaschaWillems.de | GitHub | Twitter | GPU Datenbanken (Vulkan, GL, GLES)


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Di Sep 28, 2004 22:29 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 21, 2004 22:39
Beiträge: 360
Wohnort: UK, Scotland
a windows error box? or one from Helios? Some Rtcw fields have ',' in them(Also some fields have text when helios expects a number, i.e Random field should b an integer, yet iv seen some entitys have text in it), but apart from actual fields in the entitys i don't know what would cause this.....

Did u try it with ET? Can u see the console properly? (by just loading heliosapp.exe)

_________________
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Di Sep 28, 2004 22:33 
Offline
DGL Member
Benutzeravatar

Registriert: Mo Sep 23, 2002 19:27
Beiträge: 5812
Programmiersprache: C++
I hope this shot helps you in finding the error. That box then appears several times, and after I clicked them all away, nothing happens :

P.S. : No, it was not ET, it was RTCW.


Dateianhänge:
helios.jpg
helios.jpg [ 33.61 KiB | 8875-mal betrachtet ]

_________________
www.SaschaWillems.de | GitHub | Twitter | GPU Datenbanken (Vulkan, GL, GLES)
Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Di Sep 28, 2004 23:22 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 21, 2004 22:39
Beiträge: 360
Wohnort: UK, Scotland
This happens when u just load heliosapp.exe? If so i think it could b the shaders, they have alot of decimals........ Strtofloat is used.......

EDIT:

Found the following in the shader unit:

Code:
  1.  
  2. function StrToFloat(s : string) : extended;
  3. begin
  4.   try
  5.    // s := StringReplace(s, '.', ',', [rfReplaceAll]);
  6.     result := sysutils.StrToFloat(s);
  7.   except
  8.     ShowMessage('Cant convert ' + s);
  9.     result := 0.0;
  10.   end;
  11. end;
  12.  


So that should be...

Code:
  1.  
  2. function StrToFloat(s : string) : extended;
  3. begin
  4.   try
  5.    // s := StringReplace(s, '.', ',', [rfReplaceAll]);
  6.     result := sysutils.StrToFloat(s);
  7.   except
  8.   Try
  9.     s := StringReplace(s, '.', ',', [rfReplaceAll]);
  10.     result := sysutils.StrToFloat(s);
  11.   except
  12.     ShowMessage('Cant convert ' + s);
  13.     result := 0.0;
  14.   end;
  15.   end;
  16. end;
  17.  


Shoved the new strtofloat in Helios_Global.pas, which is in nearly every files uses list.

EDIT2:

Hopefully it will work this time...
- Helios Lite

BTW: some doors don't open when u press space, this is due to them being targeted by an entity, which disables this ability (whats the point of havng a button open a door is u can manualy do it....), the problem being that helios can't do the RTCW scripts so some doors are forever closed... (this is where noclip comes in handy :))

_________________
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Zuletzt geändert von Stucuk am Di Sep 28, 2004 23:40, insgesamt 1-mal geändert.

Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Di Sep 28, 2004 23:31 
Offline
DGL Member
Benutzeravatar

Registriert: Mo Sep 23, 2002 19:27
Beiträge: 5812
Programmiersprache: C++
That error has disappeared, but I now get an access violation at adress 0, which much likely hints to a problem with OpenGL. But there are no hints in GLOutput.txt that could help :
Code:
  1.    Project Helios v0.6 Alpha
  2.    
  3.    -- Display Settings ---
  4.    Size: 1280x960
  5.    PixelDepth: 32
  6.    TextureDepth: 32
  7.    StencilDepth: 24
  8.    FullScreen: True
  9.    
  10.    --- Creating Window ---
  11.    Registered Class...
  12.    Window Created...
  13.    
  14.    --- Initalizing OpenGL ---
  15.    Got DC...
  16.    Pixel Format 6 Chosen
  17.    Pixel Format Set...
  18.    OpenGL Rendering Context Created...
  19.    OpenGL Rendering Context Activated...
  20.    Finished
  21.    
  22.    Initiating Helios...
  23.    
  24.    --- System Info ---
  25.    Vendor: ATI Technologies Inc.
  26.    Renderer: RADEON 9700 x86/MMX/3DNow!/SSE
  27.    GLVersion: 1.5.4582 WinXP Release
  28.    
  29.    GLExtentions:
  30.    GL_ARB_multitexture GL_EXT_texture_env_add GL_EXT_compiled_vertex_array GL_S3_s3tc
  31.    GL_ARB_depth_texture GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader
  32.    GL_ARB_multisample GL_ARB_occlusion_query GL_ARB_point_parameters GL_ARB_shader_objects
  33.    GL_ARB_shading_language_100 GL_ARB_shadow GL_ARB_shadow_ambient GL_ARB_texture_border_clamp
  34.    GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine
  35.    GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat GL_ARB_transpose_matrix
  36.    GL_ARB_vertex_blend GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader
  37.    GL_ARB_window_pos GL_ATI_draw_buffers GL_ATI_element_array GL_ATI_envmap_bumpmap
  38.    GL_ATI_fragment_shader GL_ATI_map_object_buffer GL_ATI_separate_stencil GL_ATI_texture_env_combine3
  39.    GL_ATI_texture_float GL_ATI_texture_mirror_once GL_ATI_vertex_array_object GL_ATI_vertex_attrib_array_object
  40.    GL_ATI_vertex_streams GL_ATIX_texture_env_combine3 GL_ATIX_texture_env_route GL_ATIX_vertex_shader_output_point_size
  41.    GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_func_separate
  42.    GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_clip_volume_hint GL_EXT_draw_range_elements
  43.    GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_packed_pixels GL_EXT_point_parameters
  44.    GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs
  45.    GL_EXT_stencil_wrap GL_EXT_texgen_reflection GL_EXT_texture3D GL_EXT_texture_compression_s3tc
  46.    GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_combine GL_EXT_texture_env_dot3
  47.    GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod_bias GL_EXT_texture_mirror_clamp GL_EXT_texture_object
  48.    GL_EXT_texture_rectangle GL_EXT_vertex_array GL_EXT_vertex_shader GL_HP_occlusion_test
  49.    GL_NV_texgen_reflection GL_NV_blend_square GL_NV_occlusion_query GL_ARB_point_sprite
  50.    GL_SGI_color_matrix GL_SGIS_texture_edge_clamp GL_SGIS_texture_border_clamp GL_SGIS_texture_lod
  51.    GL_SGIS_generate_mipmap GL_SGIS_multitexture GL_SUN_multi_draw_arrays GL_WIN_swap_hint
  52.    WGL_EXT_extensions_string
  53.    WGL_EXT_swap_control
  54.  


P.S. : What's with the stencil-depth? Why do you try to get 24 Bits of stencil. Even modern cards support 8 Bits.

_________________
www.SaschaWillems.de | GitHub | Twitter | GPU Datenbanken (Vulkan, GL, GLES)


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mi Sep 29, 2004 00:29 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 21, 2004 22:39
Beiträge: 360
Wohnort: UK, Scotland
There was a bug in previous Launchers, i thought i copyed the new ver of the launcher over...

Code:
  1.  
  2. With FrmMain.HeliosSettings do
  3. begin
  4. Width := INIFile.ReadInteger('Display','Width',640);
  5. Height := INIFile.ReadInteger('Display','Height',480);
  6. PixelDepth := INIFile.ReadInteger('Display','PixelDepth',32);
  7. TextureDepth := INIFile.ReadInteger('Display','TextureDepth',24);
  8. StencilDepth := INIFile.ReadInteger('Display','StencilDepth',8);
  9. FullScreen := StrToBool(INIFile.ReadString('Display','FullScreen','-1'));
  10. end;
  11.  


When i copy n pasted the texture depth line(and renamed the texture to stencil), i never replaced the 24 with 8 but i soon found it...... tho it doens't do any harm. Stencil buffer currently is unused.

The access violation must b in the rendering bit..... Helios doesn't seem to like ATI.

EDIT: do u ever see a loading screen? Console(Internal)?
EDIT2: hmm, launcher still makes stencildepth 24 even tho its set to b defultly 8.....

_________________
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mi Sep 29, 2004 09:20 
Offline
DGL Member
Benutzeravatar

Registriert: Mo Sep 23, 2002 19:27
Beiträge: 5812
Programmiersprache: C++
No, I never see the loading screen. The last thing I get is the same as above, but not with the "cannot convert"-dialog, but with a typicall windows access violation dialog, and after I click that away, I can quit helios by pressing the quit-button.

But could you post the part of the code where you try to get your rendering context? That would make finding the fault easier. Do you manually get a RC, or do you use (if you use our header) CreateRenderingContext?

_________________
www.SaschaWillems.de | GitHub | Twitter | GPU Datenbanken (Vulkan, GL, GLES)


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mi Sep 29, 2004 12:47 
on dads pc currently(nicked it b4 he goes online). So you never see "Helios Launching" in the external console?


Nach oben
  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mi Sep 29, 2004 12:52 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Aug 28, 2002 19:27
Beiträge: 568
Wohnort: Chemnitz / Sachsen
i tried it to with a nvidia gf4 mx 440

i also got an va at 0x00000 ... the last thing the console shows is "Primärer Soundtreiber"
so there could also be a problem with the sound. i have to say that i havent installed my sounddriver right now (i formated yesterday) but then the system would say "no Sound". could there be the reason???

_________________
Aktuelles Projekt :
www.PicPlace.de


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mi Sep 29, 2004 13:27 
Offline
DGL Member
Benutzeravatar

Registriert: Mo Sep 23, 2002 19:27
Beiträge: 5812
Programmiersprache: C++
I'm sure it's got nothing to do with sound, as it stops at same place as it does for rswm. The last lines I can read are "Primärere Soundtreiber" (primary Sounddriver) and then the name of the driver. After that, I get the AV. I can click it away, then the window stays and I can click Quit or the other buttons.


Dateianhänge:
helios2.jpg
helios2.jpg [ 40.9 KiB | 8813-mal betrachtet ]

_________________
www.SaschaWillems.de | GitHub | Twitter | GPU Datenbanken (Vulkan, GL, GLES)
Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mi Sep 29, 2004 13:56 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 21, 2004 22:39
Beiträge: 360
Wohnort: UK, Scotland
The access violation is happening here:

Code:
  1.  
  2. glEnableClientState(GL_VERTEX_ARRAY);
  3.   if GetCvarB('Cg_MultiTexture') then begin
  4.     glClientActiveTexture(GL_TEXTURE1);
  5.     glEnableClientState(GL_TEXTURE_COORD_ARRAY);
  6.     glClientActiveTexture(GL_TEXTURE0);
  7.     glEnableClientState(GL_TEXTURE_COORD_ARRAY); // default = vertex, tex1+tex2, no color
  8.   end
  9.   else begin
  10.     glEnableClientState(GL_TEXTURE_COORD_ARRAY);
  11.   end;
  12.  


Im guessing for some odd reason(odd cos it works here) glEnableClientState and glClientActiveTexture arn't set right.

Iv just realised helios's implementation of Opengl is very wierd. Originaly i used Opengl.pas from Delphi 6, so i created a unit called GLstuff which contained:

Code:
  1.  
  2. Procedure SetupGLProcs;
  3. begin
  4.  
  5.   glMultiTexCoord1fARB := wglGetProcAddress('glMultiTexCoord1fARB');
  6.   glMultiTexCoord2fARB := wglGetProcAddress('glMultiTexCoord2fARB');
  7.   glMultiTexCoord3fARB := wglGetProcAddress('glMultiTexCoord3fARB');
  8.   glMultiTexCoord4fARB := wglGetProcAddress('glMultiTexCoord4fARB');
  9.   glActiveTextureARB := wglGetProcAddress('glActiveTextureARB');
  10.   glClientActiveTextureARB := wglGetProcAddress('glClientActiveTextureARB');
  11.  
  12.   glMultiTexCoord1f := wglGetProcAddress('glMultiTexCoord1f');
  13.   glMultiTexCoord2f := wglGetProcAddress('glMultiTexCoord2f');
  14.   glMultiTexCoord3f := wglGetProcAddress('glMultiTexCoord3f');
  15.   glMultiTexCoord4f := wglGetProcAddress('glMultiTexCoord4f');
  16.   glActiveTexture := wglGetProcAddress('glActiveTexture');
  17.   glClientActiveTexture := wglGetProcAddress('glClientActiveTexture');
  18.  
  19.   glVertexPointer := wglGetProcAddress('glVertexPointer');
  20.   glColorPointer := wglGetProcAddress('glColorPointer');
  21.   glDisableClientState := wglGetProcAddress('glDisableClientState');
  22.   glTexCoordPointer := wglGetProcAddress('glTexCoordPointer');
  23.   glDrawArrays := wglGetProcAddress('glDrawArrays');
  24.   glEnableClientState := wglGetProcAddress('glEnableClientState');
  25.   glDrawElements := wglGetProcAddress('glDrawElements');
  26.   glUnlockArraysEXT := wglGetProcAddress('glUnlockArraysEXT');
  27.   glLockArraysEXT := wglGetProcAddress('glLockArraysEXT');
  28.  
  29. end;
  30.  


It uses Opengl15(DelphiGL's v1.4 renamed) and glext(from delphi6). When glext is removed i get access violations where u get them. And without SetupGLProcs setting the procedures i also get a access violation (even tho ReadExtensions; is called when the opengl window is made which is b4 SetupGLProcs is called).

CreateWnd:
Code:
  1.  
  2. function glCreateWnd : Boolean;
  3. var
  4.   wndClass : TWndClass;         // Window class
  5.   dwStyle : DWORD;              // Window styles
  6.   dwExStyle : DWORD;            // Extended window styles
  7.   PixelFormat : GLuint;         // Settings for the OpenGL rendering
  8.   h_Instance : HINST;           // Current instance
  9.   pfd : TPIXELFORMATDESCRIPTOR;  // Settings for the OpenGL window
  10. begin
  11.   InitOpenGL;
  12.   SCREEN_WIDTH := HeliosSettings.Width;
  13.   SCREEN_HEIGHT := HeliosSettings.Height;
  14.  
  15.   AddToConsole('--- Creating Window ---');
  16.  
  17.   h_Instance := GetModuleHandle(nil);       //Grab An Instance For Our Window
  18.   ZeroMemory(@wndClass, SizeOf(wndClass));  // Clear the window class structure
  19.  
  20.   with wndClass do  begin                  // Set up the window class
  21.     style         := CS_HREDRAW or    // Redraws entire window if length changes
  22.                      CS_VREDRAW or    // Redraws entire window if height changes
  23.                      CS_OWNDC;        // Unique device context for the window
  24.     lpfnWndProc   := @WndProc;        // Set the window procedure to our func WndProc
  25.     hInstance     := h_Instance;
  26.     hCursor       := LoadCursor(0, IDC_ARROW);
  27.     hIcon         := LoadIcon(hInstance, 'MAINICON');
  28.     lpszClassName := 'OpenGL';
  29.   end;
  30.  
  31.   if (RegisterClass(wndClass) = 0) then  begin// Attemp to register the window class
  32.     AddToConsole('Failed to register the window class!');
  33.     Result := False;
  34.     Exit
  35.   end;
  36.  
  37.   AddToConsole('Registered Class...');
  38.  
  39.   //ChangeToFullScreen;
  40.  
  41.   // If we are still in fullscreen then
  42.   if (HeliosSettings.Fullscreen) then begin
  43.     dwStyle := WS_POPUP or                // Creates a popup window
  44.                WS_CLIPCHILDREN            // Doesn't draw within child windows
  45.                or WS_CLIPSIBLINGS;        // Doesn't draw within sibling windows
  46.     dwExStyle := 0;         // Top level window
  47.     //ShowCursor(false);                    // Turn of the cursor (gets in the way)
  48.   end
  49.   else begin
  50.        dwStyle := WS_OVERLAPPEDWINDOW or     // Creates an overlapping window
  51.                WS_CLIPCHILDREN or         // Doesn't draw within child windows
  52.                WS_CLIPSIBLINGS;           // Doesn't draw within sibling windows
  53.  
  54.     dwExStyle := WS_EX_APPWINDOW or       // Top level window
  55.                  WS_EX_WINDOWEDGE;        // Border with a raised edge
  56.     //ShowCursor(false);                    // Turn of the cursor (gets in the way)
  57.   end;
  58.  
  59.   // Attempt to create the actual window
  60.   h_Wnd := CreateWindowEx(dwExStyle,      // Extended window styles
  61.                           'OpenGL',       // Class name
  62.                           WND_TITLE,      // Window title (caption)
  63.                           dwStyle,        // Window styles
  64.                           0, 0,           // Window position
  65.                           HeliosSettings.Width, HeliosSettings.Height,  // Size of window
  66.                           0,              // No parent window
  67.                           0,              // No menu
  68.                           h_Instance,     // Instance
  69.                           nil);           // Pass nothing to WM_CREATE
  70.   if h_Wnd = 0 then begin
  71.     AddToConsole('Unable to create window!');
  72.     glKillWnd(False);                // Undo all the settings we've changed
  73.     Result := False;
  74.     Exit;
  75.   end;
  76.  
  77.   Loaded := True;
  78.  
  79.   AddToConsole('Window Created...');
  80.   AddToConsole('');
  81.   AddToConsole('--- Initalizing OpenGL ---');
  82.   // Try to get a device context
  83.   h_DC := GetDC(h_Wnd);
  84.   if (h_DC = 0) then begin
  85.     AddToConsole('Unable to get a device context!');
  86.     glKillWnd(False);
  87.     Result := False;
  88.     Exit;
  89.   end;
  90.  
  91.   AddToConsole('Got DC...');
  92.  
  93.   // Settings for the OpenGL window
  94.   with pfd do begin
  95.     nSize           := SizeOf(TPIXELFORMATDESCRIPTOR); // Size Of This Pixel Format Descriptor
  96.     nVersion        := 1;                    // The version of this data structure
  97.     dwFlags         := PFD_DRAW_TO_WINDOW    // Buffer supports drawing to window
  98.                        or PFD_SUPPORT_OPENGL // Buffer supports OpenGL drawing
  99.                        or PFD_DOUBLEBUFFER;  // Supports double buffering
  100.     iPixelType      := PFD_TYPE_RGBA;        // RGBA color format
  101.     cColorBits      := HeliosSettings.PixelDepth;           // OpenGL color depth
  102. //    cRedBits        := 0;                    // Number of red bitplanes
  103. //    cRedShift       := 0;                    // Shift count for red bitplanes
  104. //    cGreenBits      := 0;                    // Number of green bitplanes
  105. //    cGreenShift     := 0;                    // Shift count for green bitplanes
  106. //    cBlueBits       := 0;                    // Number of blue bitplanes
  107. //    cBlueShift      := 0;                    // Shift count for blue bitplanes
  108. //    cAlphaBits      := 0;                    // Not supported
  109. //    cAlphaShift     := 0;                    // Not supported
  110. //    cAccumBits      := 0;                    // No accumulation buffer
  111. //    cAccumRedBits   := 0;                    // Number of red bits in a-buffer
  112. //    cAccumGreenBits := 0;                    // Number of green bits in a-buffer
  113. //    cAccumBlueBits  := 0;                    // Number of blue bits in a-buffer
  114. //    cAccumAlphaBits := 0;                    // Number of alpha bits in a-buffer
  115.     cDepthBits      := HeliosSettings.TextureDepth;           // Specifies the depth of the depth buffer
  116.     cStencilBits    := HeliosSettings.StencilDepth ;                    // Turn off stencil buffer
  117. //    cAuxBuffers     := 0;                    // Not supported
  118.     iLayerType      := PFD_MAIN_PLANE;       // Ignored
  119. //    bReserved       := 0;                    // Number of overlay and underlay planes
  120. //    dwLayerMask     := 0;                    // Ignored
  121. //    dwVisibleMask   := 0;                    // Transparent color of underlay plane
  122. //    dwDamageMask    := 0;                     // Ignored
  123.   end;
  124.  
  125.   // Attempts to find the pixel format supported by a device context that is the best match to a given pixel format specification.
  126.   PixelFormat := ChoosePixelFormat(h_DC, @pfd);
  127.   if (PixelFormat = 0) then begin
  128.     AddToConsole('Unable to find a suitable pixel format');
  129.     glKillWnd(False);
  130.     Result := False;
  131.     Exit;
  132.   end;
  133.  
  134.   AddToConsole('Pixel Format ' + inttostr(PixelFormat) + ' Chosen');
  135.  
  136.   // Sets the specified device context's pixel format to the format specified by the PixelFormat.
  137.   if (not SetPixelFormat(h_DC, PixelFormat, @pfd)) then begin
  138.     AddToConsole('Unable to set the pixel format');
  139.     glKillWnd(False);
  140.     Result := False;
  141.     Exit;
  142.   end;
  143.  
  144.   AddToConsole('Pixel Format Set...');
  145.  
  146.   // Create a OpenGL rendering context
  147.   h_RC := wglCreateContext(h_DC);
  148.   if (h_RC = 0) then begin
  149.     AddToConsole('Unable to create an OpenGL rendering context');
  150.     glKillWnd(False);
  151.     Result := False;
  152.     Exit;
  153.   end;
  154.  
  155.   AddToConsole('OpenGL Rendering Context Created...');
  156.  
  157.   // Makes the specified OpenGL rendering context the calling thread's current rendering context
  158.   if (not wglMakeCurrent(h_DC, h_RC)) then begin
  159.     AddToConsole('Unable to activate OpenGL rendering context');
  160.     glKillWnd(False);
  161.     Result := False;
  162.     Exit;
  163.   end;
  164.   ActivateRenderingContext(h_DC, h_RC);
  165.  
  166.   AddToConsole('OpenGL Rendering Context Activated...');
  167.  
  168.   ReadExtensions;
  169.   ReadImplementationProperties;
  170.   CheckExtensions;
  171.   if GL_EXT_compiled_vertex_array then begin
  172.     LockingAvailable := true;
  173.  //   LockArrays := true;
  174.   end
  175.   else
  176.   LockArrays := False;
  177.   // Settings to ensure that the window is the topmost window
  178. {  ShowWindow(h_Wnd, SW_SHOW);
  179.   SetForegroundWindow(h_Wnd);
  180.   SetFocus(h_Wnd);   }
  181.  
  182.   // Ensure the OpenGL window is resized properly
  183.   glResizeWnd(HeliosSettings.Width, HeliosSettings.Height); // DOV !!!!!
  184.  
  185.   AddToConsole('Finished');
  186.   AddToConsole('');
  187.  
  188.   Result := True;
  189. end;
  190.  

_________________
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mi Sep 29, 2004 14:09 
Offline
DGL Member
Benutzeravatar

Registriert: Mo Sep 23, 2002 19:27
Beiträge: 5812
Programmiersprache: C++
Please don't mix our unit with another unit (even if that other unit only loads some extensions). Besides this, there was (some months ago) someone here on the forums with a similar problem. After going over the source, I found out that the window get's resized before OpenGL was initialized, and in that resize function, glViewport was called. But as GL wasn't initialized, glViewport ended up with an AV at adress 0/0, so it may be that it's the same problem as you have. So best thing to do : Define a boolean called IsOpenGLInitialized, set that to true after InitOpenGL is called and in the resize function, first look if IsOpenGLInitialized is true before calling an gl-functions. This way, it should work.
Besides that, I suggest you to use (see our header) CreateRenderingContext instead of getting the pixel format and RC by yourself. That function does all those things and is known to work.

_________________
www.SaschaWillems.de | GitHub | Twitter | GPU Datenbanken (Vulkan, GL, GLES)


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mi Sep 29, 2004 14:52 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 21, 2004 22:39
Beiträge: 360
Wohnort: UK, Scotland
I think the problem is because i never removed all the old code(once glext was compleatly wiped out, it ran fine here with just ur unit). Originaly i used Opengl + GlExt, and when i switched to ur unit i never removed the glext. GlExt is placed normaly after opengl15 in the uses list in most of helios's units, so glext would win all calls to gl stuff......... which sounds logical, glext hasn't been set, its calls are being called when they point to nothing........ what i don't get is why it worked fine on my pc.....

Zitat:
Besides this, there was (some months ago) someone here on the forums with a similar problem. After going over the source, I found out that the window get's resized before OpenGL was initialized


The window is shown after helios is initalized(never gets to the end of helios's initalization on ur pc) so i don't think it will cause any problems, also its resized after Opengl is initalized. (InitOpenGL is called at the top of createwnd)



** Stu prays to the Opengl gods **

- Helios Lite 3

_________________
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mi Sep 29, 2004 14:57 
Offline
DGL Member
Benutzeravatar

Registriert: Mo Sep 23, 2002 19:27
Beiträge: 5812
Programmiersprache: C++
Looks like your prayers have been heard at gl-valhalla ;) It now works. I'll test some maps and take a look on speed/rendering issues and give some feedback later.

_________________
www.SaschaWillems.de | GitHub | Twitter | GPU Datenbanken (Vulkan, GL, GLES)


Nach oben
 Profil  
Mit Zitat antworten  
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen Auf das Thema antworten  [ 31 Beiträge ]  Gehe zu Seite 1, 2, 3  Nächste
Foren-Übersicht » English » English Programming Forum


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 3 Gäste


Du darfst keine neuen Themen in diesem Forum erstellen.
Du darfst keine Antworten zu Themen in diesem Forum erstellen.
Du darfst deine Beiträge in diesem Forum nicht ändern.
Du darfst deine Beiträge in diesem Forum nicht löschen.
Du darfst keine Dateianhänge in diesem Forum erstellen.

Suche nach:
Gehe zu:  
  Powered by phpBB® Forum Software © phpBB Group
Deutsche Übersetzung durch phpBB.de
[ Time : 0.015s | 16 Queries | GZIP : On ]