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

C / C++ / MFC

 
AnswerRe: access of disk and partition of disk Pin
Richard MacCutchan28-Jan-11 1:33
mveRichard MacCutchan28-Jan-11 1:33 
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 
Please, in the future read the posting guidelines before posting (for instance, use the pre tags to format your code properly so that it is readable).

Now to your question: OpenGL only handle images which have a power of 2 as dimensions. Loading images with non-standard dimensions will work on certain graphic cards but not all of them. So, the solution to your problem is to simply create your image as a 1024x1024 image (for instance, additional space is filled with white) and then when the image is used (using glTexCoord2) you only take the part where your image really is (for instance if your image is 768 pixels wide, you have to specify 768/1024=0.75 in your glTexCoord function).
Cédric Moonen
Software developer

Charting control [v3.0]
OpenGL game tutorial in C++

GeneralRe: How to load 768*576 image in opengl ? Pin
GAJERA28-Jan-11 17:12
GAJERA28-Jan-11 17:12 
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 

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.