![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: May 2005
Posts: 6
Rep Power: 0
![]() |
MFC/OpenGL: 'CDocument' class problem
I have a question about using MFC classes alongside the OpenGL API :o)
I have been working on this project(MFC) for a few days. Past applications I have worked on were built using win32 programs. I need to start using MFC class wrappers because the group I'm working with refuses to use the raw win32 API ^^ Here are the specifications:
![]() The toolbar msg is handled by the CView class, which calls a function in the CDocument class. Just to get the processing going, I want to test this function by changing the background color. In other words, the draw logic for rendering 3d models will be in the CDocument class. My problem is - I can't seem to render shapes, let alone affect the client area of an SDI application using the CDocument class. ^^ Most of you guys, who are helping others here, seem quite 'geeky' as me. Can you provide me with some helpful ideas? thx in advance ^^ [edit] this has already been solved. Last edited by brenda; May 21st, 2005 at 4:44 AM. |
|
|
|
|
|
#2 |
|
Programmer
|
This may seem an obvious thing, but are you using UpdateAllViews() or UpdateView() on your document after it is modified? I've never used OGLView, but I know this can cause issues in MFC. I wonder how the guys on here will feel about you calling them "geeky".
kirkl_uk |
|
|
|
|
|
#3 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
I take it as a compliment, even though I've never used OpenGL before.
|
|
|
|
|
|
#4 |
|
Newbie
Join Date: May 2005
Posts: 6
Rep Power: 0
![]() |
I'm sorry kirkl_uk, my last post might have been misleading.
class OGLView was coded by me. It's part of the modular design. You know, so I can also use this class in other programs :o) [edit] this has already been solved. Last edited by brenda; May 20th, 2005 at 9:17 PM. |
|
|
|
|
|
#5 |
|
Newbie
Join Date: May 2005
Posts: 6
Rep Power: 0
![]() |
Admin, can you pull this short thread?
There's not much to see here. btw, the solution is: the object was rendered once. When the call was made to redraw the view, the object would get deleted DUH! All I had to do was render the object after matrix stack operations and redrawing the view. yowserz! |
|
|
|
|
|
#6 |
|
Professional Programmer
|
wow this girl is smart.
__________________
% rc4 hexkey < input > output
#define S ,t=s[i],s[i]=s[j],s[j]=t /* rc4 hexkey <file */
unsigned char k[256],s[256],i,j,t;main(c,v,e)char**v;{++v;while(++i)s[
i]=i;for(c=0;*(*v)++;k[c++]=e)sscanf((*v)++-1,"%2x",&e);while(j+=s[i]
+k[i%c]S,++i);for(j=0;c=~getchar();putchar(~c^s[t+=s[i]]))j+=s[++i]S;} |
|
|
|
|
|
#7 |
|
Programmer
|
lol. It sounds like you are impressed that there is such a thing as a smart girl.
kirkl_uk |
|
|
|
|
|
#8 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
There is? I never knew... wow... I'm gonna have to go rethink my philosophy on life now.
|
|
|
|
|
|
#9 | |
|
Professional Programmer
|
Quote:
![]()
__________________
% rc4 hexkey < input > output
#define S ,t=s[i],s[i]=s[j],s[j]=t /* rc4 hexkey <file */
unsigned char k[256],s[256],i,j,t;main(c,v,e)char**v;{++v;while(++i)s[
i]=i;for(c=0;*(*v)++;k[c++]=e)sscanf((*v)++-1,"%2x",&e);while(j+=s[i]
+k[i%c]S,++i);for(j=0;c=~getchar();putchar(~c^s[t+=s[i]]))j+=s[++i]S;} |
|
|
|
|
|
|
#10 |
|
Newbie
Join Date: May 2005
Posts: 6
Rep Power: 0
![]() |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|