Click here to Skip to main content
15,900,378 members
Home / Discussions / Graphics
   

Graphics

 
GeneralRe: drawing algorithms Pin
El Corazon7-May-07 15:34
El Corazon7-May-07 15:34 
GeneralRe: drawing algorithms Pin
El Corazon7-May-07 16:20
El Corazon7-May-07 16:20 
GeneralRe: drawing algorithms Pin
sarah_malik8-May-07 0:55
sarah_malik8-May-07 0:55 
QuestionHow to code for flipping an image myself ? Pin
coolguynp5-May-07 8:44
coolguynp5-May-07 8:44 
AnswerRe: How to code for flipping an image myself ? Pin
Mark Salsbery5-May-07 9:10
Mark Salsbery5-May-07 9:10 
AnswerRe: How to code for flipping an image myself ? Pin
Hamid_RT22-May-07 2:52
Hamid_RT22-May-07 2:52 
AnswerRe: How to code for flipping an image myself ? Pin
stevepqr29-May-07 4:12
stevepqr29-May-07 4:12 
QuestionOpenGL problems Pin
XTAL2565-May-07 2:57
XTAL2565-May-07 2:57 
Hi, i am writing a small app for a WMP Visualization. The app can be downloaded here[^] and the viz can be found here[^].
Can someone please have a look at the code and tell me what's wrong. For starters, i want to render an image in the background then warp it and draw it back to the screen. There are some problems with that. I use RAD C++ for the GUI (http://www.radcpp.com).
Here is some of the code
//////////////////////////////////////////////////////////////////////////////
// Draws background, then copies the screen to texture
//////////////////////////////////////////////////////////////////////////////
void Graphics::copyToTexture(WarpFile &wf) {
    glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

    glColor4f(1.0f, 1.0f, 1.0f, 0.8f);
    renderBackground(wf);     // Render warped background
	glCallList(displayList[DL_TEX_ENABLE]);
	glBindTexture(GL_TEXTURE_2D, 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();
                              // Copy image to texture
	glBindTexture(GL_TEXTURE_2D, backTexture);
    glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, 512, 512, 0);
	glCallList(displayList[DL_TEX_DISABLE]);
	glBindTexture(GL_TEXTURE_2D,0);
    SwapBuffers(hdc);
}


It needs to be compiled with Dev-C++, you may need OpenGLUT.dll i forgot to include it in the zip file.
Can someone please help me

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

AnswerRe: OpenGL problems Pin
Rilhas19-May-07 10:59
Rilhas19-May-07 10:59 
GeneralRe: OpenGL problems Pin
XTAL25619-May-07 14:21
XTAL25619-May-07 14:21 
QuestionHElpppppppppppp Pin
HassanKU4-May-07 9:37
HassanKU4-May-07 9:37 
AnswerRe: HElpppppppppppp Pin
Mark Salsbery4-May-07 10:22
Mark Salsbery4-May-07 10:22 
Questionclueless Pin
Xraider Xenocide3-May-07 15:53
Xraider Xenocide3-May-07 15:53 
AnswerRe: clueless Pin
Christian Graus6-May-07 11:30
protectorChristian Graus6-May-07 11:30 
GeneralRe: clueless Pin
El Corazon7-May-07 5:36
El Corazon7-May-07 5:36 
AnswerRe: clueless Pin
Hamid_RT22-May-07 2:50
Hamid_RT22-May-07 2:50 
Questionhow to put a standard opengl in a windows form Pin
sinosoidal2-May-07 5:42
sinosoidal2-May-07 5:42 
AnswerRe: how to put a standard opengl in a windows form Pin
Jeff J Anderson6-May-07 22:32
Jeff J Anderson6-May-07 22:32 
Questionopen 2 window at the same time--->openGL???? Pin
Miss_ Petrovna1-May-07 8:50
Miss_ Petrovna1-May-07 8:50 
AnswerRe: open 2 window at the same time--->openGL???? Pin
El Corazon4-May-07 13:39
El Corazon4-May-07 13:39 
GeneralThank U..El Corazon Pin
Miss_ Petrovna5-May-07 5:57
Miss_ Petrovna5-May-07 5:57 
QuestionCapturing Network PC`s Desktop Pin
HassanKU1-May-07 5:55
HassanKU1-May-07 5:55 
AnswerRe: Capturing Network PC`s Desktop Pin
Mark Salsbery1-May-07 6:19
Mark Salsbery1-May-07 6:19 
GeneralRe: Capturing Network PC`s Desktop Pin
HassanKU1-May-07 7:04
HassanKU1-May-07 7:04 
GeneralRe: Capturing Network PC`s Desktop Pin
Mark Salsbery1-May-07 7:38
Mark Salsbery1-May-07 7:38 

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.