Click here to Skip to main content
15,887,083 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: access of disk and partition of disk Pin
CPallini28-Jan-11 2:32
mveCPallini28-Jan-11 2:32 
QuestionHow Can I Get Pixel Color of a bitmap image? Pin
Amrit Agr27-Jan-11 22:46
Amrit Agr27-Jan-11 22:46 
QuestionRe: How Can I Get Pixel Color of a bitmap image? Pin
CPallini27-Jan-11 23:00
mveCPallini27-Jan-11 23:00 
AnswerRe: How Can I Get Pixel Color of a bitmap image? Pin
User 742933827-Jan-11 23:22
professionalUser 742933827-Jan-11 23:22 
AnswerRe: How Can I Get Pixel Color of a bitmap image? Pin
Code-o-mat28-Jan-11 3:47
Code-o-mat28-Jan-11 3:47 
QuestionHow to load 768*576 image in opengl ? Pin
GAJERA27-Jan-11 21:13
GAJERA27-Jan-11 21:13 
AnswerRe: How to load 768*576 image in opengl ? Pin
Cedric Moonen27-Jan-11 22:38
Cedric Moonen27-Jan-11 22:38 
GeneralRe: How to load 768*576 image in opengl ? Pin
GAJERA28-Jan-11 17:12
GAJERA28-Jan-11 17:12 
int iwidth=512;
int iHeight=512;

OK,Now i am create image 512*512 and give in glTexImage2D
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, iwidth,iHeight, 0, GL_RGB, GL_UNSIGNED_BYTE, data);



In Draw Function
glTexSubImage2D (GL_TEXTURE_2D, 0, 0, 0,768, 576, GL_RGB, GL_UNSIGNED_BYTE, data);


float fval=(float)(768.0f/512.0f);//.75f;
	if (TRUE)														// Is Background Visible?
	{
		// Reset The Modelview Matrix
		glBegin(GL_QUADS);										// Begin Drawing The Background (One Quad)
			// Front Face
			glTexCoord2f(fval, fval); 
			glVertex3f( 11.0f,  8.3f, -20.0f);
			glTexCoord2f(0.0f, fval);
			glVertex3f(-11.0f,  8.3f, -20.0f);
			glTexCoord2f(0.0f, 0.0f);
			glVertex3f(-11.0f, -8.3f, -20.0f);
			glTexCoord2f(fval, 0.0f);
			glVertex3f( 11.0f, -8.3f, -20.0f);
		glEnd();											// Done Drawing The Background
	}


I can not able to load image like above coding.

By the way,My view size if fix 512*512 and i want to support zoom also.
GeneralRe: How to load 768*576 image in opengl ? Pin
Cedric Moonen28-Jan-11 23:51
Cedric Moonen28-Jan-11 23:51 
QuestionHow to let the computer boot at some time? Pin
yu-jian27-Jan-11 15:43
yu-jian27-Jan-11 15:43 
GeneralRe: How to let the computer boot at some time? Pin
Cool_Dev27-Jan-11 17:25
Cool_Dev27-Jan-11 17:25 
GeneralRe: How to let the computer boot at some time? Pin
yu-jian27-Jan-11 19:57
yu-jian27-Jan-11 19:57 
AnswerRe: How to let the computer boot at some time? Pin
CPallini27-Jan-11 22:10
mveCPallini27-Jan-11 22:10 
GeneralRe: How to let the computer boot at some time? Pin
yu-jian28-Jan-11 1:55
yu-jian28-Jan-11 1:55 
QuestionChar To String & Then Array. Pin
Mike Certini27-Jan-11 12:51
Mike Certini27-Jan-11 12:51 
AnswerRe: Char To String & Then Array. Pin
Cool_Dev27-Jan-11 17:23
Cool_Dev27-Jan-11 17:23 
AnswerAnswer: Char To String & Then Array. Pin
Mike Certini27-Jan-11 17:36
Mike Certini27-Jan-11 17:36 
GeneralRe: Answer: Char To String & Then Array. Pin
Richard MacCutchan27-Jan-11 22:57
mveRichard MacCutchan27-Jan-11 22:57 
QuestionCreating .dll linked to Excel, add function error [modified] Pin
jharn27-Jan-11 9:10
jharn27-Jan-11 9:10 
AnswerRe: Creating .dll linked to Excel, add function error Pin
Richard MacCutchan27-Jan-11 10:14
mveRichard MacCutchan27-Jan-11 10:14 
GeneralRe: Creating .dll linked to Excel, add function error [modified] Pin
jharn27-Jan-11 11:10
jharn27-Jan-11 11:10 
GeneralRe: Creating .dll linked to Excel, add function error Pin
T210227-Jan-11 11:44
T210227-Jan-11 11:44 
GeneralRe: Creating .dll linked to Excel, add function error Pin
Richard MacCutchan27-Jan-11 22:43
mveRichard MacCutchan27-Jan-11 22:43 
QuestionHow to make child control handle accelerator command of parent CView? Pin
hatemtaleb27-Jan-11 3:32
hatemtaleb27-Jan-11 3:32 
AnswerRe: How to make child control handle accelerator command of parent CView? Pin
User 742933827-Jan-11 9:08
professionalUser 742933827-Jan-11 9:08 

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.