Ogre3D - OpenGL - Sprite

All bugs related to the 3D engine
User avatar
DK_PETER
Addict
Addict
Posts: 898
Joined: Sat Feb 19, 2011 10:06 am
Location: Denmark
Contact:

Ogre3D - OpenGL - Sprite

Post by DK_PETER »

EDIT: Missed CreateCamera, which was the reason for lack of sprites ...

Code: Select all

;InitEngine3D()
InitSprite()
InitKeyboard()

OpenWindow(0,  0, 0, 300, 300, "OpenGL Sprite", #PB_Window_ScreenCentered|#PB_Window_SystemMenu)
OpenWindowedScreen(WindowID(0), 0, 0, 300, 300)
CreateCamera(0, 0, 0, 100, 100) ;<--- Duh!
CreateSprite(0, 50, 50, #PB_Sprite_AlphaBlending)
StartDrawing(SpriteOutput(0))
DrawingMode(#PB_2DDrawing_AlphaBlend)
Circle(25, 25, 20, $FF00FFFF)
StopDrawing()
Quit = #False

Repeat
  Repeat
    ev = WindowEvent()
    If ev = #PB_Event_CloseWindow : quit = #True : EndIf 
  Until  ev = 0
  RenderWorld()
  DisplaySprite(0, 0, 0)
  FlipBuffers()
  ExamineKeyboard()
 
Until  KeyboardPushed(#PB_Key_Escape) Or quit = #True
Last edited by DK_PETER on Thu Oct 22, 2020 1:29 am, edited 2 times in total.
Current configurations:
Ubuntu 20.04/64 bit - Window 10 64 bit
Intel 6800K, GeForce Gtx 1060, 32 gb ram.
Amd Ryzen 9 5950X, GeForce 3070, 128 gb ram.
wombats
Enthusiast
Enthusiast
Posts: 664
Joined: Thu Dec 29, 2011 5:03 pm

Re: Ogre3D - OpenGL - Sprite

Post by wombats »

I get the same outcome.
Last edited by wombats on Mon Mar 02, 2020 3:32 pm, edited 1 time in total.
User avatar
Kurzer
Enthusiast
Enthusiast
Posts: 666
Joined: Sun Jun 11, 2006 12:07 am
Location: Near Hamburg

Re: Ogre3D - OpenGL - Sprite

Post by Kurzer »

Bug confirmed for the following configuration:
Windows 7 x64, PB 5.72 b1 x64 OpenGL subsystem.

For me it is already sufficient to uncomment the first line: InitEngine3D(). Then the sprite is no longer displayed.
PB 6.02 x64, OS: Win 7 Pro x64 & Win 11 x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520, User age in 2024: 56y
"Happiness is a pet." | "Never run a changing system!"
User avatar
pf shadoko
Enthusiast
Enthusiast
Posts: 291
Joined: Thu Jul 09, 2015 9:07 am

Re: Ogre3D - OpenGL - Sprite

Post by pf shadoko »

it's important to fix this bug because the future versions of PB will integrate shaders that work everywhere only in opengl
Alex777
User
User
Posts: 47
Joined: Sun Nov 16, 2008 12:47 am
Location: Cayman Is.
Contact:

Re: Ogre3D - OpenGL - Sprite

Post by Alex777 »

Bug confirmed here for Windows 10, PB 5.72 x86 OpenGL

There is no bug in Windows 10, PB 5.72 x86 DirectX
Mesa
Enthusiast
Enthusiast
Posts: 349
Joined: Fri Feb 24, 2012 10:19 am

Re: Ogre3D - OpenGL - Sprite

Post by Mesa »

For debbuging:
With Windows XP32b + pb 572b2x86:
No bug with opengl :!:
But i've got a bug with directX+InitEngine3D()+RenderWorld() , the yellow thing is displayed but the screen flickers a lot.

M.
User avatar
pf shadoko
Enthusiast
Enthusiast
Posts: 291
Joined: Thu Jul 09, 2015 9:07 am

Re: Ogre3D - OpenGL - Sprite

Post by pf shadoko »

with "CreateCamera" it works

Code: Select all

InitEngine3D()
InitSprite()
InitKeyboard()

OpenWindow(0,  0, 0, 300, 300, "OpenGL Sprite", #PB_Window_ScreenCentered|#PB_Window_SystemMenu)
OpenWindowedScreen(WindowID(0), 0, 0, 300, 300)
CreateSprite(0, 50, 50, #PB_Sprite_AlphaBlending)
StartDrawing(SpriteOutput(0))
DrawingMode(#PB_2DDrawing_AlphaBlend)
Circle(25, 25, 20, $FF00FFFF)
StopDrawing()
CreateCamera(0, 0, 0, 100, 100)
 
Repeat
  Repeat
    ev = WindowEvent()
    If ev = #PB_Event_CloseWindow : quit = #True : EndIf
  Until  ev = 0
  RenderWorld()
  DisplaySprite(0, 0, 0)
  FlipBuffers()
  ExamineKeyboard()
 
Until  KeyboardPushed(#PB_Key_Escape) Or quit = #True
but with a screen the programme crash

Code: Select all

InitEngine3D()
InitSprite()
InitKeyboard()

OpenScreen(1280,720,32,"")
CreateSprite(0, 50, 50, #PB_Sprite_AlphaBlending)
StartDrawing(SpriteOutput(0))
DrawingMode(#PB_2DDrawing_AlphaBlend)
Circle(25, 25, 20, $FF00FFFF)
StopDrawing()
CreateCamera(0, 0, 0, 100, 100)
 
Repeat
  RenderWorld()
  DisplaySprite(0, 0, 0)
  FlipBuffers()
  ExamineKeyboard()
 
Until  KeyboardPushed(#PB_Key_Escape) Or quit = #True
"startdrawing la sortie est specifiée est null"

another clue:
a piece of the 3d scene is sometimes displayed in the sprite. there is obviously a memory corruption.

config : PB 5.72, Windows 10 Famille
Post Reply