JUCE OpenGL

Well, if it’s specific to that driver, I have no way of reproducing it on my machines… Got any clues?

Will wait till the next driver version. It crashes only when closing window during debug.

[quote=“jules”][quote]1. OpenGL log:
Capability GL_BLEND was enabled!
GL_TEXTURE_2D was enabled on texture unit GL_TEXTURE0.
GL_BLEND_SRC is not GL_SRC_ALPHA![/quote]

I don’t understand your question/point??
[/quote]

For example:
There are some lines of code in the JUCE OpenGL demo.

glEnable (GL_BLEND); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable (GL_TEXTURE_2D);
These lines are useless.

Every OpenGL context created in JUCE has already:

  1. GL_BLEND enabled!
  2. GL_TEXTURE_2D enabled on texture unit GL_TEXTURE0.
  3. GL_BLEND_SRC is not GL_SRC_ALPHA! (Maybe GL_ONE, GL_ONE_MINUS_SRC_ALPHA enabled in juce_OpenGLContext.cpp)

These GL states must be disabled to return OpenGL context to its initial state

Those lines are indeed useless, but they’re only in the demo class, and they’re not harmful.

As I’ve mentioned elsewhere, if I ever get some free time I want to replace the old + crappy GL demo with something more interesting and shader-based, and clean out all that fixed-function rubbish. (Eventually I’d also like to get rid of all the old fixed-function code from the library completely)

Did you ever go anywhere with nested OpenGL components? So a component running in an OpenGL renderer can draw in OpenGL using the Renderer’s context et al?

Bruce

[quote=“Bruce Wheaton”]Did you ever go anywhere with nested OpenGL components? So a component running in an OpenGL renderer can draw in OpenGL using the Renderer’s context et al?

Bruce[/quote]

No - haven’t had chance yet, sorry!

I was getting the same crash, and happened to be running the same NVIDIA driver version.  After updating to the latest version (327.23), the crash went away.