render in child (winapi&opengl)
how you read in the topic i want to render in a child window. but it doesn't work like i want. i call glClear, and after this, the window should be black, shouldn't it? but in my case, the window isn't black at all, there is also a region that has the default backgroundcolor, like the other windows. it seems like this region of the window isn't cleared (?).
here's a screen, maybe you now know better what i tried to explain.
http://www.cevi-buchsi.ch/screen.jpg
source:
http://www.cevi-buchsi.ch/main.cpp
thx 4 help & sry 4 my english
[edited by - SnuuT on August 26, 2002 6:55:56 AM]
Make sure you put CS_OWNDC in the window class flags (with CS_HREDRAW) not when you create your window.
Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
1. Your desktop colors are really ugly
2. Are you sure you use the right DC in wglCreateContext? It should be that of the child, the same goes for SetPixelFormat, wglMakeCurrent etc...
3. Are you using GL_SCISSOR_TEST ? Scissor affects glClear.
2. Are you sure you use the right DC in wglCreateContext? It should be that of the child, the same goes for SetPixelFormat, wglMakeCurrent etc...
3. Are you using GL_SCISSOR_TEST ? Scissor affects glClear.
so...i solved it with glScissor. it works, but now, i wan''t to know what i''ve to do that in the top left corner of the scissor has the coordinates (0, 0) and the bottom right corner has the coordinates (800, 600). with glViewport i didn''t get it running like i wan''t, is there any other possibility ?
btw: why''s my windows'' bgcolor green? i know it''s cause of glScissor but why is it? actually i don''t care, so it doesn''t matter...
btw: why''s my windows'' bgcolor green? i know it''s cause of glScissor but why is it? actually i don''t care, so it doesn''t matter...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement