PDA

View Full Version : Error DDERR_INVALIDRECT while starting cad-app



tabor25
03-19-2002, 02:45 AM
Hello,

i am working on a cad-application looking like 3ds max using opengl. i use visual c++ 6.0; on startup, the mainframe creates 4 views (opengl-views derived from class cview) inside his oncreateclient-method. i use an object of the class csplitterwnd to position the views. The method onsize of the mainframe is called two times while doing the initialization-stuff. after the first time, onsize was called the debug-output-window shows

WGL Message:WGL: Update: MoveWindowBlt: DDERROR = DDERR_INVALIDRECT

WGL Message:WGL: UpdateDepth: MoveWindowBlt: DDERROR = DDERR_INVALIDRECT

exactly four times (i think for every view). After the second time the application starts and it is ready to work with. Has someone an idea how to solve this ?

Best regards

tabor25

Eric
03-19-2002, 04:10 AM
Not really OpenGL related.

Do you use static or dynamic splitters ?

AFAIK, MFC calls the OnSize member of a CView derived class twice when it is created (at least if you use an MDI Doc/View architecture).

The first call tells the view that its size is (1,1) and the second will give it its proper size.

Perhaps your app does not like the (1,1) and hence sends a debugging message...

Do you know where the message comes from ???
DDERR suggests a DirectDraw error but I never came accross such a thing in my programs...

Regards.

Eric

tabor25
03-20-2002, 03:03 AM
Originally posted by Eric:
Not really OpenGL related.

Do you use static or dynamic splitters ?

Do you know where the message comes from ???
DDERR suggests a DirectDraw error but I never came accross such a thing in my programs...

Regards.

Eric


Thank you for responding, Eric. to answer your question, i am using a static splitter. the only thing that will happen is that the debug-output window shows the error. in debug-mode i am also not able to find the exact line where it happens, because stepping through the code ends up into a "mfc-method-call hierarchy". I thought that "WGL" would have to do something with OpenGL. I wonder if "DD" means "direct draw", because at this time i am only using opengl for rendering the scene.

Best regards

tabor25

Eric
03-20-2002, 03:47 AM
I think you're right in assuming that WGL comes from OpenGL (the error must be output when issueing a wglXXX command). It's just that I have never seen such a message...

Now, DirectDraw may be used internally by Windows to copy/move parts of the screen.

Which OS and gfx card are you using ?

Regards.

Eric

tabor25
03-20-2002, 10:22 AM
Hello Eric,

i use w2000 with a geforce3 ti200 graphics-board and an amd athlon cpu with 900 mhz.

Maybe you can answer another question i have : after people in the discussion-forum told me to use vertex-arrays and displaylists, i reorganized my classes and structures so that every object has its own float-vertex-array lying inside a displaylist. now i render 10000 polygons at approximatly 30 fps. do you think this is a good result for my system ? What do you think, how fast can opengl run at different systems ?

best regards

tabor25

Eric
03-21-2002, 01:51 AM
tabor25,

I am not really expert in that field: I have no idea how many polygons you should be able to display with configuration X. That being said, you should find a lot of threads on that topic here (use the Search feature of the forum with "performance").

One note though: if you want people to answer that question, you should specify if you use lighting (how many), textures (which filtering modes) and other information like that... They all influence how many polygons you can display.

To be honest, I'd think that 10000 polygons at 30fps is not very good if they are not textured and you do not have lighting but as I said, I am no expert in that field !

Regards.

Eric