Click here to Skip to main content
15,914,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to set the default font name when I call ChooseFont(..) ? Pin
wangningyu4-Sep-10 4:39
wangningyu4-Sep-10 4:39 
AnswerRe: How to set the default font name when I call ChooseFont(..) ? Pin
Luc Pattyn4-Sep-10 5:46
sitebuilderLuc Pattyn4-Sep-10 5:46 
GeneralRe: How to set the default font name when I call ChooseFont(..) ? Pin
wangningyu4-Sep-10 5:55
wangningyu4-Sep-10 5:55 
GeneralRe: How to set the default font name when I call ChooseFont(..) ? Pin
Luc Pattyn4-Sep-10 6:04
sitebuilderLuc Pattyn4-Sep-10 6:04 
QuestionBinary file problem Pin
ganesh_IT3-Sep-10 19:38
ganesh_IT3-Sep-10 19:38 
AnswerRe: Binary file problem Pin
Niklas L3-Sep-10 21:20
Niklas L3-Sep-10 21:20 
AnswerRe: Binary file problem Pin
Dave Kerr3-Sep-10 23:08
mentorDave Kerr3-Sep-10 23:08 
Question[Solved] Object render order for proper depth (OpenGL) [modified] Pin
SilentDude56k3-Sep-10 11:09
SilentDude56k3-Sep-10 11:09 
I wrote a program that renders up to 200 characters that move across the screen at an 8 o'clock heading, isometric game style. I randomize each character's x and y coordinates and speed prior to rendering, which are rendered onto transparent quads. Since every object's z coordinate value is the same, the object rendered last is considered to have the least depth (e.g. it is rendered on top of everything else).

Now for my question: How should I go about ordering each object so that the ones with a greater y value are rendered after objects with a lesser y value? My rendering code currently runs through an array of the characters from 0-199 and resets, which causes some visually obvious depth problems.

To illustrate:

<br />
character[0].y = 1000;<br />
character[1].y = 1200;<br />
character[2].y = 200;<br />


They should be rendered in this order: character 2 -> character 0 -> character 1. I'm not sure how I can order them this way though.

Thanks for any help and ideas Smile | :)

Edit: Added example

modified on Saturday, September 4, 2010 2:15 AM

AnswerRe: Object render order for proper depth (OpenGL) Pin
Dave Calkins3-Sep-10 11:19
Dave Calkins3-Sep-10 11:19 
GeneralRe: Object render order for proper depth (OpenGL) Pin
SilentDude56k3-Sep-10 11:29
SilentDude56k3-Sep-10 11:29 
GeneralRe: Object render order for proper depth (OpenGL) Pin
Dave Calkins3-Sep-10 14:03
Dave Calkins3-Sep-10 14:03 
GeneralRe: Object render order for proper depth (OpenGL) Pin
SilentDude56k3-Sep-10 14:36
SilentDude56k3-Sep-10 14:36 
GeneralRe: Object render order for proper depth (OpenGL) Pin
Dave Calkins3-Sep-10 14:53
Dave Calkins3-Sep-10 14:53 
GeneralRe: Object render order for proper depth (OpenGL) Pin
SilentDude56k3-Sep-10 20:15
SilentDude56k3-Sep-10 20:15 
GeneralRe: Object render order for proper depth (OpenGL) Pin
Dave Calkins4-Sep-10 2:03
Dave Calkins4-Sep-10 2:03 
AnswerRe: [Solved] Object render order for proper depth (OpenGL) Pin
Cedric Moonen3-Sep-10 22:19
Cedric Moonen3-Sep-10 22:19 
QuestionDeviceIoControl with IOCTL_DISK_GET_DRIVE_LAYOUT does not work Pin
MKC0023-Sep-10 3:57
MKC0023-Sep-10 3:57 
QuestionRe: DeviceIoControl with IOCTL_DISK_GET_DRIVE_LAYOUT does not work Pin
David Crow3-Sep-10 4:07
David Crow3-Sep-10 4:07 
QuestionRe: DeviceIoControl with IOCTL_DISK_GET_DRIVE_LAYOUT does not work Pin
Niklas L3-Sep-10 4:10
Niklas L3-Sep-10 4:10 
AnswerRe: DeviceIoControl with IOCTL_DISK_GET_DRIVE_LAYOUT does not work Pin
MKC0023-Sep-10 6:45
MKC0023-Sep-10 6:45 
QuestionRe: DeviceIoControl with IOCTL_DISK_GET_DRIVE_LAYOUT does not work PinPopular
David Crow3-Sep-10 7:11
David Crow3-Sep-10 7:11 
AnswerRe: DeviceIoControl with IOCTL_DISK_GET_DRIVE_LAYOUT does not work Pin
Aescleal3-Sep-10 20:15
Aescleal3-Sep-10 20:15 
QuestionCListcontrol Pin
AbhiHcl3-Sep-10 0:52
AbhiHcl3-Sep-10 0:52 
AnswerRe: CListcontrol Pin
Cool_Dev3-Sep-10 1:54
Cool_Dev3-Sep-10 1:54 
AnswerRe: CListcontrol Pin
CPallini3-Sep-10 2:12
mveCPallini3-Sep-10 2:12 

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.