Fabian Cenedese
unread,May 17, 2013, 7:16:16 AM5/17/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wx-u...@googlegroups.com
Hi
wxMSW 2.9 (svn)
I want to create a simple game where geometric 3D-Objects move
in front of a background. It's intended to be some kind of quiz show.
I decided to give OpenGL a try since that would help with all the
transforming, rotating and lighting. That's why I looked into the
OpenGL samples.
The isosurf and penguin samples load objects from files but I want
to create my objects in the program since I want to adjust them
(at least the texture). So I played around with the cube sample.
It doesn't really create an object but rotates and paints textures.
But that could be enough for my purposes.
I changed the cube sides to circles. As the background is cleared
with the transparent brush I expected to see my colored frame
background. But the corners still paint black over the background.
static wxImage DrawDice(int size, unsigned num)
{
...
wxMemoryDC dc;
dc.SelectObject(bmp);
// make default transparent
dc.SetBackground(*wxTRANSPARENT_BRUSH);
dc.Clear();
dc.SetBackground(*wxWHITE_BRUSH);
// dc.Clear();
// use a 'round' cube side
dc.DrawCircle(size/2, size/2, size/2);
Do I need to adjust the way that the cube textures
are painted to get transparency? Is this the right
way to go along at all? Does anybody have a sample
project of creating a 'real' 3D object in code
(e.g. a pyramid or a torus) and texture it?
Thanks
bye Fabi