LWJGL
May 21, 2013, 13:52:22
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
LWJGL is now using GitHub
Home
Help
Search
Login
Register
LWJGL
>
Programming
>
OpenGL
>
Texturing the outlines?
Pages: [
1
]
« previous
next »
Print
Author
Topic: Texturing the outlines? (Read 721 times)
Obsyd
Newbie
Posts: 26
Texturing the outlines?
«
on:
May 07, 2012, 13:54:19 »
Hello!
So my problem is that I would like to texture a triangle but the texture only appears inside the wireframe of the triangle. I also need to texture the wires(the outline of the triangle) that represent the triangle.
How can I do that?
Thank you!
The pink area is the picture that I get if I render the "green" triangle. (basically its the inside of the green wire)
Logged
Simon Felix
Talks Too Much
Posts: 103
Re: Texturing the outlines?
«
Reply #1 on:
May 07, 2012, 15:30:39 »
Are you just saying you want to texture a slightly bigger triangle?
Logged
Download Cultris II, the fastest Tetris clone from
http://gewaltig.net/
Obsyd
Newbie
Posts: 26
Re: Texturing the outlines?
«
Reply #2 on:
May 07, 2012, 15:43:50 »
Not really.
I need to somehow texture the outlines.
I can't make the triangle bigger.
Maybe I can specify a different rasterization method?
Logged
CodeBunny
Nerdus Imperius
Posts: 561
Re: Texturing the outlines?
«
Reply #3 on:
May 08, 2012, 08:26:26 »
These calls set rendering to be wireframe or fill mode:
glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
If you want to render both the polygon, and render the wireframe differently, I'd suggest rendering them both in a two-pass scenario.
Logged
Obsyd
Newbie
Posts: 26
Re: Texturing the outlines?
«
Reply #4 on:
May 08, 2012, 09:52:09 »
Thank you CodeBunny!
It works!
Is there a mode where I don't need to "double" render? (I guess no)
Again,
Thanks!
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Programming
-----------------------------
=> Lightweight Java Library Game Development
=> LWJGL Documentation
=> Bug Reports / RFE
=> OpenGL
=> OpenAL
=> General Java Game Development
-----------------------------
Archive
-----------------------------
=> Resolved Bugs/RFE
=> DirectX
=> DevIL
=> FMOD
Loading...