Epihaius / panda3dstudio

A general-purpose scene editor for the Panda3D open-source game engine
BSD 3-Clause "New" or "Revised" License
54 stars 19 forks source link

raise Exception('Could not open window.') Exception: Could not open window. showing error while running main.py #12

Closed Harshharsh2275 closed 3 years ago

Harshharsh2275 commented 3 years ago

hi @Epihaius i wanted to try your studio as i am willing to help you in its further development but when i downloaded it to see it working i got this giant error: Traceback (most recent call last): File "main.py", line 55, in <module> App() File "main.py", line 40, in __init__ gui = GUI(mgr, verbose=True) File "C:\Users\harsh\Desktop\panda3d\panda3dstudio-1.1.0\src\gui\__init__.py", line 52, in __init__ showbase.open_default_window(props=wp, name="") File "C:\Users\harsh\AppData\Local\Programs\Python\Python36-32\lib\site-packages\direct\showbase\ShowBase.py", line 1020, in openDefaultWindow self.openMainWindow(*args, **kw) File "C:\Users\harsh\AppData\Local\Programs\Python\Python36-32\lib\site-packages\direct\showbase\ShowBase.py", line 1055, in openMainWindow self.openWindow(*args, **kw) File "C:\Users\harsh\AppData\Local\Programs\Python\Python36-32\lib\site-packages\direct\showbase\ShowBase.py", line 800, in openWindow raise Exception('Could not open window.') Exception: Could not open window.

so can you help this out

Epihaius commented 3 years ago

Hi,

Could you show me the contents of the p3ds.log file (in the panda3dstudio-1.1.0 directory), please? An error like this is usually the result of a problem with the graphics card or bad drivers.

And can you run any of the samples that come with the Panda3D SDK itself?

Harshharsh2275 commented 3 years ago

p3ds.log i think i don,t have appropriate drivers though its the log can tell me how to fix this? no, my panda samples are not working either thanks in advance!

Epihaius commented 3 years ago

Indeed, it looks like you will have to try and download the most recent drivers for your graphics card (probably either NVidia, ATI, or Intel):

Since my project makes use of GLSL shaders, it needs OpenGL drivers specifically, so switching to DirectX wouldn't really work.
Intel is known for bad support of OpenGL, so if you have a laptop with both an integrated Intel graphics chip and a dedicated graphics card (e.g. using NVidia Optimus), then make sure that the dedicated card is being used when running my project, not the chip.

Harshharsh2275 commented 3 years ago

Indeed, it looks like you will have to try and download the most recent drivers for your graphics card (probably either NVidia, ATI, or Intel):

Since my project makes use of GLSL shaders, it needs OpenGL drivers specifically, so switching to DirectX wouldn't really work.
Intel is known for bad support of OpenGL, so if you have a laptop with both an integrated Intel graphics chip and a dedicated graphics card (e.g. using NVidia Optimus), then make sure that the dedicated card is being used when running my project, not the chip.

Yes I have Intel working on my PC and I ran your project with DirectX it ran but showing white screen and graph like thing but I think I have a graphic card I think it's a 1gb card but don't know the company and also how to use it rather than using Intel graphic chip.if you can tell me it will be very helpfull

Epihaius commented 3 years ago

From Google:

On Windows 10, you can check your GPU information and usage details right from the Task Manager. Right-click the taskbar and select “Task Manager”. Click the “Performance” tab at the top of the window—if you don't see the tabs, click “More Info.” Select “GPU 0” in the sidebar.

That should tell you what graphics card(s) you have.

If you have further problems with this, you should search on Google or ask around on technical forums specialized in these matters. This issue tracker is specifically for issues with my project, I hope you understand.

Harshharsh2275 commented 3 years ago

From Google:

On Windows 10, you can check your GPU information and usage details right from the Task Manager. Right-click the taskbar and select “Task Manager”. Click the “Performance” tab at the top of the window—if you don't see the tabs, click “More Info.” Select “GPU 0” in the sidebar.

That should tell you what graphics card(s) you have.

If you have further problems with this, you should search on Google or ask around on technical forums specialized in these matters. This issue tracker is specifically for issues with my project, I hope you understand.

Thanks for your support but I understood the problem

Harshharsh2275 commented 3 years ago

@Epihaius I don't know why you used LUI and native panda3d components that use opengl highly as this doesn't support direct x and if you will use some other libraries for UI components then this editor could be used with direct x and even with the tiny render that come with Panda 3D and it will help any user to use studio And I am curious to know why don't you use other GUI libraries in python for design of studio as the scene viewer is also running in directx

Epihaius commented 3 years ago

As I said before, you need OpenGL because my project uses GLSL shaders, which do not work with DirectX or tinydisplay. Also, DirectX is not cross-platform, so I'm not interested in explicitly supporting it.

The GUI system I use is not LUI, it is a custom GUI system that I made from the ground up because existing libraries do not give me the customizability I want (and they can be a large dependency that I'd rather avoid).

If you want to use this project, you really will have to update your OpenGL drivers.

But thanks for bringing this up; I've updated the readme to include OpenGL 4.2 as a minimum requirement.