Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nvFxcc crash if card support Ogl 3.0 #1

Open
craouette opened this issue Jun 24, 2013 · 2 comments
Open

nvFxcc crash if card support Ogl 3.0 #1

craouette opened this issue Jun 24, 2013 · 2 comments

Comments

@craouette
Copy link

cause: glProgramParameteri is not set...
change (so that nvFxcc does not crash, and report an error) in GLSLProgram.cpp, line 73:

GLSLProgram::GLSLProgram(Container *pCont) : Program(pCont)
{
m_program = glCreateProgram();
m_linkNeeded = true;
m_usable = false;
//m_bound = false;
#ifdef USE_OLDPROGRAM
m_separable = false;
#else
if (pCont)
{
m_separable = pCont->separateShadersEnabled();
if(!glProgramParameteri)
{
LOGI("Warning : ARB_separate_shader_objects not available\n");
m_separable = false;
pCont->separateShadersEnable(false);
}
if(m_separable)
{
glProgramParameteri(m_program, GL_PROGRAM_SEPARABLE, m_separable);
if((glGetError()==GL_INVALID_ENUM)||(glGenProgramPipelines == NULL))
{
LOGI("Warning : ARB_separate_shader_objects not available\n");
m_separable = false;
pCont->separateShadersEnable(false);
}
}
}
#endif
m_shaderFlags = 0;

ifdef SHADERCONCAT_USE

m_vtxShader = 0;
m_fragShader = 0;

endif

}

@tlorach
Copy link
Owner

tlorach commented Jul 10, 2013

I think it comes from the fact I made by default context creation (wglCreateContextAttribsARB) request for 4.2 version
I should indeed set it to 3.0... in the meantime, you could try on your side.
See
WGL_CONTEXT_MAJOR_VERSION_ARB, 4,
WGL_CONTEXT_MINOR_VERSION_ARB, 2,
in nvFXcc.cpp

@craouette
Copy link
Author

Hi,

I will try this, thanks.

And I suppose if I compile nvFXcc
for OpenGL ES, it will work... but the switch between the OpenGl 4 and
OpenGl ES is only available a compile time.

Am I right?

That's mean
that the library, once compiled will only work for OpenGL 3 or 4 but not
both.

Thanks a lot for making nvFX. I hope I will find time to
contribute....

Pierre

On Wed, 10 Jul 2013 13:36:53 -0700, Tristan
Lorach wrote:

I think it comes from the fact I made by default
context creation (wglCreateContextAttribsARB) request for 4.2 version

I should indeed set it to 3.0... in the meantime, you could try on your
side.
See
WGL_CONTEXT_MAJOR_VERSION_ARB, 4,

WGL_CONTEXT_MINOR_VERSION_ARB, 2,
in nvFXcc.cpp

Reply to
this email directly or view it on GitHub [1].

Links:

[1]
#1 (comment)

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

No branches or pull requests

2 participants