Search:

Type: Posts; User: MarkS

Page 1 of 4 1

Search: Search took 0.02 seconds.

by MarkS
Replies
9
Views
6,838

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.

by MarkS
Replies
9
Views
6,838

Two words... Specular highlights.

Two words... Specular highlights.

by MarkS
Replies
9
Views
6,838

Awesome! I like that idea better. It will let me...

Awesome! I like that idea better. It will let me support GL 2.x.

by MarkS
Replies
9
Views
6,838

Thanks! I had no idea such a concept existed! Now...

Thanks! I had no idea such a concept existed! Now to find an example...

by MarkS
Replies
9
Views
6,838

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. Thread: Looking for specific VBO information.

by MarkS
Replies
4
Views
1,454

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. Thread: Drawing Line Bresenhem midpoint algorithm

by MarkS
Replies
7
Views
7,539

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. Thread: Drawing Line Bresenhem midpoint algorithm

by MarkS
Replies
7
Views
7,539

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. Thread: Drawing Line Bresenhem midpoint algorithm

by MarkS
Replies
7
Views
7,539

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?

by MarkS
Replies
6
Views
2,443

Re: Question about movement in 2D games

Look into time-based animation. It is far superior to a strictly pixel-based movement algorithm.
11. Thread: Drawing Line Bresenhem midpoint algorithm

by MarkS
Replies
7
Views
7,539

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. Thread: Drawing Circle doesnt work (check Code)

by MarkS
Replies
1
Views
1,160

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. Thread: Convert mouse point to box2d point in opengl

by MarkS
Replies
1
Views
1,211

Re: Convert mouse point to box2d point in opengl

I think gluUnProject will do what you need.

by MarkS
Replies
4
Views
6,110

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...

by MarkS
Replies
4
Views
6,110

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...

by MarkS
Replies
5
Views
2,619

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:...

by MarkS
Replies
1
Views
1,308

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...

by MarkS
Replies
1
Views
1,308

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. Thread: Porting OpenGL to a hobbyist platform

by MarkS
Replies
1
Views
1,404

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. Thread: I need help with some FPS camera control code

by MarkS
Replies
3
Views
4,043

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. Thread: I need help with some FPS camera control code

by MarkS
Replies
3
Views
4,043

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. Thread: I need help with some FPS camera control code

by MarkS
Replies
3
Views
4,043

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. Thread: Quaternions: 2 different definitions????

by MarkS
Replies
2
Views
984

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. Thread: Are sine tables too 1990's or...

by MarkS
Replies
9
Views
3,477

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. Thread: Are sine tables too 1990's or...

by MarkS
Replies
9
Views
3,477

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