Author Topic: OgreMagic for PureBasic  (Read 3033 times)

0 Members and 1 Guest are viewing this topic.

Offline Emil_halim

  • Atari ST
  • ***
  • Posts: 248
  • Karma: 21
    • View Profile
    • OgreMagic Library
OgreMagic for PureBasic
« on: August 26, 2007 »
Hi PureBasic users

Just want to tell that , OgreMagic is supporting PureBasic now. So you can easlly use OgreMagic Library with your favorite basic language.
 
Here is a small test programe.
Code: [Select]

;**********************************************
;
;
;  OgreMagic Library with PureBasic Test
;
;             By Emil Halim
;
;               22/8/2007
;
;**********************************************

XIncludeFile #PB_Compiler_Home + "Includes\Imports\Dx9.pbi"
XIncludeFile #PB_Compiler_Home + "Includes\Imports\OgreMagic.pbi"

Global D3DDevice.IDirect3DDevice9  
  
OpenWindow(1,0,0,640,480,"OgreMagic with PureBasic",#PB_Window_ScreenCentered|#PB_Window_SizeGadget|#PB_Window_MaximizeGadget )

SetWindowPos_(WindowID(1),#HWND_TOPMOST,0,0,0,0,#SWP_NOSIZE|#SWP_NOMOVE)
 
D3DDevice = D3D_OpenWindowedScreen(WindowID(1),640,480)

InitialMagicLibrary(D3DDevice,640,480)

If(ML_FileExist("MagicMedia.cfg"))
   ML_SetMediaDirectoryFromFile("MagicMedia.cfg")
Else
   ML_SetMediaDirectory("../OgreMagic/MagicMedia/")
EndIf

Tweety.l = ML_LoadStaticSprite("Tweety.bmp",0)
ML_SetSpriteColorKeyFromPoint(Tweety,0,0)

Repeat
  
  D3DDevice\Clear(0,0,#D3DCLEAR_TARGET,0,0,0)  
  D3DDevice\BeginScene()
  
  ML_UseOrthogonalView()
  ML_SetAlpha(1.0,#AllPoints)
  ML_SetColor(255,255,255,#AllPoints)
  ML_SetBlendMode(#ALPHABLEND)
  
  ML_SetSpriteTexture(ML_GetDefualtFont(),0)
  ML_SetColor(255,255,0,#AllPoints)
  ML_DrawString("Welcome To OgreMagic World",200,350)
  
  ML_SetSpriteTexture(Tweety,0)
  ML_DrawSprite(Tweety,320,240)
    
  ML_DrawLogo(0.8,75,60)
  
  ML_UsePerspectiveView()
  
  D3DDevice\EndScene()
  D3DDevice\Present(0,0,0,0)
  EventID = WindowEvent()
  
Until EventID = #PB_Event_CloseWindow  


D3D_Release(D3DDevice)
End


Offline energy

  • Amiga 1200
  • ****
  • Posts: 280
  • Karma: 25
    • View Profile
Re: OgreMagic for PureBasic
« Reply #1 on: August 26, 2007 »
Hi Emil...
Thank yu for Ogre Magic....    :goodpost:
Will test it!!!
Best regards....
coding: jwasm,masm
hobby: www.scd2003.de

Offline va!n

  • Pentium
  • *****
  • Posts: 1398
  • Karma: 108
    • View Profile
    • http://www.secretly.de
Re: OgreMagic for PureBasic
« Reply #2 on: August 26, 2007 »
@Emil_halim:
Have never heared of this 3D engine... any link or files where ppl can download it? Is the engine an opensource project or done by yourself? thx
- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
Challenge Trophies Won:

Offline Emil_halim

  • Atari ST
  • ***
  • Posts: 248
  • Karma: 21
    • View Profile
    • OgreMagic Library
Re: OgreMagic for PureBasic
« Reply #3 on: August 26, 2007 »

Oh , sorry , Here is the link.

http://www.freewebs.com/ogremagic/index.htm

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17378
  • Karma: 497
  • evil/good
    • View Profile
    • My Homepage
Re: OgreMagic for PureBasic
« Reply #4 on: August 26, 2007 »
Have some Karma Emil, you are very kind to port your engine for the PB users :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Emil_halim

  • Atari ST
  • ***
  • Posts: 248
  • Karma: 21
    • View Profile
    • OgreMagic Library
Re: OgreMagic for PureBasic
« Reply #5 on: August 26, 2007 »
thanks shocky for your karma .  :)

Hope to port it to BlitzMax too.

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17378
  • Karma: 497
  • evil/good
    • View Profile
    • My Homepage
Re: OgreMagic for PureBasic
« Reply #6 on: April 23, 2011 »
Happy birthday Emil :)

I hope you have your topic notifications on and get this message.
Shockwave ^ Codigos
Challenge Trophies Won: