Jump to content
  • Advertisement
Sign in to follow this  
RyukZilla

OpenGL Another Q, much easier

This topic is 2582 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello,

Well my last inquiry was a bit hard to do and I gave up on it, now what I wanna do is just create a simpleOpenGlControl with just the X-Y plane or X-Z (to see flat images) and load only positive coordinates.
Why i want to do this?
I want do draw flat images on top of it like

------------------------------------------------------------------


-------------------
| |
| __________ |


*
-------------------------------------------------------------------

Being the "*" the initial coords (assuming its on 0,0)
Can anyone help me on this? I'm really struggling and I need it a.s.a.p >_<
Been searching and I don't seem to either get it or know how to do it.

Share this post


Link to post
Share on other sites
Advertisement
Your question is unclear. You want to draw a "flat" (relative to the screen) textured rectangle, using OpenGL. You want to be able to specify the screen space co-ordinates with 0,0 as the bottom left of the screen? The top right being perhaps 1.0, 1.0, or maybe the window dimensions in pixels?

It sounds like you should look into glOrtho2d. But please clarify if that isn't what you're trying to do.

Share this post


Link to post
Share on other sites

Your question is unclear. You want to draw a "flat" (relative to the screen) textured rectangle, using OpenGL. You want to be able to specify the screen space co-ordinates with 0,0 as the bottom left of the screen? The top right being perhaps 1.0, 1.0, or maybe the window dimensions in pixels?

It sounds like you should look into glOrtho2d. But please clarify if that isn't what you're trying to do.


You nailed it.
I want to do exactly what you said, create a control with coords 0,0 being the bottom left corner and x,y being the top right corner.
Why I want to do this? i want to add an event "simpleOpenGlControlX_MouseClick" and be able to add multiple figures or at least 1 of each kind (triangle, rectangle, rhombus and quad) on it. Save those coords in a matrix.

Im sorry, this must be really easy to do it, but im desperate and i can't find the solution.

Im using Tao (Gl and FreeGlut) by the way and the other control, which I have the robot to do some 3D movement, works fine, it was a pain in the ass tho but it works.

Share this post


Link to post
Share on other sites
It isn't clear whether it is the rendering or the "control/event" part that is causing you trouble. Essentially, you've only told us what you're trying to do, but not where you are nor what problems you've had doing it.

Can you post your current attempt?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!