Git Product home page Git Product logo

Comments (18)

SimonDanisch avatar SimonDanisch commented on June 17, 2024

That's weird. Can you try:

using GLFW, ModernGL
GLFW.Init()
GLFW.WindowHint(GLFW.CONTEXT_VERSION_MAJOR, 3)
GLFW.WindowHint(GLFW.CONTEXT_VERSION_MINOR, 3)
GLFW.WindowHint(GLFW.OPENGL_FORWARD_COMPAT, GL_TRUE)
GLFW.WindowHint(GLFW.OPENGL_PROFILE, GLFW.OPENGL_CORE_PROFILE)
window = GLFW.CreateWindow(10,10, "test")
GLFW.MakeContextCurrent(window)
println(bytestring(GLFW.GetVersionString()))
println(bytestring(glGetString(GL_VERSION)))
GLFW.ShowWindow(window)

from glvisualize.jl.

joa-quim avatar joa-quim commented on June 17, 2024

Ok, here it is

...
julia> window = GLFW.CreateWindow(10,10, "test")
GLFW.Window(Ptr{Void} @0x0000000000000000)

julia> println(bytestring(GLFW.GetVersionString()))
3.1.1 Win32 WGL MinGW DLL

julia> println(bytestring(glGetString(GL_VERSION)))
ERROR: ArgumentError: cannot convert NULL to string
 in bytestring at strings/basic.jl:17

julia> glGetString(GL_VERSION)
Ptr{UInt8} @0x0000000000000000

julia> GL_VERSION
0x00001f02

julia> GLFW.ShowWindow(window)

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x587e57e9 -- glfwShowWindow at  (unknown line)
glfwShowWindow at C:\j\.julia\v0.4\GLFW\deps\usr64\lib\glfw3.DLL (unknown line)
ShowWindow at C:\j\.julia\v0.4\GLFW\src\glfw3.jl:395
jlcall_ShowWindow_21473 at  (unknown line)

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on June 17, 2024
using GLFW, ModernGL
GLFW.Init()
window = GLFW.CreateWindow(10,10, "test")
GLFW.MakeContextCurrent(window)
println(bytestring(GLFW.GetVersionString()))
println(bytestring(glGetString(GL_VERSION)))
GLFW.ShowWindow(window)

Does this work?

from glvisualize.jl.

joa-quim avatar joa-quim commented on June 17, 2024

No. Same problem. That NULL pointer seams the root of the problem

julia> window = GLFW.CreateWindow(10,10, "test")
GLFW.Window(Ptr{Void} @0x0000000000000000)

also, I noticed that you install both 32 & 64 bits versions MinGW and VS glfw3.dll but its the MinGW one that is finally used. I replaced it by the VS dll but it made no difference.

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on June 17, 2024

yeah seems like it! You didn't forget GLFW.Init() by any chance? Would be really weird if it returns null in this scenario. Or are you in a virtual machine?

from glvisualize.jl.

joa-quim avatar joa-quim commented on June 17, 2024

Win 8.1, no virtual here

julia> using GLFW, ModernGL

julia> GLFW.Init()

julia> window = GLFW.CreateWindow(10,10, "test")
GLFW.Window(Ptr{Void} @0x0000000000000000)

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on June 17, 2024

Do you have really old graphic driver? :D
The only other thing I can think of to get more information out of this, is to try if this works:

using GLFW, ModernGL
GLFW.Init()
GLFW.WindowHint(GLFW.OPENGL_PROFILE, GLFW_OPENGL_ANY_PROFILE)
window = GLFW.CreateWindow(10,10, "test")
GLFW.MakeContextCurrent(window)
println(bytestring(GLFW.GetVersionString()))
println(bytestring(glGetString(GL_VERSION)))

from glvisualize.jl.

joa-quim avatar joa-quim commented on June 17, 2024

Something is showing up. The hardware is a 2014 MBP running Windows through Bootcamp, so graphic specs should be pretty 'decent'

julia> using GLFW, ModernGL

julia> GLFW.Init()

julia> GLFW.WindowHint(GLFW.OPENGL_PROFILE, GLFW_OPENGL_ANY_PROFILE)
ERROR: UndefVarError: GLFW_OPENGL_ANY_PROFILE not defined

julia> window = GLFW.CreateWindow(10,10, "test")
GLFW.Window(Ptr{Void} @0x0000000000000000)

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on June 17, 2024

Ugh, sorry, GLFW.OPENGL_ANY_PROFILE

from glvisualize.jl.

joa-quim avatar joa-quim commented on June 17, 2024

This?

julia> using GLFW, ModernGL

julia> GLFW.Init()

julia> GLFW.WindowHint(GLFW.OPENGL_PROFILE, GLFW.OPENGL_ANY_PROFILE)

julia> window = GLFW.CreateWindow(10,10, "test")
GLFW.Window(Ptr{Void} @0x0000000000000000)

julia> GLFW.MakeContextCurrent(window)

julia> println(bytestring(GLFW.GetVersionString()))
3.1.1 Win32 WGL VisualC DLL

julia> println(bytestring(glGetString(GL_VERSION)))
ERROR: ArgumentError: cannot convert NULL to string
 in bytestring at strings/basic.jl:17

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on June 17, 2024

Yeaah...
Sorry for poking around in the dark here.
Okay, last combination I can think of:

using ModernGL, GLFW
GLFW.Init()
GLFW.WindowHint(GLFW.CONTEXT_VERSION_MAJOR, 3)
GLFW.WindowHint(GLFW.CONTEXT_VERSION_MINOR, 2)
GLFW.WindowHint(GLFW.OPENGL_PROFILE, GLFW.OPENGL_CORE_PROFILE)
GLFW.WindowHint(GLFW.OPENGL_FORWARD_COMPAT, GL_TRUE)
window = GLFW.CreateWindow(10,10, "test")

If this doesn't work, you should make sure that you have the latest drivers installed... If you already have them, I'd be a little clueless. Since GLFW.Init() doesn't error, GLFW should be intact.

from glvisualize.jl.

joa-quim avatar joa-quim commented on June 17, 2024

Sorry, still no difference. I'll try to see about updating those drivers latter (not sure where to look yet). Have to go now.
Thanks for your attempts.

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on June 17, 2024

Thanks for your patience :)

from glvisualize.jl.

joa-quim avatar joa-quim commented on June 17, 2024

Simon, it works after updating my Nvidia drivers. Strange but that's how it is.

One last thing. What is the best channel if I want to bug you with help questions?

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on June 17, 2024

It's not that strange, just sad that they don't update more regularly and automaticaly.
I do answer emails, but feature requests, bug reports and needs for more documentation work best via issues, so others can find it as well and I can better keep track of the status.

from glvisualize.jl.

joa-quim avatar joa-quim commented on June 17, 2024

OK, thanks. I do have this WIP package https://github.com/joa-quim/GMT.jl that allows me to load or generate lots terrain models (for example) and would like to see how easy would be to display them with GLVisualize. I was already able to see something but it also raised me lots of questions on how to to it better.

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on June 17, 2024

Sounds cool :)
Yeah just open an issue, make pictures of the current state and your target and I can see what we can do! And best would be, if you supply me with working example code, so that I can play around with it.

from glvisualize.jl.

joa-quim avatar joa-quim commented on June 17, 2024

OK, I'll prepare an example case with code and some questions but have not much time right now.

from glvisualize.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.