Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

FUCKING OPENGL

Name: Anonymous 2010-02-27 0:31

So I'm supposed to draw an adjustable circle "By using only the put_pixel (or set_pixel or similar) function of the graphics toolset (such as GL)"

BUT THERE IS NO WAY TO PUT A SINGLE PIXEL IN THE GOD DAMN FUCKING LIBRARY? WHAT THE FUCK DO I DO?

in before use 1px large rectangles

Name: Anonymous 2010-02-27 0:34

Have you considered a Fourier series of... rectangles?

Name: Anonymous 2010-02-27 1:19

Name: Anonymous 2010-02-27 4:05

Screen sized rectangle, screen sized texture.

Name: Anonymous 2010-02-27 5:18

Anyways, figured it out
Commented is my initial retard implementation

void setpixel(int x, int y)
{
    /*glBegin(GL_QUADS);
    glVertex2f(x, y);
    glVertex2f(x+1, y);
    glVertex2f(x+1, y+1);
    glVertex2f(x, y+1);
               glEnd();
*/
    glBegin (GL_POINTS);
    glVertex2i(x, y);
    glEnd();
    
     }

Name: Anonymous 2010-02-27 5:23

DirectX has none of this non-sense

Name: Anonymous 2010-02-27 9:11

The most flexible option:

1. Make a single glRect that spans the entire screen
2. Apply a single texture to this screen, with one texel for each pixel
3. Using your own libraries and routines, blit objects and perform raycasts, with the output on the texture
4. To remind the user that they are using an OpenGL application, rotate the rectangle from time to time

Name: Anonymous 2010-02-27 9:35

>>7
WRONG
1. make a framebuffer object, create a texture and bind it to its color attachment point.
3. same as <<7 san's 3., except output to the FBO then draw the texture over the entire screen. Also: use glDrawPixels.
4. to remind the user they are using an ENTERPRISE grade OpenGL application, 'forget' to restore previous state after calls to glBindFramebuffer & similar.

Name: Anonymous 2010-02-28 1:47

AARGH now I can't get the stupid fucking circle to redraw according to window resizing. Fuck.

Name: Anonymous 2010-02-28 6:56

Hax my anus

Name: Anonymous 2010-02-28 16:25

>>10
OW, MY HASNUX!

Name: HAXUS THE GREAT 2010-02-28 16:29

HAXUS THE GREAT

Name: Anonymous 2013-09-01 14:36



I've come across a worrying study on sperm count worldwide, according to this study, between 1938 and 1991 mean sperm count decreased significantly.

Don't change these.
Name: Email:
Entire Thread Thread List