Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Search:

Type: Posts; User: MarkS

Page 1 of 4 1 2 3 4

Search: Search took 0.00 seconds.

  1. I'm sorry. That came out wrong. I do...

    I'm sorry. That came out wrong.

    I do appreciate everyone's input. It has given me many choices.
  2. Two words... Specular highlights.

    Two words... Specular highlights.
  3. Awesome! I like that idea better. It will let me...

    Awesome! I like that idea better. It will let me support GL 2.x.
  4. Thanks! I had no idea such a concept existed! Now...

    Thanks! I had no idea such a concept existed! Now to find an example...
  5. glShadeModel is depreciated. So, how, exactly, do we do flat shading now?

    I want to make a retro-style game like Spectre. I'm trying to stay away from depreciated functions. I DO understand that it will work for the foreseeable future. Still, depreciated means going away...
  6. Replies
    4
    Views
    1,387

    Looking for specific VBO information.

    I've found many links to VBO's through this site's wiki. However, while those are informative, they are also completely useless. They all seem to be a general overview. The necessary,...
  7. Replies
    7
    Views
    6,091

    Re: Drawing Line Bresenhem midpoint algorithm

    Slight correction. The decision variable was incorrect in this case:



    if(dy > dx)
    {
    incE = 2 * dx;
    incNE = 2 * dx - 2 * dy;
    decision = 2 * dy - dx;
  8. Replies
    7
    Views
    6,091

    Re: Drawing Line Bresenhem midpoint algorithm

    OK, here is your code with some minor changes.

    Notice the use of the ABS macro. This is all that it took to get it to work in all octants. Now, if you work through the decision variable, you'll...
  9. Replies
    7
    Views
    6,091

    Re: Drawing Line Bresenhem midpoint algorithm

    Right...

    :confused:

    That *IS* Bresenham's algorithm, or rather, a highly optimized variation of his algorithm.

    Is this a homework thing?
  10. Replies
    6
    Views
    2,328

    Re: Question about movement in 2D games

    Look into time-based animation. It is far superior to a strictly pixel-based movement algorithm.
  11. Replies
    7
    Views
    6,091

    Re: Drawing Line Bresenhem midpoint algorithm

    #define ABS(x) (x < 0 ? -x : x)
    #define SIGN (x < 0 ? -1 : (x > 0 ? 1 : 0))

    void DrawLine(int x1,int y1,int x2,int y2)
    {
    int dx,dy,sx,sy;
    int accum;

    dx = x2 - x1;
    dy = y2 - y1;
  12. Replies
    1
    Views
    1,053

    Re: Drawing Circle doesnt work (check Code)

    What are you using to offset the circle? It is centered at the bottom-left corner of the viewport. Also, with a delay of 20 (milliseconds?), the circle is being drawn and cleared so fast you may...
  13. Replies
    1
    Views
    1,133

    Re: Convert mouse point to box2d point in opengl

    I think gluUnProject will do what you need.
  14. Thread: rotate 2D object

    by MarkS
    Replies
    4
    Views
    5,440

    Re: rotate 2D object

    So you are trying to do 3D rotations? It isn't going to look correct since you're using glOrtho.

    It you rotate, say, 45 on the x axis and then 45 on the y axis, the object will appear to rotate...
  15. Thread: rotate 2D object

    by MarkS
    Replies
    4
    Views
    5,440

    Re: rotate 2D object

    I may be misunderstanding you, but I believe that you want the object to always face the viewer, correct? If so the problem is that you're rotating around the x and y axis instead of the z:

    Around...
  16. Replies
    5
    Views
    2,439

    Re: Basic Lighting for CAD

    I've never seen that language before, but I had the same problem in C. Adding this line solved the problem: glEnable(GL_COLOR_MATERIAL);

    I would guess that you need to add this line:...
  17. Replies
    1
    Views
    1,209

    Re: Constraining a vector?

    Never mind... I got it to work and it was easier than I thought. One of those "off by one errors". Constraining the mouse to the window worked just fine, after I set ClipCursor to the correct...
  18. Replies
    1
    Views
    1,209

    Constraining a vector?

    I am at a total loss as to how to code this. I'm not even sure what avenue to pursue.

    I am trying to get some FPS mouse control code to work correctly. The way the code is right now, there are no...
  19. Replies
    1
    Views
    1,345

    Re: Porting OpenGL to a hobbyist platform

    I can see how OpenGL works by looking at the open source Mesa code. Because of that, there would be little advantage in looking at or stealing your code. The only thing that should be different is...
  20. Replies
    3
    Views
    3,796

    Re: I need help with some FPS camera control code

    Well, I narrowed the problem down to the matrix4x4f::rotate function.

    I changed it to this:



    void matrix4x4f::rotate( const float &amp;angle, vector3f &amp;axis )
    {
    axis.normalize();
  21. Replies
    3
    Views
    3,796

    Re: I need help with some FPS camera control code

    Very rapidly. I did this because I started noticing the view drifting off after a period of time and tried to speed it up. It worked.

    Here is the code and binary that shows where I'm at:...
  22. Replies
    3
    Views
    3,796

    I need help with some FPS camera control code

    I'm currently using this code:
    http://www.codesampler.com/oglsrc/oglsrc_5.htm#ogl_fps_controls

    There seems to be a bug in the code, but I cannot locate it. You can replicate the bug by holding...
  23. Replies
    2
    Views
    954

    Re: Quaternions: 2 different definitions????

    Math is not my strong point, but I want to say that since it is not commutative, flipping the variable changes the sign.

    The question is, does each method give you the same result?
  24. Replies
    9
    Views
    3,369

    Re: Are sine tables too 1990's or...

    Actually, it would be 90 * 16 * 4, so a little over 5kb, but I see your point.

    Thanks for the infomation. I wont be doing anywhere near enough sines or cosines to justify this.
  25. Replies
    9
    Views
    3,369

    Re: Are sine tables too 1990's or...

    I need to calculate sine and cosine several times in each frame for rotations and camera movements. I haven't counted how many times, but I'm not creating a regular polygon once in the code and...
Results 1 to 25 of 82
Page 1 of 4 1 2 3 4