Pages: [1]
Author Topic: OpenGL ofVbo Windows Help  (Read 567 times)
vanderlin
Cambridge

Posts: 262

Gravatar


WWW
OpenGL ofVbo Windows Help
« on: November 11, 2011, 08:58:27 PM »

Hey Friends,
Windows is not my specialty at all, soo sorry in advance. I am trying to build a plugin, for OF on the windows side (thats then end goal). Right now just build my code on the pc, run amazing on any mac :). I have been running into issues with OpenGL calls.
Has anyone successfully built a vbo or used ofVbo on a pc? I have found a lot of posts online about GLEW and vbo etc. I am getting this issue with just the simplest call of glGenBuffers();

Unhandled exception at 0x00000000 in emptyExample_vs2010_debug.exe: 0xC0000005: Access violation.

I will get the same crash when trying to call ofEnableAlphaBlending(). Is there something im now doing, or missing. I have tried this on windows 7 and vista.

http://stackoverflow.com/questions/4317062/opengl-how-to-check-if-the-user-supports-glgenbuffers
http://www.gamedev.net/topic/604630-unhandled-exception-at-0x00000000-glgenbuffer/
http://stackoverflow.com/questions/7862041/access-violation-using-vbo-with-glew

any guidance, help would be magical :)
Logged
cherrychocolate

Posts: 5

Gravatar


Re: OpenGL ofVbo Windows Help
« Reply #1 on: November 25, 2011, 10:10:27 PM »

I think my problem is similar. I've been getting the same error trying to run a lot of the examples:

Code:
Unhandled exception at 0x00000000 in terrainExample_vs2010_debug.exe: 0xC0000005: Access violation reading location 0x00000000.

These are some of the lines where the debug breaks on:
Code:
glBlendEquation(GL_FUNC_ADD);

glActiveTexture(GL_TEXTURE0);

if (WGL_EXT_swap_control) wglSwapIntervalEXT (1);

glGenBuffers(1, &(vertId));

So I notice they all are functions with "gl" in the name, so it may be a problem with OpenGL?

Is anybody familiar with this?
Logged
joshua noble
Global Moderator
Seattle

Posts: 1012

Gravatar

Let's make better mistakes tomorrow.


WWW
Re: OpenGL ofVbo Windows Help
« Reply #2 on: November 26, 2011, 02:30:16 PM »


I'm not familiar with terrainExample, could you post some more of the code from it and also maybe some info about your graphics card and OS? That might help narrow some things down.
Logged

cherrychocolate

Posts: 5

Gravatar


Re: OpenGL ofVbo Windows Help
« Reply #3 on: November 28, 2011, 06:34:21 PM »

OS is Windows 7. Garphics card is a Radeon X1300 / X1550 Series

I've tried this in both Microsoft Visual C++ Express and in CodeBlocks, and the same examples break in both.

terrainExample was just one example. I'm getting the same error in a lot of the examples.

When running terrainExample, it breaks here:
Code:
void ofVbo::setVertexData(const float * vert0x, int numCoords, int total, int usage, int stride) {
if(vert0x == NULL) {
ofLog(OF_LOG_WARNING,"ofVbo: bad vertex data!\n");
return;
}
if(!bUsingVerts) {
bAllocated  = true;
bUsingVerts = true;
glGenBuffers(1, &(vertId));  //RIGHT HERE
retain(vertId);
}

...
}

When running graphicsExample, it breaks here:
Code:
void ofGLRenderer::setBlendMode(ofBlendMode blendMode){
switch (blendMode){

case OF_BLENDMODE_ALPHA:{
glEnable(GL_BLEND);
#ifndef TARGET_OPENGLES
glBlendEquation(GL_FUNC_ADD);   //RIGHT HERE
#endif
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
break;
}

...
}
}

graphicsExample won't break if I comment out a line in testApp::draw() that says "ofEnableAlphaBlending();"  but that's necessary for the transparency.


moviePlayerExample breaks here:

Code:
void ofTexture::draw(float x, float y, float z, float w, float h){

// make sure we are on unit 0 - we may change this when setting shader samplers
// before glEnable or else the shader gets confused
/// ps: maybe if bUsingArbTex is enabled we should use glActiveTextureARB?
glActiveTexture(GL_TEXTURE0);  // RIGHT HERE

...
}
Logged
tcfr33

Posts: 6

Gravatar


Re: OpenGL ofVbo Windows Help
« Reply #4 on: February 02, 2012, 07:31:30 PM »

Has anyone found a solution to this? I am trying to setup a windows dev environment and can't compile any examples with OpenGL. graphicsExample compiles fine. Things like moviePlayerExample and blendingExample get the Unhandled Exception error.

moviePlayerExample error:
Code:
void ofTexture::draw(float x, float y, float z, float w, float h){

// make sure we are on unit 0 - we may change this when setting shader samplers
// before glEnable or else the shader gets confused
/// ps: maybe if bUsingArbTex is enabled we should use glActiveTextureARB?
glActiveTexture(GL_TEXTURE0);  //<-- breaks here

// Enable texturing
glEnable(texData.textureTarget);


oF 007
Windows 7
Visual C++ 2010 Express
NVIDIA Quatro FX 1700
Logged
arturo
Administrator
barcelona

Posts: 2214

Gravatar


WWW
Re: OpenGL ofVbo Windows Help
« Reply #5 on: February 03, 2012, 12:58:43 PM »

when i've seen errors like this in linux, and what the links posted by vanderlin in the first post suggest is that your hardware doesn't support some feature and it crashes. usuually the problem is not with the hardware but with the correct driver not being installed.
Logged
Pages: [1]
 
Jump to:  

Powered by SMF 1.1.15 | SMF © 2011, Simple Machines

viagra priser