Problem with Strippled Pattern Polygon

Started by
4 comments, last by Fend0r 21 years, 2 months ago
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..
Advertisement
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...
There are 10 kinds of people,those who understand binaryand those who not.
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...
There are 10 kinds of people,those who understand binaryand those who not.
it was just a try to understand striplled patterns...
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,...

:wq!
ok it works now..

i "parsed" the picture from the lower right to the upper left

but the correct direction should be from lower left to upper right..
very confusing i think..

i have fixed this now and im understanding strippled patterns

thank you all for your help

This topic is closed to new replies.

Advertisement