It is currently Wed Jan 27, 2021 7:52 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Ogre3D - OpenGL - Sprite
PostPosted: Mon Mar 02, 2020 1:11 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2011 10:06 am
Posts: 885
Location: Denmark
EDIT: Missed CreateCamera, which was the reason for lack of sprites ...

Code:
;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

_________________
“Tell me and I forget. Teach me and I remember. Involve me and I learn.”
— Benjamin Franklin
Current configurations: Windows 10, Intel 6800K, GeForce Gtx 1060, 32 gb ram.


Last edited by DK_PETER on Thu Oct 22, 2020 1:29 am, edited 2 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Ogre3D - OpenGL - Sprite
PostPosted: Mon Mar 02, 2020 2:45 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu Dec 29, 2011 5:03 pm
Posts: 594
I get the same outcome.


Last edited by wombats on Mon Mar 02, 2020 3:32 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Ogre3D - OpenGL - Sprite
PostPosted: Mon Mar 02, 2020 3:12 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jun 11, 2006 12:07 am
Posts: 587
Location: Near Hamburg
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 5.73 x64, OS: Windows 7 Pro x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520, User age: 52y
"Happiness is a pet." | "Never run a changing system!"


Top
 Profile  
Reply with quote  
 Post subject: Re: Ogre3D - OpenGL - Sprite
PostPosted: Tue Oct 13, 2020 11:23 am 
Offline
Enthusiast
Enthusiast

Joined: Thu Jul 09, 2015 9:07 am
Posts: 128
it's important to fix this bug because the future versions of PB will integrate shaders that work everywhere only in opengl


Top
 Profile  
Reply with quote  
 Post subject: Re: Ogre3D - OpenGL - Sprite
PostPosted: Tue Oct 13, 2020 2:30 pm 
Offline
User
User

Joined: Sun Nov 16, 2008 12:47 am
Posts: 45
Location: Cayman Is.
Bug confirmed here for Windows 10, PB 5.72 x86 OpenGL

There is no bug in Windows 10, PB 5.72 x86 DirectX


Top
 Profile  
Reply with quote  
 Post subject: Re: Ogre3D - OpenGL - Sprite
PostPosted: Wed Oct 14, 2020 5:27 pm 
Offline
Enthusiast
Enthusiast

Joined: Fri Feb 24, 2012 10:19 am
Posts: 205
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Ogre3D - OpenGL - Sprite
PostPosted: Wed Oct 21, 2020 10:35 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu Jul 09, 2015 9:07 am
Posts: 128
with "CreateCamera" it works

Code:
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:
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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye