My Frustration and the lack of debugging tools.

Started by Krux, June 28, 2013, 17:34:37

Previous topic - Next topic

Krux

Hi, I am mainly here because of my frustration of opengl. I've written a program that targets opengl 2.1 and works great on my intel card with mesa drivers. It works great there and since openGL should be compatible i thought it would also work great on other computers with better GPU system. But no it is not working at all. Everything that is rendered using the programmable pipeline does not draw anything on the screen at all. And I have absolutely no idea what the problem might be. And the even bigger problem is, I absolutely have no idea to find the problems of my program. I've tried a lot, but the result is just nothing. I tried several debugging tools and I hate all of them. gDebugger for example. It is a great idea and I already got it to work with a different program. But it just takes houres of work to find out all the java arguments to just run the program, and then the only result I get is random crashes of gDebugger. Nothing exept a lot of wasted time. I also tried different tools, but they are even worse to use. I just want to talk to my GPU and ask it "hey what's the matter, why do you hate me so much? Why do you refuse to execute my code?" But I can't. I whish I coul'd ...

mrgibson

I had similar problems when moving from NVIDIA to ATI cards, especially on OSX.

Are you using obsolete extensions? Like rectangle textures extension from Intel and stuff like that?

Just replace every GL_TRIANGLES* with GL_LINE_STRIP and disable texture mode. It will at least show some wireframes.

quew8

A problem with higher level OpenGL is that there is just so much that could go wrong. I know this sounds very annoying but I recommend starting a new program from scratch just trying to get a quad drawn on the screen (at least in LWJGL this is pretty quick). If this doesn't work then you know there is some flaw in your method, if it does then you can compare it against the rest of your code. Considering it is normally the absolute first few OpenGL calls where I make the mistakes and that you have already got this (exact same?) code to work on another computer, it is unlikely to be pointer strides / offsets or anything like this.

The other thing to be aware of is that OpenGL is only a specification. All vendors follow it but some are more relaxed than others. Once I put my nVidia tested program on an intel driven laptop and I had to completely rewrite the shader before it would work. Make sure your shaders are compiling properly. In fact just make sure you are checking the gl error (I know sounds basic but once you get something working you tend to remove most debugging code).