[4.60.4] InitEngine3D problem [SOLVED]

Advanced game related topics
marc_256
Addict
Addict
Posts: 859
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

[4.60.4] InitEngine3D problem [SOLVED]

Post by marc_256 »

Hi,

Today I installed the new PB 4.60.4 version
My FPG software was running well under 4.60.3
now i get the error message:

Code: Select all

if InitEngine3D()
the error

[ERROR] - Illegal instruction (executing binary data ?)

What can this be ??
Do I have to uninstall 4.60.3 ?

Thanks,
Marc
Last edited by marc_256 on Mon Sep 19, 2011 6:54 pm, edited 1 time in total.
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
User avatar
Kuron
Addict
Addict
Posts: 1626
Joined: Sat Oct 17, 2009 10:51 pm
Location: Pacific Northwest

Re: [4.60.4] InitEngine3D problem

Post by Kuron »

I haven't touched any of the new betas, but I did read that 4.60.4 added the option of an OpenGL render for OGRE, do you now have to specify a subsystem to use?
marc_256
Addict
Addict
Posts: 859
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

Re: [4.60.4] InitEngine3D problem

Post by marc_256 »

Hi Kuron,
thanks for your reply, but still have problems...


Next test ...
Can someone test this for me with PB4.60.4 please.

THIS WORKS OK WITH PB 4.60.4

Code: Select all

 If InitSprite() = 0
    MessageRequester("Error", "Can't open screen & sprite enviroment!", 0)
    End
  EndIf
  
  If OpenWindow(0, 0, 0, 220, 160, "A screen in a window...", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    ButtonGadget(0, 170, 135, 45, 20, "Quit")

    If OpenWindowedScreen(WindowID(0), 0, 0, 160, 160, 0, 0, 0)
      CreateSprite(0, 20, 20)
      If StartDrawing(SpriteOutput(0))
        Box(0, 0, 20, 20, RGB(255, 0, 155))
        Box(5, 5, 10, 10, RGB(155, 0, 255))
        StopDrawing()
      EndIf
    Else
      MessageRequester("Error", "Can't open windowed screen!", 0)
      End
    EndIf
  EndIf
  
  direction = 2
  Repeat
    ; It's very important to process all the events remaining in the queue at each frame
    ;
    Repeat
      Event = WindowEvent()
      
      Select Event 
        Case #PB_Event_Gadget
          If EventGadget() = 0
            End
          EndIf
        
        Case #PB_Event_CloseWindow
          End 
      EndSelect
    Until Event = 0
  
    FlipBuffers() 
    ClearScreen(RGB(0, 0, 0))
    DisplaySprite(0, x, x)
    x + direction
    If x > 140 : direction = -2 : EndIf
    If x < 0   : direction =  2 : EndIf
    Delay(1)
  ForEver
WITH InitEngine3D(), I SEE NO WINDOWED SCREEN ??

Code: Select all


If InitEngine3D() = 0
    MessageRequester("Error", "Can't open Engine3D !", 0)
    End
EndIf
 
If InitSprite() = 0
    MessageRequester("Error", "Can't open screen & sprite enviroment !", 0)
    End
EndIf
  
  If OpenWindow(0, 0, 0, 220, 160, "A screen in a window...", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    ButtonGadget(0, 170, 135, 45, 20, "Quit")

    If OpenWindowedScreen(WindowID(0), 0, 0, 160, 160, 0, 0, 0)
      CreateSprite(0, 20, 20)
      If StartDrawing(SpriteOutput(0))
        Box(0, 0, 20, 20, RGB(255, 0, 155))
        Box(5, 5, 10, 10, RGB(155, 0, 255))
        StopDrawing()
      EndIf
    Else
      MessageRequester("Error", "Can't open windowed screen!", 0)
      End
    EndIf
  EndIf
  
  direction = 2
  Repeat
    ; It's very important to process all the events remaining in the queue at each frame
    ;
    Repeat
      Event = WindowEvent()
      
      Select Event 
        Case #PB_Event_Gadget
          If EventGadget() = 0
            End
          EndIf
        
        Case #PB_Event_CloseWindow
          End 
      EndSelect
    Until Event = 0
  
    FlipBuffers() 
    ClearScreen(RGB(0, 0, 0))
    DisplaySprite(0, x, x)
    x + direction
    If x > 140 : direction = -2 : EndIf
    If x < 0   : direction =  2 : EndIf
    Delay(1)
  ForEver
With PB4.60.3 it works ok ??

I use 'windows XP pro SP3'
AMD XP athlon (32bits)



Thanks
marc
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
User avatar
Comtois
Addict
Addict
Posts: 1432
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Re: [4.60.4] InitEngine3D problem

Post by Comtois »

Work fine, if i add a camera and RenderWorld()

Code: Select all

If InitEngine3D() = 0
    MessageRequester("Error", "Can't open Engine3D !", 0)
    End
EndIf

If InitSprite() = 0
    MessageRequester("Error", "Can't open screen & sprite enviroment !", 0)
    End
EndIf
 
  If OpenWindow(0, 0, 0, 220, 160, "A screen in a window...", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    ButtonGadget(0, 170, 135, 45, 20, "Quit")

    If OpenWindowedScreen(WindowID(0), 0, 0, 160, 160, 0, 0, 0)
      CreateSprite(0, 20, 20)
      If StartDrawing(SpriteOutput(0))
        Box(0, 0, 20, 20, RGB(255, 0, 155))
        Box(5, 5, 10, 10, RGB(155, 0, 255))
        StopDrawing()
      EndIf
    Else
      MessageRequester("Error", "Can't open windowed screen!", 0)
      End
    EndIf
  EndIf
  CreateCamera(0,0,0,100,100) 
  direction = 2
  Repeat
    ; It's very important to process all the events remaining in the queue at each frame
    ;
    Repeat
      Event = WindowEvent()
     
      Select Event
        Case #PB_Event_Gadget
          If EventGadget() = 0
            End
          EndIf
       
        Case #PB_Event_CloseWindow
          End
      EndSelect
    Until Event = 0
    RenderWorld()

    ClearScreen(RGB(0, 0, 0))
    DisplaySprite(0, x, x)
        FlipBuffers()
    x + direction
    If x > 140 : direction = -2 : EndIf
    If x < 0   : direction =  2 : EndIf
    Delay(1)
  ForEver
Please correct my english
http://purebasic.developpez.com/
marc_256
Addict
Addict
Posts: 859
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

Re: [4.60.4] InitEngine3D problem

Post by marc_256 »

Hi Comtois,

thanks for testing,
my question is why it works in 4.60.3 and not in 4.60.4
is there something changed between this versions ??

I do not even see a 'windowed screen' in the second test code.

Is this directX7 or directX9 ?

Marc,
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
User avatar
Comtois
Addict
Addict
Posts: 1432
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Re: [4.60.4] InitEngine3D problem

Post by Comtois »

marc_256 wrote:my question is why it works in 4.60.3 and not in 4.60.4
Well, your code dont work here with 4.60 beta3.

my question is why do you want using InitEngine3D without camera and RenderWorld ?
Please correct my english
http://purebasic.developpez.com/
marc_256
Addict
Addict
Posts: 859
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

Re: [4.60.4] InitEngine3D problem

Post by marc_256 »

my question is why do you want using InitEngine3D without camera and RenderWorld ?
Well, I'm making a 3D (walk through FPAG) game, it is a big software,
till now, more than a year of work. 8)

The first part is tested and works well with PB 4.60.3
if I load the game in PB4.60.4 I have the error 'see first post'.
and I'm testing now part by part to see what the problem is. :evil:
Hoping to find what's wrong in my soft ??

PS: FPAG = First Person Adventure Game

thanks,
marc
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
PMV
Enthusiast
Enthusiast
Posts: 727
Joined: Sat Feb 24, 2007 3:15 pm
Location: Germany

Re: [4.60.4] InitEngine3D problem

Post by PMV »

if it is crashing inside of InitEngine3D() look at the file ogre.log (and cegui.log) inside of your executable.
Per default, PB uses DirectX9 on windows.

And to answer the other question about OpenGL:
Since Beta 4, there is OpenGL subsystem added for Engine3D on windows.
So you can use OpenGL on all platforms for Engine3D.
marc_256
Addict
Addict
Posts: 859
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

Re: [4.60.4] InitEngine3D problem

Post by marc_256 »

PMV and Comtois,

thanks for the answers
I will look in my software ...

Marc,
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
User avatar
Kuron
Addict
Addict
Posts: 1626
Joined: Sat Oct 17, 2009 10:51 pm
Location: Pacific Northwest

Re: [4.60.4] InitEngine3D problem

Post by Kuron »

PMV wrote:Since Beta 4, there is OpenGL subsystem added for Engine3D on windows.
So you can use OpenGL on all platforms for Engine3D.
FWIW, Beta 4 on Windows when using the OpenGL subsystem for Engine3D, it will crash if it can't find the required DX9 runtimes.
Best wishes to the PB community. Thank you for the memories. ♥️
PMV
Enthusiast
Enthusiast
Posts: 727
Joined: Sat Feb 24, 2007 3:15 pm
Location: Germany

Re: [4.60.4] InitEngine3D problem

Post by PMV »

if it is .. then i is a bug ... i have always installed dx9, so i can not test that ... please make a bug-report :)
User avatar
Kuron
Addict
Addict
Posts: 1626
Joined: Sat Oct 17, 2009 10:51 pm
Location: Pacific Northwest

Re: [4.60.4] InitEngine3D problem

Post by Kuron »

PMV wrote:if it is .. then i is a bug ... i have always installed dx9, so i can not test that ... please make a bug-report :)
Hmm... I was figuring it was me screwing something up somehow as it has been a few years since I have really used PB. :lol: Bug report filed.
Best wishes to the PB community. Thank you for the memories. ♥️
marc_256
Addict
Addict
Posts: 859
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

Re: [4.60.4] InitEngine3D problem [SOLVED]

Post by marc_256 »

After more than 2 weeks of research I found the problem.
It was not a problem in my software (it was running well in PB4.60.1 ... .3)
There must be a huge difference between these two (PB4.60.3 and PB4.60.4)
in create exe file...

Marc,
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
Post Reply