Problem with Strippled Pattern Polygon
Hi... I just tried to make a 4 sided polygon with an own created strippled pattern... but the result is by far not what i expected...
could anybody help me?
please..
here are some snippets of my source:
GLubyte q3a[] = {
0x00, 0x80, 0x00, 0x00, 0x00, 0x88, 0x08, 0x00,
0x00, 0x88, 0x08, 0x00, 0x00, 0x88, 0x08, 0x00,
0x00, 0x88, 0x08, 0x00, 0x00, 0x88, 0x08, 0x00,
0x00, 0x88, 0x08, 0x00, 0x00, 0xC8, 0x09, 0x00,
0x00, 0xCC, 0x19, 0x00, 0x00, 0xCC, 0x19, 0x00,
0x00, 0xCC, 0x19, 0x00, 0x00, 0xCC, 0x19, 0x00,
0x00, 0xCC, 0x19, 0x00, 0x00, 0xCC, 0x19, 0x00,
0x00, 0xEC, 0x1B, 0x00, 0x00, 0xEE, 0x3B, 0x00,
0x00, 0xEF, 0x7B, 0x00, 0xC0, 0xEF, 0xFB, 0x01,
0xF0, 0xC0, 0x81, 0x07, 0x3C, 0xC0, 0x01, 0x1E,
0x0E, 0xC0, 0x01, 0x38, 0x07, 0xC0, 0x01, 0x70,
0x02, 0xC0, 0x01, 0x20, 0x06, 0xC0, 0x02, 0x30,
0x0C, 0xC0, 0x01, 0x18, 0x30, 0x80, 0x00, 0x06,
0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00};
...
glEnable (GL_POLYGON_STIPPLE);
glPolygonStipple (q3a);
glRectf (25.0, 25.0, 125.0, 125.0);
glDisable (GL_POLYGON_STIPPLE);
and here is an image of what it should look like
http://www.hellknights.net/~defender_thk/q3a.jpg
i would be very happy if anyone could help me because i really want to understand Strippled Patterns and i really dont know what mistake(s) i have done..
thx..
Howdy...
I''m not quite sure if pixel-packing affects your stipple pattern..
When it affects it, then check the enabled packing/alignment mode.
I played around with stippling too. I used it for transparency when there is no hardware-acc. pixelformat.
Stippling is relative slow, on NVIDIA-GPU it is implemented with texturing. So it wastes a texture unit.
I''ll take a look at the image-url...
For what do you need it?
Salbe...
I''m not quite sure if pixel-packing affects your stipple pattern..
When it affects it, then check the enabled packing/alignment mode.
I played around with stippling too. I used it for transparency when there is no hardware-acc. pixelformat.
Stippling is relative slow, on NVIDIA-GPU it is implemented with texturing. So it wastes a texture unit.
I''ll take a look at the image-url...
For what do you need it?
Salbe...
Don''t you think a alpha-tested texture is better suited for that.
Upload your pattern as a 1-component texture...
I hope this helps...
Upload your pattern as a 1-component texture...
I hope this helps...
it was just a try to understand striplled patterns...
i dont need it for anything yet..
i just want to understand it..
i dont need it for anything yet..
i just want to understand it..
Are you sure the pattern is correct?
IMHO, the first rows should look like this:
0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,
0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,
0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,
0x06,0x00,0x80,0x30,...
IMHO, the first rows should look like this:
0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,
0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,
0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,
0x06,0x00,0x80,0x30,...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement