Skip to content
This repository has been archived by the owner on Dec 2, 2019. It is now read-only.

examples show nothing #299

Closed
sonoro1234 opened this issue Dec 11, 2016 · 18 comments
Closed

examples show nothing #299

sonoro1234 opened this issue Dec 11, 2016 · 18 comments

Comments

@sonoro1234
Copy link

Compiling examples with mingw-w64 (32 bits): Only canvas example shows anything, the other ones show empty canvas.

Any idea?

@sonoro1234
Copy link
Author

Ping?

@sonoro1234
Copy link
Author

Demo seems simpler so I try to get glError: it is 1282. Not very expresive but at least we know something went wrong!

@sonoro1234
Copy link
Author

first error 1282 after ctx = nk_glfw3_init(win, NK_GLFW3_INSTALL_CALLBACKS);

@sonoro1234
Copy link
Author

second error 1282 after nk_glfw3_render(NK_ANTI_ALIASING_ON, MAX_VERTEX_BUFFER, MAX_ELEMENT_BUFFER);

@vurtun
Copy link
Owner

vurtun commented Dec 26, 2016

Hi, you really have to provide me with more information, if you want me to help. Beginning from your title "examples show nothing". Well that is obviously not true because I can run it just fine, you specify more later that you are using mingw but not which OS you are using. Then what demos or backend are you compiling (sdl, glfw, ...) and which work and which don't and are you using OpenGL or DirectX? I now know that you are using OpenGL but some general information is always helpful. As for your OpenGL code it is not really helping since error codes are platform dependent. You need to provide me the actual error message or enum. One possibility is that nuklears shader did not compile and link correctly, so it would help if you could check if they work correctly.

@sonoro1234
Copy link
Author

sorry if I was not clear: I am just trying the demo from the repo in the glfw_opengl3 version and I am running on windows

@sonoro1234
Copy link
Author

glfw_opengl2 demo is working
glfw_opengl3 demo shows nothing, fails with error "invalid operation" I dont know how to check shader compilation

@lieff
Copy link
Contributor

lieff commented Jan 10, 2017

I assume you are using msys2. It's not really stable platform currently.
Probably glfw3\opengl implementations from msys have bugs or limitations, detailed debug is needed.
I'm almost sure it's not nuklear issue.

@lieff
Copy link
Contributor

lieff commented Jan 10, 2017

Also you can try update your msys packages using ssu package manager.

@sonoro1234
Copy link
Author

I dont use msys2 just mingw-w64 for 32 bits (4.8.2) and cmake build system.
I build glfw_opengl3 with debug flag and got assertion

Assertion failed!

Program: C:\luaGL\sources\nuklear-master\demo\glfw_opengl3\buildconcmake\demo.exe
File: C:\luaGL\sources\nuklear-master\demo\glfw_opengl3\nuklear_glfw_gl3.h, Line 128

Expression: status == GL_TRUE

@sonoro1234
Copy link
Author

sonoro1234 commented Jan 10, 2017

Just changing NK_SHADER_VERSION to empty string and GLFW_OPENGL_COMPAT_PROFILE did program succed

@sonoro1234
Copy link
Author

could see shader compile error

Vertex shader failed to compile with the following errors:
ERROR: 0:1: error(#106) Version number not supported by GL2
ERROR: error(#273) 1 compilation errors.  No code generated

@sonoro1234
Copy link
Author

#version 330\n

suceed in compilation

@sonoro1234
Copy link
Author

the same version 330 makes examples to work. canvas example was already working because it was defined as 150

@sonoro1234
Copy link
Author

Is there any conclusion?
Should version be changed?

@refi64
Copy link

refi64 commented Feb 23, 2017

Bump...

@dumblob
Copy link
Contributor

dumblob commented Feb 27, 2017

Could those of you having these issues meticulously exactly describe all steps (including every tiny bit of your movement or other activity) to reproduce these?

It should be totally fool-proof like: "On Windows 7 64bit with Service Pack 1:" "1. Press Win+r" "2. type cmd and press Enter" "3. type dir ... and press Enter" "4. type git.exe clone --depth=1 https://github.com/vurtun/nuklear" "5. ...".

@sonoro1234
Copy link
Author

sonoro1234 commented Feb 27, 2017

Initial facts:
On windows 7 64 bit Service pack 1, Graphics card: Radeon HD 7670M
with mingw64 for 32 bits compile demo/glfw_opengl3 and examples
execute
Only canvas example shows nuklear widgets, all the others appear as an empty window

My investigations:
this is solved (no more empty windows) by changing NK_SHADER_VERSION from "#version 300 es" to "#version 330"
also works setting NK_SHADER_VERSION to empty string and GLFW_OPENGL_COMPAT_PROFILE

@dumblob is this enough to reproduce?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants