Results 1 to 5 of 5

Thread: How to Draw Pixel with XOR OR AND...

  1. #1
    Member Contributor
    Join Date
    Dec 2000
    Location
    Kaifeng,He'nan,PRC
    Posts
    69

    How to Draw Pixel with XOR OR AND...

    Yes,I mean that..draw a pixel to the buffer and do some xor,or,and operations with the same position pixel in the buffer.

    I have a pixel Color3f(1.0f,0.5f,0.0f) to draw into(mybe should speak as "onto",or "at"?God damn,my first language isn't english, ..)position Vertex2f(0.0f,0.0f).and the pixel in the buffer which is at Vertex2f(0.0f,0.0f) is unknow,I do not want read it and use it,i just need use the new pixel do some bit-operation,XOR,AND,OR...

    maybe i can use glReadPixel(),but read from buffer is a slow slow slow job,even slow than read form system memory,How can I crazy to do this on the 4X APG graphy card,just as i install a russian truck engine into my BlueBird ?!!!

    any body have any idea about this?(mean to the programme,not the car engine ))
    ========================
    As an old Chinese saying:One Live a Short while Die a Long...
    If I am useful to this world,I am reasonable to myself.
    =========================

  2. #2
    Super Moderator OpenGL Guru imported_dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,966

    Re: How to Draw Pixel with XOR OR AND...

    How about this:
    http://www.opengl.org/developers/documen...ic+op#first_hit

    I don't see it in the blend equation specs for one vendor I checked though, but at least you know what to look for though.

    blendxor.c here will be of interest to you:
    http://web.mit.edu/afs/athena/system...L/samples/EXT/

  3. #3
    Senior Member OpenGL Pro
    Join Date
    Sep 2000
    Location
    Santa Clara, CA
    Posts
    1,096

    Re: How to Draw Pixel with XOR OR AND...

    COLOR_LOGIC_OP is a core GL 1.1 feature.

    - Matt

  4. #4
    Senior Member Regular Contributor
    Join Date
    May 2001
    Location
    Beloit, Wisconsin
    Posts
    473

    Re: How to Draw Pixel with XOR OR AND...

    Originally posted by mcraighead:
    COLOR_LOGIC_OP is a core GL 1.1 feature.

    - Matt
    ...But is only accelerated on only a handful of cards.

  5. #5
    Senior Member OpenGL Pro
    Join Date
    Sep 2000
    Location
    Santa Clara, CA
    Posts
    1,096

    Re: How to Draw Pixel with XOR OR AND...

    Well, I didn't say anything about acceleration and/or performance, did I. (It _is_ accelerated, however, on Quadro2 and GF3.)

    dorbie was referring to the old OGL 1.0 extension mechanism for color logic op, which is pretty much ancient history now...

    To be honest, I don't know why it was changed. I think the BlendEquation way of doing it is a bit cleaner; it expresses more directly the fact that color logic op and blending are mutually exclusive. But it is what it is, and it's ancient history, so it might as well stay how it is.

    - Matt

Similar Threads

  1. Replies: 4
    Last Post: 08-01-2016, 06:19 PM
  2. Can't draw a pixel , suspecting an OpenGL state variable
    By Whiteclaws in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 12-06-2013, 08:32 PM
  3. vertex and pixel shader to draw a point as sphere
    By satya in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 08-03-2011, 03:10 PM
  4. Get the pixel / color format of the draw buffer?
    By taifunbrowser in forum OpenGL: Windows
    Replies: 4
    Last Post: 07-05-2009, 11:08 AM
  5. Choosing pixel format after Direct Draw
    By Mad Max in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 03-29-2000, 07:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean