[Résolu] Problème avec RenderWorld
[Résolu] Problème avec RenderWorld
Bonjour à tous, il y a pourtant un moment que j'utilise PB v5.21 LTS et pourtant, j'ai un problème avec la fonction RenderWorld(), elle m'envoie "Accès mémoire invalide à l'adresse x" où x est l'adresse invalide, je pense que ça vient surement de DirectX, mais quelqu'un peut-il me préconiser quelque chose, je ne l'en remercierait jamais assez !
Dernière modification par Micoute le dim. 05/janv./2014 10:26, modifié 1 fois.
Microsoft Windows 10 Famille 64 bits : Carte mère : ASRock 970 Extreme3 R2.0 : Carte Graphique NVIDIA GeForce RTX 3080 : Processeur AMD FX 6300 6 cœurs 12 threads 3,50 GHz PB 6.20 LTS (x64)
Un homme doit être poli, mais il doit aussi être libre !
Un homme doit être poli, mais il doit aussi être libre !
Re: Problème avec RenderWorld
As tu essayé en ajoutant opengl dans l’option du compilateur ?
@++
@++
Windows 10 x64, PureBasic 5.73 x86 & x64
GPU : radeon HD6370M, CPU : p6200 2.13Ghz
GPU : radeon HD6370M, CPU : p6200 2.13Ghz
Re: Problème avec RenderWorld
Je n'ai aucun problème avec OpenGL en 32 bits et ma version de DirectX est la 11.
Microsoft Windows 10 Famille 64 bits : Carte mère : ASRock 970 Extreme3 R2.0 : Carte Graphique NVIDIA GeForce RTX 3080 : Processeur AMD FX 6300 6 cœurs 12 threads 3,50 GHz PB 6.20 LTS (x64)
Un homme doit être poli, mais il doit aussi être libre !
Un homme doit être poli, mais il doit aussi être libre !
- falsam
- Messages : 7317
- Inscription : dim. 22/août/2010 15:24
- Localisation : IDF (Yvelines)
- Contact :
Re: Problème avec RenderWorld
Bonjour Micoute. Si tu es sous Windows 8, Peux tu activer la bibliothéque sous-system OpenGl dans les option de compilation ?
Pourrais tu aussi tester ce squelette de code 3D et nous dire aussi sous quel OS.
Pourrais tu aussi tester ce squelette de code 3D et nous dire aussi sous quel OS.
Code : Tout sélectionner
Enumeration
#Mainform
EndEnumeration
Define.l Event
Global WindowStyle.i=#PB_Window_MinimizeGadget|#PB_Window_MaximizeGadget|#PB_Window_ScreenCentered
Global WWIdth, WHeight
InitEngine3D()
InitKeyboard()
InitSprite()
InitMouse()
OpenWindow(#Mainform,0,0, 0, 0, "", #PB_Window_SystemMenu | #PB_Window_Maximize)
WWidth = WindowWidth(#Mainform, #PB_Window_InnerCoordinate)
WHeight = WindowHeight(#Mainform, #PB_Window_InnerCoordinate)
OpenWindowedScreen(WindowID(#Mainform),0,0,WWIdth,WHeight,0, 0, 0)
KeyboardMode(#PB_Keyboard_International)
;
;Lumiere et ombre
AmbientColor(RGB(127, 127, 127))
CreateLight(#PB_Any,RGB(151, 251, 151), -1.8, 10, 5)
WorldShadows(#PB_Shadow_Additive)
;
; Une camera
Camera = CreateCamera(#PB_Any,0,0,100,100)
CameraBackColor(Camera, RGB(145, 182, 201))
MoveCamera(Camera, 2, 5, 15, #PB_Absolute)
CameraLookAt(Camera, 0,0,0)
Repeat
Repeat
Event = WindowEvent()
Select Event
Case #PB_Event_CloseWindow
End
EndSelect
Until Event = 0
If ExamineKeyboard()
If KeyboardPushed (#PB_Key_Escape)
Break
EndIf
EndIf
; Affiche le rendu de la scène
ClearScreen(RGB(0, 0, 0))
RenderWorld(80)
FlipBuffers()
ForEver
Configuration : Windows 11 Famille 64-bit - PB 6.20 x64 - AMD Ryzen 7 - 16 GO RAM
Vidéo NVIDIA GeForce GTX 1650 Ti - Résolution 1920x1080 - Mise à l'échelle 125%
Vidéo NVIDIA GeForce GTX 1650 Ti - Résolution 1920x1080 - Mise à l'échelle 125%
Re: Problème avec RenderWorld
Bonsoir falsam et merci beaucoup.
En fait, j'ai une erreur à la ligne 56, Accès mémoire invalide.
En fait, j'ai une erreur à la ligne 56, Accès mémoire invalide.
Microsoft Windows 10 Famille 64 bits : Carte mère : ASRock 970 Extreme3 R2.0 : Carte Graphique NVIDIA GeForce RTX 3080 : Processeur AMD FX 6300 6 cœurs 12 threads 3,50 GHz PB 6.20 LTS (x64)
Un homme doit être poli, mais il doit aussi être libre !
Un homme doit être poli, mais il doit aussi être libre !
- falsam
- Messages : 7317
- Inscription : dim. 22/août/2010 15:24
- Localisation : IDF (Yvelines)
- Contact :
Re: Problème avec RenderWorld
Quel version de Windows ?Micoute a écrit :En fait, j'ai une erreur à la ligne 56, Accès mémoire invalide.
Configuration : Windows 11 Famille 64-bit - PB 6.20 x64 - AMD Ryzen 7 - 16 GO RAM
Vidéo NVIDIA GeForce GTX 1650 Ti - Résolution 1920x1080 - Mise à l'échelle 125%
Vidéo NVIDIA GeForce GTX 1650 Ti - Résolution 1920x1080 - Mise à l'échelle 125%
Re: Problème avec RenderWorld
Problème avec la 3D? , commencer par fournir le .log ( a activé dans initengine() ) avec un code minimal qui reproduit le problème.
Re: Problème avec RenderWorld
Version de Windows 7 Edition familiale Premium 64 bits
Processeurs AMD Athlon II x2 240 2,81 Ghz
Mémoire 4096 Go
DirectX 11
Carte graphique NVIDIA GeForce GT 610 3Go Ramdac intégrée
Processeurs AMD Athlon II x2 240 2,81 Ghz
Mémoire 4096 Go
DirectX 11
Carte graphique NVIDIA GeForce GT 610 3Go Ramdac intégrée
Microsoft Windows 10 Famille 64 bits : Carte mère : ASRock 970 Extreme3 R2.0 : Carte Graphique NVIDIA GeForce RTX 3080 : Processeur AMD FX 6300 6 cœurs 12 threads 3,50 GHz PB 6.20 LTS (x64)
Un homme doit être poli, mais il doit aussi être libre !
Un homme doit être poli, mais il doit aussi être libre !
- falsam
- Messages : 7317
- Inscription : dim. 22/août/2010 15:24
- Localisation : IDF (Yvelines)
- Contact :
Re: Problème avec RenderWorld
Le code minimal est celui que j'ai fourni avec l'erreur que signale Micoute à la ligne 56.G-Rom a écrit :avec un code minimal qui reproduit le problème.
Configuration : Windows 11 Famille 64-bit - PB 6.20 x64 - AMD Ryzen 7 - 16 GO RAM
Vidéo NVIDIA GeForce GTX 1650 Ti - Résolution 1920x1080 - Mise à l'échelle 125%
Vidéo NVIDIA GeForce GTX 1650 Ti - Résolution 1920x1080 - Mise à l'échelle 125%
Re: Problème avec RenderWorld
Ca ne donne pas son .logfalsam a écrit :Le code minimal est celui que j'ai fourni avec l'erreur que signale Micoute à la ligne 56.G-Rom a écrit :avec un code minimal qui reproduit le problème.

Re: Problème avec RenderWorld
Bonjour à tous et merci beaucoup, je voudrais bien envoyer mon *.log, mais hélas, il n'y en a pas et si j'enlève le debuggeur ça me dit "Purebasic_Compilation_0.exe a cessé de fonctionner"
Microsoft Windows 10 Famille 64 bits : Carte mère : ASRock 970 Extreme3 R2.0 : Carte Graphique NVIDIA GeForce RTX 3080 : Processeur AMD FX 6300 6 cœurs 12 threads 3,50 GHz PB 6.20 LTS (x64)
Un homme doit être poli, mais il doit aussi être libre !
Un homme doit être poli, mais il doit aussi être libre !
Re: Problème avec RenderWorld
Lis la doc d'initengine()
Re: Problème avec RenderWorld
Bonjour G-Rom et merci énormément, j'ai enfin réussi a sortir un fichier log que voici :
16:30:23: Creating resource group General
16:30:23: Creating resource group Internal
16:30:23: Creating resource group Autodetect
16:30:23: SceneManagerFactory for type 'DefaultSceneManager' registered.
16:30:23: Registering ResourceManager for type Material
16:30:23: Registering ResourceManager for type Mesh
16:30:23: Registering ResourceManager for type Skeleton
16:30:23: MovableObjectFactory for type 'ParticleSystem' registered.
16:30:23: OverlayElementFactory for type Panel registered.
16:30:23: OverlayElementFactory for type BorderPanel registered.
16:30:23: OverlayElementFactory for type TextArea registered.
16:30:23: Registering ResourceManager for type Font
16:30:23: ArchiveFactory for archive type FileSystem registered.
16:30:23: ArchiveFactory for archive type Zip registered.
16:30:23: ArchiveFactory for archive type EmbeddedZip registered.
16:30:23: DDS codec registering
16:30:23: FreeImage version: 3.10.0
16:30:23: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
16:30:23: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,koa,iff,lbm,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,dds,gif,g3,sgi,j2k,j2c,jp2
16:30:23: PVRTC codec registering
16:30:23: Registering ResourceManager for type HighLevelGpuProgram
16:30:23: Registering ResourceManager for type Compositor
16:30:23: MovableObjectFactory for type 'Entity' registered.
16:30:23: MovableObjectFactory for type 'Light' registered.
16:30:23: MovableObjectFactory for type 'BillboardSet' registered.
16:30:23: MovableObjectFactory for type 'ManualObject' registered.
16:30:23: MovableObjectFactory for type 'BillboardChain' registered.
16:30:23: MovableObjectFactory for type 'RibbonTrail' registered.
16:30:23: *-*-* OGRE Initialising
16:30:23: *-*-* Version 1.8.2 (Byatis)
16:30:23: D3D9 : Direct3D9 Rendering Subsystem created.
16:30:23: D3D9: Driver Detection Starts
16:30:23: D3D9: Driver Detection Ends
16:30:23: Particle Emitter Type 'Point' registered
16:30:23: Particle Emitter Type 'Box' registered
16:30:23: Particle Emitter Type 'Ellipsoid' registered
16:30:23: Particle Emitter Type 'Cylinder' registered
16:30:23: Particle Emitter Type 'Ring' registered
16:30:23: Particle Emitter Type 'HollowEllipsoid' registered
16:30:23: Particle Affector Type 'LinearForce' registered
16:30:23: Particle Affector Type 'ColourFader' registered
16:30:23: Particle Affector Type 'ColourFader2' registered
16:30:23: Particle Affector Type 'ColourImage' registered
16:30:23: Particle Affector Type 'ColourInterpolator' registered
16:30:23: Particle Affector Type 'Scaler' registered
16:30:23: Particle Affector Type 'Rotator' registered
16:30:23: Particle Affector Type 'DirectionRandomiser' registered
16:30:23: Particle Affector Type 'DeflectorPlane' registered
16:30:23: PCZone Factory Type 'ZoneType_Default' registered
16:30:23: CPU Identifier & Features
16:30:23: -------------------------
16:30:23: * CPU ID: AuthenticAMD: AMD Athlon(tm) II X2 240 Processor
16:30:23: * SSE: yes
16:30:23: * SSE2: yes
16:30:23: * SSE3: yes
16:30:23: * MMX: yes
16:30:23: * MMXEXT: yes
16:30:23: * 3DNOW: yes
16:30:23: * 3DNOWEXT: yes
16:30:23: * CMOV: yes
16:30:23: * TSC: yes
16:30:23: * FPU: yes
16:30:23: * PRO: yes
16:30:23: * HT: no
16:30:23: -------------------------
16:30:23: D3D9 : Subsystem Initialising
16:30:23: Registering ResourceManager for type Texture
16:30:23: Registering ResourceManager for type GpuProgram
16:30:23: ***************************************
16:30:23: *** D3D9 : Subsystem Initialised OK ***
16:30:23: ***************************************
16:30:23: SceneManagerFactory for type 'OctreeSceneManager' registered.
16:30:23: SceneManagerFactory for type 'BspSceneManager' registered.
16:30:23: Registering ResourceManager for type BspLevel
16:30:23: D3D9RenderSystem::_createRenderWindow "PureBasic Ogre", 1360x746 windowed miscParams: FSAA=0 displayFrequency=0 externalWindowHandle=1246332 vsync=true
16:30:23: D3D9 : Created D3D9 Rendering Window 'PureBasic Ogre' : 1360x746, 32bpp
16:30:23: D3D9: Vertex texture format supported - PF_A8R8G8B8
16:30:23: D3D9: Vertex texture format supported - PF_B8G8R8A8
16:30:23: D3D9: Vertex texture format supported - PF_FLOAT16_RGB
16:30:23: D3D9: Vertex texture format supported - PF_FLOAT16_RGBA
16:30:23: D3D9: Vertex texture format supported - PF_FLOAT32_RGB
16:30:23: D3D9: Vertex texture format supported - PF_FLOAT32_RGBA
16:30:23: D3D9: Vertex texture format supported - PF_R8G8B8A8
16:30:23: D3D9: Vertex texture format supported - PF_DEPTH
16:30:23: D3D9: Vertex texture format supported - PF_FLOAT16_R
16:30:23: D3D9: Vertex texture format supported - PF_FLOAT32_R
16:30:23: D3D9: Vertex texture format supported - PF_FLOAT16_GR
16:30:23: D3D9: Vertex texture format supported - PF_FLOAT32_GR
16:30:23: D3D9: Vertex texture format supported - PF_PVRTC_RGB2
16:30:23: D3D9: Vertex texture format supported - PF_PVRTC_RGBA2
16:30:23: D3D9: Vertex texture format supported - PF_PVRTC_RGB4
16:30:23: D3D9: Vertex texture format supported - PF_PVRTC_RGBA4
16:30:23: D3D9: Vertex texture format supported - PF_R8
16:30:23: D3D9: Vertex texture format supported - PF_RG8
16:30:23: RenderSystem capabilities
16:30:23: -------------------------
16:30:23: RenderSystem Name: Direct3D9 Rendering Subsystem
16:30:23: GPU Vendor: nvidia
16:30:23: Device Name: Monitor-1-NVIDIA GeForce GT 610
16:30:23: Driver Version: 9.18.13.3182
16:30:23: * Fixed function pipeline: yes
16:30:23: * Hardware generation of mipmaps: yes
16:30:23: * Texture blending: yes
16:30:23: * Anisotropic texture filtering: yes
16:30:23: * Dot product texture operation: yes
16:30:23: * Cube mapping: yes
16:30:23: * Hardware stencil buffer: yes
16:30:23: - Stencil depth: 8
16:30:23: - Two sided stencil support: yes
16:30:23: - Wrap stencil values: yes
16:30:23: * Hardware vertex / index buffers: yes
16:30:23: * Vertex programs: yes
16:30:23: * Number of floating-point constants for vertex programs: 256
16:30:23: * Number of integer constants for vertex programs: 16
16:30:23: * Number of boolean constants for vertex programs: 16
16:30:23: * Fragment programs: yes
16:30:23: * Number of floating-point constants for fragment programs: 224
16:30:23: * Number of integer constants for fragment programs: 16
16:30:23: * Number of boolean constants for fragment programs: 16
16:30:23: * Geometry programs: no
16:30:23: * Number of floating-point constants for geometry programs: 0
16:30:23: * Number of integer constants for geometry programs: 0
16:30:23: * Number of boolean constants for geometry programs: 0
16:30:23: * Supported Shader Profiles: hlsl ps_1_1 ps_1_2 ps_1_3 ps_1_4 ps_2_0 ps_2_a ps_2_b ps_2_x ps_3_0 vs_1_1 vs_2_0 vs_2_a vs_2_x vs_3_0
16:30:23: * Texture Compression: yes
16:30:23: - DXT: yes
16:30:23: - VTC: no
16:30:23: - PVRTC: no
16:30:23: * Scissor Rectangle: yes
16:30:23: * Hardware Occlusion Query: yes
16:30:23: * User clip planes: yes
16:30:23: * VET_UBYTE4 vertex element type: yes
16:30:23: * Infinite far plane projection: yes
16:30:23: * Hardware render-to-texture: yes
16:30:23: * Floating point textures: yes
16:30:23: * Non-power-of-two textures: yes
16:30:23: * Volume textures: yes
16:30:23: * Multiple Render Targets: 4
16:30:23: - With different bit depths: yes
16:30:23: * Point Sprites: yes
16:30:23: * Extended point parameters: yes
16:30:23: * Max Point Size: 8192
16:30:23: * Vertex texture fetch: yes
16:30:23: * Number of world matrices: 0
16:30:23: * Number of texture units: 8
16:30:23: * Stencil buffer depth: 8
16:30:23: * Number of vertex blend matrices: 0
16:30:23: - Max vertex textures: 4
16:30:23: - Vertex textures shared: no
16:30:23: * Render to Vertex Buffer : no
16:30:23: * DirectX per stage constants: yes
16:30:23: DefaultWorkQueue('Root') initialising on thread main.
16:30:23: Particle Renderer Type 'billboard' registered
Microsoft Windows 10 Famille 64 bits : Carte mère : ASRock 970 Extreme3 R2.0 : Carte Graphique NVIDIA GeForce RTX 3080 : Processeur AMD FX 6300 6 cœurs 12 threads 3,50 GHz PB 6.20 LTS (x64)
Un homme doit être poli, mais il doit aussi être libre !
Un homme doit être poli, mais il doit aussi être libre !
Re: Problème avec RenderWorld
tu as un plantage avec ce log ?
tu as d'autres code avec la 3D qui fonctionnent (les exemples par exemple) ?
Essaye de viré le clearscreen pour voir.
tu as d'autres code avec la 3D qui fonctionnent (les exemples par exemple) ?
Essaye de viré le clearscreen pour voir.
Re: Problème avec RenderWorld
Non, je n'ai aucun programme qui fonctionne, même pas ceux que falsam avait fait sur la naissance d'un cube et qui fonctionnaient avec la 5.20
Microsoft Windows 10 Famille 64 bits : Carte mère : ASRock 970 Extreme3 R2.0 : Carte Graphique NVIDIA GeForce RTX 3080 : Processeur AMD FX 6300 6 cœurs 12 threads 3,50 GHz PB 6.20 LTS (x64)
Un homme doit être poli, mais il doit aussi être libre !
Un homme doit être poli, mais il doit aussi être libre !