Click here to Skip to main content
15,917,329 members
Home / Discussions / Graphics
   

Graphics

 
QuestionColor managment Pin
Stevo Z9-Jul-07 7:12
Stevo Z9-Jul-07 7:12 
AnswerRe: Color managment Pin
IdUnknown10-Jul-07 6:09
IdUnknown10-Jul-07 6:09 
QuestionOpenGL directly on the desktop Pin
Ajko8-Jul-07 4:48
Ajko8-Jul-07 4:48 
AnswerRe: OpenGL directly on the desktop Pin
XTAL2569-Jul-07 2:02
XTAL2569-Jul-07 2:02 
QuestionOpen CAD drawing *.DWG without AutoCAD Pin
vivekbn6-Jul-07 5:58
vivekbn6-Jul-07 5:58 
AnswerRe: Open CAD drawing *.DWG without AutoCAD Pin
lost in transition 6-Jul-07 9:14
lost in transition 6-Jul-07 9:14 
AnswerRe: Open CAD drawing *.DWG without AutoCAD Pin
Drew Stainton17-Jul-07 19:47
Drew Stainton17-Jul-07 19:47 
QuestionCopy screen & render with OpenGL Pin
XTAL2566-Jul-07 3:05
XTAL2566-Jul-07 3:05 
Hi, i am writing an app that copies the screen, warps/distorts the image, then draws it back. I already got the code working in a visualization i am making for Windows Media Player but for some reason it won't work now.
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

enableBlend();
glColor4f(1.0f, 1.0f, 1.0f, 0.9f);
renderBackground(wf);     // Render warped background

enableTexture(image);
glBegin(GL_QUADS);        // Draw image over background
glTexCoord2f(0, 1);  glVertex2f(0, 0);
glTexCoord2f(0, 0);  glVertex2f(0, 512);
glTexCoord2f(1, 0);  glVertex2f(512, 512);
glTexCoord2f(1, 1);  glVertex2f(512, 0);
glEnd();
                      
glBindTexture(GL_TEXTURE_2D, backTexture);// Copy image to texture
glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, 512, 512, 0);

disableTexture();
disableBlend();

That's basically it, renderBackground() draws the texture over a grid of warp points which is stored in a WarpFile object. The enable/disable methods are just wrappers for the OpenGL commands. Is there anything i am doing wrong? I tried pbuffers do copy/render to but it was too hard.
If you need me to post more code (like the renderBackground method) just ask
thanks



--------------------------------
Customer in computer shop: "Can you copy the Internet onto this disk for me?"

AnswerAAAAAARGH!!! :( Pin
XTAL2569-Jul-07 2:21
XTAL2569-Jul-07 2:21 
GeneralRe: AAAAAARGH!!! :( Pin
Luc Pattyn9-Jul-07 4:05
sitebuilderLuc Pattyn9-Jul-07 4:05 
GeneralRe: AAAAAARGH!!! :( Pin
Christian Graus10-Jul-07 7:51
protectorChristian Graus10-Jul-07 7:51 
QuestionHow to change Hue of image??? Pin
SandipG 6-Jul-07 1:58
SandipG 6-Jul-07 1:58 
QuestionHighlighting a part of an Image Pin
Kavita Verma6-Jul-07 1:26
Kavita Verma6-Jul-07 1:26 
QuestionUnable to properly load PPM texture data Pin
Cyrilix3-Jul-07 15:39
Cyrilix3-Jul-07 15:39 
QuestionImage appears blurred some times?? Pin
SandipG 28-Jun-07 20:36
SandipG 28-Jun-07 20:36 
AnswerRe: Image appears blurred some times?? Pin
Christian Graus29-Jun-07 15:05
protectorChristian Graus29-Jun-07 15:05 
GeneralRe: Image appears blurred some times?? Pin
SandipG 1-Jul-07 18:55
SandipG 1-Jul-07 18:55 
QuestionAbout the GPU Gems 2 Pin
Tal Rasha's Guardianship27-Jun-07 17:17
Tal Rasha's Guardianship27-Jun-07 17:17 
AnswerRe: About the GPU Gems 2 Pin
Dave Kreskowiak29-Jun-07 13:05
mveDave Kreskowiak29-Jun-07 13:05 
AnswerRe: About the GPU Gems 2 Pin
El Corazon1-Jul-07 18:20
El Corazon1-Jul-07 18:20 
QuestionResolution of GDI+ bitmap from resource Pin
bozalina27-Jun-07 10:28
bozalina27-Jun-07 10:28 
AnswerRe: Resolution of GDI+ bitmap from resource Pin
Mark Salsbery27-Jun-07 15:11
Mark Salsbery27-Jun-07 15:11 
GeneralRe: Resolution of GDI+ bitmap from resource Pin
bozalina28-Jun-07 10:45
bozalina28-Jun-07 10:45 
GeneralRe: Resolution of GDI+ bitmap from resource Pin
Mark Salsbery28-Jun-07 13:04
Mark Salsbery28-Jun-07 13:04 
GeneralRe: Resolution of GDI+ bitmap from resource Pin
bozalina29-Jun-07 6:42
bozalina29-Jun-07 6:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.