PDA

View Full Version : WGL_ARB_render_texture crash



davepermen
04-07-2002, 07:55 AM
i use the newest drivers from nvidia's homepage for xp/2k, i run 2k and i have a geforce2mx.
i downloaded the demo from nvidia (http://developer.nvidia.com/view.asp?IO=ogl_rtt) and it runs.
i have a lot of extensions and gl1.3.1 as you can see in my logfile: http://tyrannen.starcraft3d.net/logfile.html

i use, as nvidia does, the glh-headerfiles, namely glh/glh_extensions to initialise them.

as you can see, i can't initialise all my extensions cause i dont have code for all of them, but the ones i need are there. no error for them (you see the checks for the needed extensions after the full list..)

i create a pbuffer with the code of the demo from nvidia and i get no errors, so it is valid (how to check if the pbuffer is ok btw? there are some query-funcs i think..)

i create my texture. and guess what? no errors http://www.opengl.org/discussion_boards/ubb/wink.gif

i have only one problem: when i try to bind my pbuffer or release it from the texture, i get a crash. no error, but a simple plain application crash:



---------------------------
NVOpenGLPbuffer: Project 0001.exe - Fehler in Anwendung
---------------------------
Die Anweisung in "0x695ee9d0" verweist auf Speicher in "0x00000060". Der Vorgang

"read" konnte nicht auf dem Speicher durchgeführt werden.


Klicken Sie auf "OK", um das Programm zu beenden.
Klicken Sie auf "Abbrechen", um das Programm zu debuggen.
---------------------------
OK Abbrechen
---------------------------

(its in german, but i think you know it http://www.opengl.org/discussion_boards/ubb/wink.gif)

if you want to try it yourself. here: http://tyrannen.starcraft3d.net/Release.zip

and these are my two functions:




bool RenderTarget::BeginPaint() {
glBindTexture(GL_TEXTURE_2D,m_textureID);
// NEXT LINE CRASHES
wglReleaseTexImageARB(m_hpbuffer,WGL_FRONT_LEFT_AR B);

wglMakeCurrent(m_hdc,m_hglrc);
return true;
}

bool RenderTarget::FinishPaint() {
Acc<OpenGL> gl;
glFlush();
gl->MakeCurrent();
// THIS ONE CRASHES AS WELL
wglBindTexImageARB(m_hpbuffer,WGL_FRONT_LEFT_ARB);
return true;
}


now the big joke is. i can call these functions! if i call them with wglBindTexImageARB(0,0) this works well, at least, no crashes..

but there the crash occurs..

if you need the whole source to play around, i can send it.. i've uploaded the RenderTarget.cpp as well: http://tyrannen.starcraft3d.net/RenderTarget.cpp

and yes, i removed lot of the errorchecking from nvidia and re-arranged most of it, but i primary used nvidias code and got the same problem, nothing changed so far..
i'm working on this now since about 8 hours and i'm really tired of this bug..

davepermen
04-07-2002, 08:02 AM
interesting, not?
---------------------------
NVOpenGLPbuffer: Project 0001.exe - Fehler in Anwendung
---------------------------
Die Anweisung in "0x695ee9d0" verweist auf Speicher in "0x00000060". Der Vorgang

"read" konnte nicht auf dem Speicher durchgeführt werden.


Klicken Sie auf "OK", um das Programm zu beenden.
Klicken Sie auf "Abbrechen", um das Programm zu debuggen.
---------------------------
OK Abbrechen
---------------------------

have you looked at the titlebar?

NVOpenGLPbuffer: Project 0001.exe - Fehler in Anwendung
from where is the "NVOpenGLPbuffer: " ? thats not from me..

kieranatwork
04-07-2002, 08:18 AM
Rebuild all? http://www.opengl.org/discussion_boards/ubb/wink.gif

Humus
04-07-2002, 08:48 AM
Crashes on my Radeon 8500 too.

davepermen
04-07-2002, 10:08 AM
kieranatwork:
rebuilded tons of times, doesn't mather
humus:
well, doesn't look like a driver bug then..

gerogerber
04-11-2002, 12:07 AM
Could you send me the project? Then I'll try it on my system.

davepermen
04-11-2002, 12:09 AM
i'm rewriting the whole code currently so no chance for a working compilation http://www.opengl.org/discussion_boards/ubb/wink.gif

but you can try the executable (should be still online..)

Michael Steinberg
04-11-2002, 01:30 AM
Didnt know that dave was german http://www.opengl.org/discussion_boards/ubb/smile.gif

davepermen
04-11-2002, 02:22 AM
ich bin schweizer..

opla
04-11-2002, 05:07 AM
ich bin schweizer german speaking Switzerland ?

davepermen
04-11-2002, 05:28 AM
ich spreche deutsch
je parle francais
i speak english

natural language: schwizerdütsch (swiss german)

Michael Steinberg
04-11-2002, 05:30 AM
Nobody would have guessed that I'm german, but i really am!

Guten Tag!
Bonjour!
Hi! ( http://www.opengl.org/discussion_boards/ubb/smile.gif)

davepermen
04-11-2002, 05:41 AM
your name is STEINBERG.. now come on.. thats well known a german word at least.. so why not a german person? (stone-mountain == steinberg)

Michael Steinberg
04-11-2002, 05:47 AM
Damn, I couldnt take the piss out of you! http://www.opengl.org/discussion_boards/ubb/smile.gif
(thats how my dictionary translates verarschen...

Michael Steinberg
04-11-2002, 05:48 AM
I prefer the translation Stonehill btw http://www.opengl.org/discussion_boards/ubb/smile.gif

Did you notice that you're straying off the topic?

davepermen
04-11-2002, 05:56 AM
its my thread, so its my topic http://www.opengl.org/discussion_boards/ubb/wink.gif

you just did not helped yet very much thats annoying.. people like you always in those forums grmbl!

http://www.opengl.org/discussion_boards/ubb/smile.gif

PH
04-12-2002, 08:21 AM
I might have some good news for you Dave. I got the exact same error message ( though not in German http://www.opengl.org/discussion_boards/ubb/smile.gif ) and it was actually a crash elsewhere in my program. Strange that the crash was reported as "NVOpenGLPbuffer: ...". Try a debug build of your project and single step through it.

davepermen
04-12-2002, 08:44 AM
i got a good message, too.. i just rewrote the whole code and now it works http://www.opengl.org/discussion_boards/ubb/smile.gif

zeckensack
04-12-2002, 11:00 AM
Originally posted by davepermen:
i got a good message, too.. i just rewrote the whole code and now it works http://www.opengl.org/discussion_boards/ubb/smile.gif

So, what was the mistake? Do you have any useful hints regarding what not to do? http://www.opengl.org/discussion_boards/ubb/smile.gif

davepermen
04-12-2002, 11:24 AM
yes:
don't follow the papers/demos from nvidia

use the code from humus as a base

dunno where the bug was, but possibly wglShareLists was something helpful.. not sure about all those context-managing etc.. but humus approach works nice (nvidias, too, but not in my code http://www.opengl.org/discussion_boards/ubb/wink.gif)

davepermen
04-12-2002, 11:53 AM
http://tyrannen.starcraft3d.net/WorkingRenderTexture.zip

here is a working demo
from top left to bottom right:

a simple texture2d, created with some for-loop and rotating (Bruno asked a question about this.. here is the proof it works that simple http://www.opengl.org/discussion_boards/ubb/wink.gif)

next, no glTexture2D enabled => white (wow.. was a big topic! till i realised this http://www.opengl.org/discussion_boards/ubb/smile.gif)

my rendertexture2d got rendered and is presented on quad number 3. (its only rendered on 64x64 to see the texels)

a simple frustum with a cube with my texture in..

green background

and its yet nearly 64kb big.. i'm not a good demo-coder am i? http://www.opengl.org/discussion_boards/ubb/wink.gif
(and if you want, take a look at the big lovely logfile http://www.opengl.org/discussion_boards/ubb/wink.gif)

Old GLman
04-12-2002, 12:10 PM
Hey, that logfile was nice and juicy lol. But its not the size of the demo, its the colors! http://www.opengl.org/discussion_boards/ubb/smile.gif

zeckensack
04-12-2002, 01:46 PM
Heya, that's odd:

LogFile by davepermen

thanks to these web-resources { nehe.gamedev.net www.flipcode.com (http://www.flipcode.com) www.libsdl.org (http://www.libsdl.org) www.opengl.org (http://www.opengl.org) www.nvidia.com (http://www.nvidia.com) www.ati.com (http://www.ati.com) } in memories of { www.starcraft3d.net (http://www.starcraft3d.net) } great stuff { www.cfxweb.net/~projectfy/ (http://www.cfxweb.net/~projectfy/) www.nutty.org (http://www.nutty.org) http://esprit.campus.luth.se/~humus/ } Logging of the Program { MainSettings::Init(main.cfg) { OpenGL::Create(640,480,32,0) { SDL OpenGL initialized successfully OpenGL Version 1.2 is minimum requirement, but not supported } } Texture2D::create() { Texture ID: 1 } RenderTexture2D::create() {
And then it crashes, window borders are already there, client area is not. Invalid something in module <unknown>. What's particularly strange is the version thingy. Here's a quote from my own logs

> switched to 640x480 fs=0 style=0x14c00000
> desktop resolution is 1024x768 pixels, aspect ratio 1.333
> r_init
- GL driver: Radeon 7200 DDR x86/MMX/3DNow!/SSE
- version: 1.3.3031 Win9x Release
- stack depths (MODEL,PROJ,TEXTURE): 32, 10, 10
And yes, pbuffer and render_texture extensions are supported.

PS: Shhh, don't tell ATI about my driver version http://www.opengl.org/discussion_boards/ubb/wink.gif

davepermen
04-13-2002, 01:28 AM
the crash will not be in in the final engine for sure..

the problem is simple:
i initialise gl1.2 functions, and one or severall of them don't exist on the radeon, namely, i think, the paletted textures are not supported..

i'll drop this out sometimes to just load the extensions i need..

and.. even if you would have 1.2, it would crash afterwards cause it initialises some nvidia-only-extensions, namely vertexprogram,registercombiners and texturerectangles..

zeckensack
04-13-2002, 02:29 AM
Originally posted by davepermen:
the crash will not be in in the final engine for sure..

the problem is simple:
i initialise gl1.2 functions, and one or severall of them don't exist on the radeon, namely, i think, the paletted textures are not supported..

i'll drop this out sometimes to just load the extensions i need..

and.. even if you would have 1.2, it would crash afterwards cause it initialises some nvidia-only-extensions, namely vertexprogram,registercombiners and texturerectangles..

Ok, I can accept that. But it's still a bit strange that your program complains about missing GL1.2 support when I really have a GL1.3 driver, as you can see in my own log file. Don't you think?

davepermen
04-13-2002, 03:09 AM
ati left out some functions for gl1.2, thats the problem..
as i will not use paleted textures anyways, i'll drop them out http://www.opengl.org/discussion_boards/ubb/wink.gif so you'll get your 1.2 features back http://www.opengl.org/discussion_boards/ubb/smile.gif

davepermen
04-15-2002, 11:37 AM
ok.. well..

for who is this now working?
http://tyrannen.starcraft3d.net/Test.zip

it should look like this:
http://tyrannen.starcraft3d.net/realscreen.jpg

but my pc is the only one it worked yet

on the ati's i got a crash-report, on another geforce (geforce3 of BigB) i got a "green-rectangle with black borders" report..
what do you see? http://www.opengl.org/discussion_boards/ubb/wink.gif

Nutty
04-15-2002, 12:48 PM
I just get blue to green bordered rectangle.

zeckensack
04-15-2002, 07:29 PM
Originally posted by davepermen:
ati left out some functions for gl1.2, thats the problem..
as i will not use paleted textures anyways, i'll drop them out http://www.opengl.org/discussion_boards/ubb/wink.gif so you'll get your 1.2 features back http://www.opengl.org/discussion_boards/ubb/smile.gif
If you're talking about glColorTable et al, that's not strictly core functionality. It belongs to the imaging subset which is optional for implementations. NVIDIA (all caps!) have it, ATI don't, neither do they support EXT_paletted_texture.

Maybe you should take another look at how you do things, I wouldn't recommend using imaging subset stuff.

davepermen
04-15-2002, 09:05 PM
i dont use them. i just used the nvidia headers for initialising opengl1.2 and there they are.. i will remove everything i dont need for sure..

kon
04-16-2002, 09:07 AM
Grüezi Dave http://www.opengl.org/discussion_boards/ubb/wink.gif

Works on my PIII 600 GeForce1 DRR 28.32.
Rotating cube on the left and triangle on the right side. What kind of blurring are you computing for the triangle?

kon

davepermen
04-16-2002, 09:31 AM
grüäziwohl kon(rad?)

i'm using the same blurring technique as for the cube on the left.. is that enough info? http://www.opengl.org/discussion_boards/ubb/wink.gif

nope, i'm using the technique described by ati on theyr paper about how to get glow working..

(link can be found in the big thread about glow..)

kon
04-17-2002, 12:35 AM
Dave, do you render each texture in different sizes or are you using automatic mipmap generation with ext_texture_lod_bias to get different blurred versions of the texture?

kon

P.S.: How many persons do you know in Switzerland with the name Konrad? I give you a second chance!

kon
04-19-2002, 05:14 AM
Well, just made some tests with ext_texture_lod_bias to get different blurred versions of a texture. Cool and fast.

kon