OpenGL Not Rendering Models
#1 Members - Reputation: 114
Posted 31 October 2012 - 05:05 AM
I have an issue with an "engine" that I "wrote" , the problem is that the 3D models are not rendered (.obj) , and this only occurs on nVidia graphic cards ,I only tried on GT 220, and GT 430, I also tried running the application on an ATI video card and it has no problems, also the shaders are compiling correctly. The OpenGL context is actually initializing cause I can see the glClear color.
If you guys can help me with any information about his problem , or if you encountered this before please help.
Thank You!
#2 Members - Reputation: 4750
Posted 31 October 2012 - 06:03 AM
My game: Gnoblins
Developer journal about Gnoblins
Small goodies: Simple alpha transparency in deferred shader
#3 Members - Reputation: 114
Posted 31 October 2012 - 06:40 AM
[source lang="cpp"]glVertexAttribPointer ( 0, 3, GL_FLOAT, GL_FALSE, 0, (void*)0 );[/source]
which is the vertex attribute buffer. It just says "inavlid operation".
Edited by Bogdan.Vlad, 31 October 2012 - 06:42 AM.
#4 Members - Reputation: 4750
Posted 31 October 2012 - 08:02 AM
2. Check for errors before this call and after this call, because the error will refer to the last ocurred error, which could be produced by a previous ogl api call .
Edited by Ashaman73, 31 October 2012 - 08:03 AM.
#5 Members - Reputation: 114
Posted 31 October 2012 - 08:56 AM
[source lang="java"]CHECKOGLERRORS;glVertexAttribPointer( ... );CHECKOGLERRORS;[/source]
I am not sure what the last parameter should do and how I could change it because I think that's the problem.
Edited by Bogdan.Vlad, 31 October 2012 - 09:03 AM.
#6 Members - Reputation: 501
Posted 31 October 2012 - 09:59 AM
EDIT: Just though, also make sure that the layout of your shader program matches the order of the attribute arrays. Thus, attribute 0 must be a vec3 or other 3 float containing data type.
Edited by Zouflain, 31 October 2012 - 10:00 AM.
#7 Members - Reputation: 114
Posted 31 October 2012 - 10:07 AM
#8 Members - Reputation: 190
Posted 31 October 2012 - 11:41 AM
#9 Members - Reputation: 451
Posted 31 October 2012 - 12:24 PM
Koehler already told what functions to use and what to do, I just wanted to clear up what VAOs are around for
#11 Moderators - Reputation: 14300
Posted 01 November 2012 - 07:27 AM
Because the specification tells them to --I don't get why it was enforced
The default vertex array object (the name zero) is also deprecated.
Calling VertexAttribPointer when no vertex array object is bound will generate an INVALID OPERATION error.
ATI is wrongly bending the rules of the specification in this case, so they're the ones at fault, not nVidia.






