# Search:

Type: Posts; User: Brokenmind

Page 1 of 3 1

1. ## Thread: how to draw a line ?

by Brokenmind
Replies
5
Views
265

### Do you simply want to draw your horse no matter...

Do you simply want to draw your horse no matter what (as a picture), or do you explicitly want to convert it into lines and draw them afterwards? I'm afraid the latter is no easy task and I have no...
2. ## Thread: how to draw a line ?

by Brokenmind
Replies
5
Views
265

### The general syntax is: glBegin(GL_LINES) or...

The general syntax is:

glBegin(GL_LINES) or (GL_LINE_STRIP) or (GL_LINE_LOOP);
glVertex2f(x, y) or glVertex3f(x, y,z);
...
glEnd();
You can look for what best suits your needs here (look at...
3. ## Thread: AABB-Triangle intersection point

by Brokenmind
Replies
5
Views
227

### You're right, I forgot to mention that each of...

You're right, I forgot to mention that each of the tests that was done with the triangle edges and the quad must also be done with the quad edges and the triangle.

The intersection would be a...
4. ## Thread: AABB-Triangle intersection point

by Brokenmind
Replies
5
Views
227

### First, you need to better define what you need....

First, you need to better define what you need. The intersection of a triangle and a bounding box rarely has only one point; most of the times, its an edge.

In case you do this without predefined...
5. ## Thread: eye coord to texture coord

by Brokenmind
Replies
1
Views
135

### The modelviewprojected vector needs to have its w...

The modelviewprojected vector needs to have its w set to 1. After a projection, this w is usually something different, as well as the xyz part, and dividing this by w sort of normalises the vector.
...
6. ## Thread: glGetUniformLocation always causes GL_INVALID_VALUE

by Brokenmind
Replies
4
Views
211

### As for the last question, it has an easy answer:...

As for the last question, it has an easy answer:
You assign the function's return value to an unsigned int, which doesn't have a sign (duh). It isn't returning (int)-1 but (uint)4294967295, which is...
7. ## Thread: glGetUniformLocation always causes GL_INVALID_VALUE

by Brokenmind
Replies
4
Views
211

### You might get a much faster solution to your...

You might get a much faster solution to your problem if you could post the relevant code snippets here, searching through over 1000 LOC is a little tedious :) and you might have as well made a typo...
8. ## Thread: Drawing bitmaps to the screen

by Brokenmind
Replies
2
Views
200

### I assume that most elements in your game are...

I assume that most elements in your game are static, so they don't (or hardly) change at all. The general procedure would be this:
Assign data to them space-efficiently, so if you have 10000...
9. ## Thread: Blended lines do not look as expected

by Brokenmind
Replies
5
Views
288

### A bit of search resulted in this...

A bit of search resulted in this and this posting. Although they're both for iphone, the functions they use also exist in the normal openGL, namely glBlendEquation and glBlendEquationSeparate. You...
10. ## Thread: Calculate the Camera Transform

by Brokenmind
Replies
2
Views
262

### You have one mistake there: The matrix does not...

You have one mistake there: The matrix does not take the target point, but the target direction. So your target vector need actually be (0, -500, 0)^T.
If you try to look with the front direction of...
11. ## Thread: not able to send array using uniform buffer object

by Brokenmind
Replies
3
Views
381

### Unfortunately, I'm not familiar with uniform...

Unfortunately, I'm not familiar with uniform buffer objects, but I have a different approach that could work for you:

With what I coded so far, I found out that shaders seem to have a problem with...
12. ## Thread: Correct Parameter For glBlendFunc Function

by Brokenmind
Replies
6
Views
412

### Usually, these two lines should do the trick: ...

Usually, these two lines should do the trick:

glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

And yes, this is blending because otherwise, the white background...
13. ## Thread: Displaying an image as its mirror image

by Brokenmind
Replies
1
Views
246

### Two possibilities: Use negative texture...

Two possibilities:
Use negative texture coordinates, so 00, 01, -11, -10. For this, you have to activate the GL_REPEAT parameter, otherwise the image will be plain black as valid coordinates have...
14. ## Thread: Moving Star In a Special Line

by Brokenmind
Replies
6
Views
465

### You don't mean this, do you?...

You don't mean this, do you?
http://www.mariowiki.com/images/2/29/SpecialZone_SMW.png
But seriously, you should specify your problem more clearly. And even if you cannot post URLs here, remove the...
15. ## Thread: How create Cube with subdivisions

by Brokenmind
Replies
5
Views
547

### You should be able to figure out the basic theory...

You should be able to figure out the basic theory behind it yourself!

I hope I interpreted your task right because otherwise, the stuff below was for nothing.

Code untested (I only made sure it...
16. ## Thread: Drawing a 3d rotating cylinder in opengl using visualstudio 2013

by Brokenmind
Replies
4
Views
391

### This assignment covers way too many features to...

This assignment covers way too many features to be addressed in a single post, and I'm sure the person who gave you the assignment provided you with a basic openGL program. I'll just give you hints...
17. ## Thread: Show function on the surface of a sphere

by Brokenmind
Replies
14
Views
894

### A test image like the above one? I'm afraid it's...

A test image like the above one? I'm afraid it's from Google ;) But there's an image for everything: Here, for example. I do have selfwritten code for such a sphere, but no project to display it atm....
18. ## Thread: Show function on the surface of a sphere

by Brokenmind
Replies
14
Views
894

### If you have few points which are unevenly...

If you have few points which are unevenly distributed and form a convex geometry around the center of the imaginary sphere, you could extrapolate the values to map a sphere and assign the color...
19. ## Thread: How to set a camera for glOrtho?

by Brokenmind
Replies
2
Views
349

### In openGL, the projection will be performed...

In openGL, the projection will be performed either with perspective or with parallel projection, which internally are glFrustum or glOrtho. But still, in order to tell openGL how you want to look at...

by Brokenmind
Replies
3
Views
284

### You need to draw it before you do the...

You need to draw it before you do the transformation that affects the rest of the scene (so right after you load the identity matrix). Then, the screen space goes from (-1, -1) to (1, 1),
21. ## Thread: opengl dependent on handed-ness?

by Brokenmind
Replies
2
Views
297

### I hope you mean gluLookAt. The code is here: ...

I hope you mean gluLookAt. The code is here:

void GLAPIENTRY
gluLookAt(GLdouble eyex, GLdouble eyey, GLdouble eyez, GLdouble centerx,
GLdouble centery, GLdouble centerz, GLdouble upx,...
22. ## Thread: Show function on the surface of a sphere

by Brokenmind
Replies
14
Views
894

### You got me; I've never done sphere mapping before...

You got me; I've never done sphere mapping before and thus am not familiar with the coordinate conversion.

If the creation of the texture is computationally efficient, then this is no problem. My...
23. ## Thread: How can i make far objects look fading or transparent?

by Brokenmind
Replies
2
Views
389

### I'm not familiar with openGL ES but I hope you...

I'm not familiar with openGL ES but I hope you can use shaders there, because then this will be an easy task:
You simply need to compute the distance between the geometry you draw and the camera,...
24. ## Thread: Show function on the surface of a sphere

by Brokenmind
Replies
14
Views
894

### If you only have scattered points on the sphere's...

If you only have scattered points on the sphere's surface, there is no need for shaders. They work best if you have a mathematical description for the function you want to show, which I thought you...
25. ## Thread: OpenGL drawing 500k triangles

by Brokenmind
Replies
4
Views
466

### I misinterpreted the isometric keyword... but...

I misinterpreted the isometric keyword... but could you add a screenshot of what you have achieved so far?

The information are interpreted in the vertex shader.
Let's say for simplicity that the...
Results 1 to 25 of 63
Page 1 of 3 1