View previous topic :: View next topic |
Author |
Message |
ParticlePeter
Joined: 19 Nov 2011 Posts: 49 Location: Germany
|
Posted: Sat Apr 07, 2012 1:36 pm Post subject: Found 2 Bugs in GL3 Functions |
|
|
Hi Aldacron,
glGetFragDataLocation currently returns void, but should return GLint ( the location actually )
glTransformFeedbackVaryings third argument is const(GLchar)* but should be const(GLchar)** or GLchar** _________________ Cheers, searching for the Pivot of my Soul, PP |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
|
Back to top |
|
|
ParticlePeter
Joined: 19 Nov 2011 Posts: 49 Location: Germany
|
Posted: Sun Apr 08, 2012 4:25 am Post subject: |
|
|
Thanks for fixing, my stuff works now.
I noticed one more thing which might not be worth a new topic as everything works fine. However, I get a GL_INVALID_ENUM error directly after DerelictGL3.reload(). I am using glfw and your code example from the DerelictGLFW3 Forum Thread. _________________ Cheers, searching for the Pivot of my Soul, PP |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
|
Back to top |
|
|
ParticlePeter
Joined: 19 Nov 2011 Posts: 49 Location: Germany
|
Posted: Mon Apr 09, 2012 2:59 am Post subject: |
|
|
O.K. so here is my code, I'm on Win 7 x64 with a GL 3.3 NVidia Driver. No GL_ERROR before DerelictGL3.reload() but streight after there is one 0x500.
Code: |
import std.conv ;
import std.stdio ;
import derelict.glfw3.glfw3 ;
import derelict.opengl3.gl3 ;
int main() {
DerelictGL3.load() ;
DerelictGLFW3.load() ;
if( !glfwInit() )
throw new Exception( "glfwInit failure: " ~ to!string( glfwErrorString( glfwGetError() ) ) ) ;
scope( exit ) glfwTerminate() ;
glfwOpenWindowHint( GLFW_OPENGL_VERSION_MAJOR , 3 ) ;
glfwOpenWindowHint( GLFW_OPENGL_VERSION_MINOR , 3 ) ;
glfwOpenWindowHint( GLFW_OPENGL_FORWARD_COMPAT , GL_TRUE ) ;
auto window = glfwOpenWindow( 640 , 480 , GLFW_WINDOWED , "Test" , null ) ;
if ( !window ) {
glfwTerminate() ;
throw new Exception( "Failed to create window." ) ;
}
// Get any GL Error so far, Before DerelictGL3.reload()
GLenum ErrorValue = glGetError() ;
while ( ErrorValue != GL_NO_ERROR ) {
writefln( "\nGL_ERROR %x : %s" , ErrorValue , "Before DerelictGL3.reload()\n" ) ;
ErrorValue = glGetError() ;
}
// Load OpenGL Forward Compatible Context
writeln( "Loaded GL Version : " , DerelictGL3.reload() ) ;
// Get any GL Error After DerelictGL3.reload()
ErrorValue = glGetError() ;
while ( ErrorValue != GL_NO_ERROR ) {
writefln( "\nGL_ERROR %x : %s" , ErrorValue , "After DerelictGL3.reload()\n" ) ;
ErrorValue = glGetError() ;
}
writefln( "OpenGL version : %s" , to!string( glGetString( GL_VERSION ) ) ) ;
writefln( "OpenGL renderer : %s" , to!string( glGetString( GL_RENDERER ) ) ) ;
writefln( "OpenGL vendor : %s" , to!string( glGetString( GL_VENDOR ) ) ) ;
bool running = true ;
while ( running ) {
glfwPollEvents() ;
running = glfwIsWindow( window ) && glfwGetKey( window , GLFW_KEY_ESCAPE ) != GLFW_PRESS ;
glfwSwapBuffers() ;
}
return 0 ;
}
|
_________________ Cheers, searching for the Pivot of my Soul, PP |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Tue Apr 10, 2012 12:27 am Post subject: |
|
|
Here's my output:
Code: |
Loaded GL Version : GL33
OpenGL version : 3.3.0
OpenGL renderer : GeForce 9600 GT/PCI/SSE2
OpenGL vendor : NVIDIA Corporation
|
Again, no error. And really, as best as I can tell, the only function called via reload that could even possibly set the GL error is glGetString. But I'm calling it with GL_VERSION, which is a valid enum. So... I have no idea what to tell you.
What prompted you to call glGetError at this point anyway? Does the app still work? _________________ The One With D | The One With Aldacron | D Bits |
|
Back to top |
|
|
ParticlePeter
Joined: 19 Nov 2011 Posts: 49 Location: Germany
|
Posted: Wed Apr 11, 2012 7:19 am Post subject: |
|
|
Hi Aldacron,
I got the gl error somewhere deep in my code when creating either a Shader or Array Buffer. I traced it upwards to exactly this spot, while realizing that this was just the first time I queried gl errors. Anyway, the application is working, and I can live with the error, might be that it is driver related. I have to use NVidia GeForce 285.62 as with any newer driver my Laptop Screen stays black, which is also pretty wired. _________________ Cheers, searching for the Pivot of my Soul, PP |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|