OpenGL: buffers... making me want to jump off a freaking bridge
Hey everyone,
I am trying to draw an image into the auxillary buffer so that I do not have to redraw it everytime it is displayed to the screen. The documentation in the RedBook says this should work. But, it doesn''t seem to be working.
Here is the portion of code i''m having troubles with:
void __fastcall TFormMain::DrawObjects()
{
// the portion in this if is only done once
if(init)
{
glLoadIdentity();
glDrawBuffer(GL_AUX1);
glTranslatef(320, 240, 0);
glTranslatef(-320, -240, 0);
DrawCsmMap("vms2d.csm", 0); // a draw function of my own
init = false;
}
glReadBuffer(GL_AUX1);
glDrawBuffer(GL_BACK);
glCopyPixels(0, 0, 640, 480, GL_COLOR);
}
I know i''m a rookie and this code my be funny to some of you. But if anybody could give me any insight, I would greatly appreciate it.
Mig
ZZZZZZZZZZZ... sleep is good
April 30, 2001 05:18 PM
If you call glGet with GL_AUX_BUFFERS do you get the number of auxiliary color buffers.
Hey thanks,
I called "glGetIntegerv(GL_AUX_BUFFERS, &i);", and i = 0. So I guess there are no auxilary buffers.
Next question (I bet you can guess what it is), how do I set up auxilary buffers (if possible)? I know I could probably find it if I dig, but if you could help me out I would really appreciate it.
One other thing, my "DrawObjects()" function should work the way I want it to right?
Thanks
Mig
I called "glGetIntegerv(GL_AUX_BUFFERS, &i);", and i = 0. So I guess there are no auxilary buffers.
Next question (I bet you can guess what it is), how do I set up auxilary buffers (if possible)? I know I could probably find it if I dig, but if you could help me out I would really appreciate it.
One other thing, my "DrawObjects()" function should work the way I want it to right?
Thanks
Mig
ZZZZZZZZZZZ... sleep is good
not 100% sure, but perhaps it is set up in the window creation - have a look at the pixelformat structure (where you set the stencil buffer, depth buffer, colour buffer size and so on.
HTH
~~~
Cheers!
Brett Porter
PortaLib3D : A portable 3D game/demo libary for OpenGL
HTH
~~~
Cheers!
Brett Porter
PortaLib3D : A portable 3D game/demo libary for OpenGL
~~~Cheers!Brett PorterPortaLib3D : A portable 3D game/demo libary for OpenGLCommunity Service Announcement: Read How to ask questions the smart way before posting!
Thanks a lot for the response! I''ll be trying to modify the pixelformat structure right away. And if that''s not it at least I know what direction to look in. Thanks.
Mig
Mig
ZZZZZZZZZZZ... sleep is good
Word of warning: Drawing to AUX buffers generally isn''t h/w accelerated with consumer OGL cards
Paul Groves
pauls opengl page
Paul Groves
pauls opengl page
Paul Grovespauls opengl page
Thanks Pauly. No offense but that just sucks! What use is the auxilary buffer anyway!
Also I just found out that auxilary buffers are not supported in the pixelformatdescriptor struct. Am I wrong on this? Do I have to go about doing this a different way (this refers to my first message in this thread)?
If anybody has any other methods of going about doing this please let me know. Because now that I think about it I would like to go about doing this a different way because even if I get the auxilary buffer to work it will be too slow.
Mig
Also I just found out that auxilary buffers are not supported in the pixelformatdescriptor struct. Am I wrong on this? Do I have to go about doing this a different way (this refers to my first message in this thread)?
If anybody has any other methods of going about doing this please let me know. Because now that I think about it I would like to go about doing this a different way because even if I get the auxilary buffer to work it will be too slow.
Mig
ZZZZZZZZZZZ... sleep is good
Modern Nvidia and ATI cards support pbuffers in their lastest drivers maybe you should try those...
Paul Groves
pauls opengl page
Paul Groves
pauls opengl page
Paul Grovespauls opengl page
Grrrrr!!! Thanks for the suggestion Pauly. But, unfortunately I have a 4Mb piece of crap video card, and the systems I am going to port my program to will be the same if not worse (getting new video cards aren''t an option eg. Modern Nvidia and ATI cards or even 1-2 years previous versions). The last system I ran the previous software on had some dumpload video card with 512kbytes of mem. Thats just ridiculous.
I guess my next question is... is it plausible to use OpenGL on such crappy video cards? And if it''s not how can I improve graphics from using Builder 5''s TCanvas? I appreciate any help on the subject.
P.S. I hate having to learn a new API (OpenGL) in a short amount of time with no support (as I load up the shotgun)<-jk.
Mig
I guess my next question is... is it plausible to use OpenGL on such crappy video cards? And if it''s not how can I improve graphics from using Builder 5''s TCanvas? I appreciate any help on the subject.
P.S. I hate having to learn a new API (OpenGL) in a short amount of time with no support (as I load up the shotgun)<-jk.
Mig
ZZZZZZZZZZZ... sleep is good
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement